Click here to Skip to main content
15,887,214 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Base building in a RTS based on a queue of orders Pin
Gerry Schmitz27-Apr-23 5:33
mveGerry Schmitz27-Apr-23 5:33 
General[edited]Re: Base building in a RTS based on a queue of orders Pin
Calin Negru27-Apr-23 8:01
Calin Negru27-Apr-23 8:01 
GeneralRe: [edited]Re: Base building in a RTS based on a queue of orders Pin
Gerry Schmitz29-Apr-23 3:48
mveGerry Schmitz29-Apr-23 3:48 
General[edit][edit]Re: Base building in a RTS based on a queue of orders Pin
Calin Negru30-Apr-23 5:23
Calin Negru30-Apr-23 5:23 
GeneralRe: [edit][edit]Re: Base building in a RTS based on a queue of orders Pin
Gerry Schmitz30-Apr-23 6:14
mveGerry Schmitz30-Apr-23 6:14 
GeneralRe: [edit][edit]Re: Base building in a RTS based on a queue of orders Pin
Calin Negru30-Apr-23 22:12
Calin Negru30-Apr-23 22:12 
GeneralRe: [edit][edit]Re: Base building in a RTS based on a queue of orders Pin
Gerry Schmitz1-May-23 0:08
mveGerry Schmitz1-May-23 0:08 
GeneralRe: [edited]Re: Base building in a RTS based on a queue of orders Pin
Calin Negru30-Apr-23 5:10
Calin Negru30-Apr-23 5:10 
I think I got it figured. When a unit is killed the AI has to build another unit to make up for it. If you use the unit death event to start building a new unit you might not have the money to do it, so you have to queue the training for later. Implementing this behavior takes extra code. My guess is that in the case of the method presented in the opening post a capacity limit for units is created. As the processing moves down the priority list the capacity limit for various units increases.
The computer checks if the actual unit number the AI player has and capacity limit number match, if they don’t ( due to units dying) units are trained.

modified 30-Apr-23 12:10pm.

GeneralRe: [edited]Re: Base building in a RTS based on a queue of orders Pin
Gerry Schmitz30-Apr-23 6:29
mveGerry Schmitz30-Apr-23 6:29 
QuestionEfficiently finding position in sorted list Pin
Robert Ellis26-Mar-23 13:52
Robert Ellis26-Mar-23 13:52 
AnswerRe: Efficiently finding position in sorted list Pin
Mircea Neacsu26-Mar-23 14:42
Mircea Neacsu26-Mar-23 14:42 
QuestionDijkstra Pin
Calin Negru13-Dec-22 7:46
Calin Negru13-Dec-22 7:46 
AnswerRe: Dijkstra Pin
jschell13-Dec-22 10:39
jschell13-Dec-22 10:39 
GeneralRe: Dijkstra Pin
Calin Negru13-Dec-22 22:34
Calin Negru13-Dec-22 22:34 
GeneralRe: Dijkstra Pin
jschell20-Dec-22 13:21
jschell20-Dec-22 13:21 
GeneralRe: Dijkstra Pin
Calin Negru26-Dec-22 9:26
Calin Negru26-Dec-22 9:26 
GeneralRe: Dijkstra Pin
jschell29-Dec-22 11:20
jschell29-Dec-22 11:20 
GeneralRe: Dijkstra Pin
Calin Negru30-Dec-22 8:56
Calin Negru30-Dec-22 8:56 
GeneralRe: Dijkstra Pin
harold aptroot2-Jan-23 6:45
harold aptroot2-Jan-23 6:45 
AnswerRe: Dijkstra Pin
Eddy Vluggen2-Jan-23 10:48
professionalEddy Vluggen2-Jan-23 10:48 
GeneralRe: Dijkstra Pin
Graeme_Grant2-Jan-23 11:41
mvaGraeme_Grant2-Jan-23 11:41 
QuestionRe: Dijkstra Pin
Eddy Vluggen2-Jan-23 11:59
professionalEddy Vluggen2-Jan-23 11:59 
AnswerRe: Dijkstra Pin
Graeme_Grant2-Jan-23 12:16
mvaGraeme_Grant2-Jan-23 12:16 
NewsRe: Dijkstra Pin
Eddy Vluggen2-Jan-23 12:27
professionalEddy Vluggen2-Jan-23 12:27 
GeneralRe: Dijkstra Pin
Calin Negru3-Jan-23 0:19
Calin Negru3-Jan-23 0:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.