Crazy AI stuffs
Not so crazy i dont think but how would you handle the AIs for the enemies in games like this one : http://www.tripletsandus.com/80s/80s_games/galaga.htm
That would be the size of a smal novel
There doesn't seem to be any AI in that game (I.E. the enemies don't react to your actions). It just seems to be triggering enemy actions (for example, diving or shotting) at random intervals. It probably has a set of rules which determine whether a trigger is ignored... like "if there is another ship below you, you are not allowed to dive"
If I were going to make something like that I'd probably have an array for different types of movement. IE MovementTypeOne[] = ["left", "left", "left", "left", "down", "right", "right", "right", "right", "up"];
then have a switch statement for each direction and move all the units in that direction. at the start of each loop move the max hight down by one.
I'm also very naïve, so I'm probably suggesting something horribly wrong.
then have a switch statement for each direction and move all the units in that direction. at the start of each loop move the max hight down by one.
I'm also very naïve, so I'm probably suggesting something horribly wrong.
Possibly Related Threads...
Thread: | Author | Replies: | Views: | Last Post | |
I'm going CRAZY!!! Random crashes without reason | akb825 | 3 | 5,210 |
Aug 18, 2005 03:46 PM Last Post: akb825 |