123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|529|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Concept/Design -> Enemies in Scrolling Shooters

Wed, 02 Jul 2008, 17:33
HoboBen
As a short project, I want to create a vertical scrolling shmup similar to raptor.

But I don't know how best to describe the enemies that appear in code. When I tried this before I loaded all of the enemies in one go, and simply had them all at negative y-offsets, then once in-view they followed a simple path which were all variations of y = x^2. The result was some very boring enemies.

Can anyone offer some suggestions?

In particular, I'm hoping to make it easy to add enemies in a level editor and any thoughts on how best to do this would also be welcomed.

Thank you



-=-=-
blog | work | code | more code
Wed, 02 Jul 2008, 18:29
Jayenkai
Bezier Curves

Very simple to achieve..
Give the ship a bunch of points..
Fly from 1 to 3, 3 to 5, 5 to 7, and use 2,4,6 as the midpoints of the bezier curves.
Should pretty much do the trick.

Add more points, or what have you, for smoother movement.
Sorted..

-=-=-
''Load, Next List!''
Thu, 03 Jul 2008, 06:42
HoboBen
Thanks Jay!
Thu, 03 Jul 2008, 09:25
JL235
An alternative, a list of spawn info (the time, locations and type of an enemy to spawn). You also put a list of enemy behaviour in the spawn info. The behavior is a list of things the enemy should do (i.e. turn, constant turn, move, constant move, shoot, constant shoot, shoot angle) and a time for each one. The enemy has a timer to work out when to implement the next action on the enemy. Try to make it so that the counter and list are separate, so that each enemy can have it's own counter but a wave of enemies all share the same list.

Personally I didn't bother with curves in my shoot-em-up, instead just had them turn by a set amount at set times.
Fri, 04 Jul 2008, 07:27
HoboBen
Cheers, another good suggestion. I might perhaps combine the two.

Some games seem to use primitive A.I. - if you've ever played Deimos Rising, there's these spinning star-shaped ships which try to ram into you. But they didn't do that for the whole game - I expect they would probably have used the list-of-things-to-do method.

-=-=-
blog | work | code | more code