hi
My game is a space game. The little ship flys around the screen in side view (ground, sky, clouds).
i'm now trying to make ai for the enemies.
Currently my ai consists of a state method. Each ship has a "type" number. The type number shows what state the enemy ship is in. So far there is type #12 and type #13. Type #12 moves the ship down diagonally to the right from the top of the screen. Once the ship reaches a certian scanline it automatically changes to type #13. Type #13 moves the ship straight down vertically to the bottom of the screen. When the ship reaches the top of the screen again it becomes type $12. And this is repeated.
i want to do this:
The enemy would be moving along the black lines from state to state. But there are two problems with this.
1. A more complicated path would require more states. Wouldn't this way be too much code?
2, How would you make an enemy move along a curvy path? Is there a different way to do ai for this?
please help.
My game is a space game. The little ship flys around the screen in side view (ground, sky, clouds).
i'm now trying to make ai for the enemies.
Currently my ai consists of a state method. Each ship has a "type" number. The type number shows what state the enemy ship is in. So far there is type #12 and type #13. Type #12 moves the ship down diagonally to the right from the top of the screen. Once the ship reaches a certian scanline it automatically changes to type #13. Type #13 moves the ship straight down vertically to the bottom of the screen. When the ship reaches the top of the screen again it becomes type $12. And this is repeated.
i want to do this:
The enemy would be moving along the black lines from state to state. But there are two problems with this.
1. A more complicated path would require more states. Wouldn't this way be too much code?
2, How would you make an enemy move along a curvy path? Is there a different way to do ai for this?
please help.