How do enemies in a shoot-em-up game work?
Hopefully someone will understand my question.
Can anyone tell me how enemies in a shoot-em-up like Tyrian or any other top-bottom scrolling shoot-em-up work? Are the characteristics of the enemies usually programmed in or stored in a level file? (In other words, how do the enemies know what to do?) It''s really hard to explain exactly what I''m looking for, but I just want in general how the enemies move and fire.
Dave2001,
MAILTO(Forrester6@msn.com);
Dave2001,Dave2999@hotmail.com
You''re talking about games like R-Type and 1942 right? I''d think that in a level editor you''d have triggers placed at certain locations and when the player scrolled into a position to activate a trigger, enemies would be activated and fly onto the screen doing whatever you programmed them to do. I''d think you''d have different AI patterns programmed into the game, and in the level editor you would specify what type of enemy would attack using a specific attack pattern. Then maybe depending on the difficulty setting, the enemies could fire more or something... That sound ok?
December 14, 2000 07:46 PM
The simplest and most general way to think of them is as state machines. They each have a state, and while in that state, they have different behaviors. For example, one state might be moving from side to side, another state shooting while flying off the screen, another forming up into a line with the other enemies.
At certain points, they may transition into other states. What state they go into next is determined by the current state and some external factors, like where in the game the player is, how many other enemies are left, how long the enemy has been on the screen so far, etc.
At certain points, they may transition into other states. What state they go into next is determined by the current state and some external factors, like where in the game the player is, how many other enemies are left, how long the enemy has been on the screen so far, etc.
Cool! That sounds like exactly what I had planned out! I just wanted to know whether I was doing it right. I guess I was.
Dave2001,
MAILTO(Forrester6@msn.com);
Dave2001,
MAILTO(Forrester6@msn.com);
Dave2001,Dave2999@hotmail.com
December 15, 2000 11:38 AM
There is no "right" way to do things like this. If it works use it. There might be better ways to do things, but don''t abandon something because it''s different from the way others do it - you might be abandaning an idea that turns out to be a better way than anything else.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement