Hello All
Just hoping to pump the forum for some experience here :)
I am working on a game that involves a number of sprites that will need to be computer controlled. Basically the computer chooses a sprite out of the available inactive sprites and moves it to a new location.
So sprite 1 is currently in position 1, has the choice of going to position 2 or 3. From position 2 it could go to 4 or 5, from position 3 it could go to 5, 6 or 7. etc.
So was thinking that I could populate an array of arrays - and then use a random number to select a choice at each position.
Then when I call a function to move a sprite, it calculates its route - then makes an action sequence up from actions we prepared earlier.
Only problem is, I am not sure if this is really that flexible for what I want. The dba in me is tempted to design a sqlite database that has each location and links from each location to available locations. I can then query the database for each location. But I worry that the performance would be a lot worse.
How are people handling their AI? Is there any code out there that demonstrates a decision tree?
Thanks
Justin