Top-down shooter.

Started by
12 comments, last by Llew 24 years ago
Hey there all, I''ve been reading this board for over a year, it has helped a lot, but this is my first post. Yay! Um, anyways, I am creating a top down shooter and I was wondering on how to implement the AI, or the lack of AI. I want it simple like in Raptor or Tyrian, where the ships come in a predetermined pattern. I just have no idea on how to start, so I''m looking for ideas or source code. Any help would be appreciated. Thanks Llew
Advertisement
Well, what'' i''d do, is just make a file for patterns. It would tell what position to put the ship in each frame(or how much it should move each frame), and what sprite it would use(like, say you had a teleport sprite if it was about to go across the screen)... also, it''d include any actions like when to shoot, etc.

Then, the level file would specify which file each ship used, and they''d all be loaded in at the start, and just parsed for each individual ship
Ok, I think I get it.

Just have a preset pattern file, that tells it to move 10 pixels left(while banking to the left ie. use a different sprite frame) then shoot, then 15 right, that kinda thing. I''d make it generic so it could be used with any enemy. And in the map editor, when placing a ship give it a path also. Probably include a path editor aswell.

One question though, in a game like this (vertical scroller), would I only initialize the enemy when it is a about to come on the screen and then initialize the pattern? I think that would be the best way. If there is a better way, I''d be glad to hear it.

Thanks SeanHowe

Llew
yup, just initialize when they come on screen... that''s the way i did it, and it worked fine.
Hi
In almost all side/updown/tile based shooter games, you
position the objects (enemies,etc) in the map editor.
at run time your engine will triger them when they come
on the screen or they are near to be on the screen,
i have a Focus function for all objects, when they are
trigered they start their action (move,rotate,shoot) the
Focus function is the object''s brain.
Do a general engine, you also need to implement a
powerful map editor with the capabilities to set and
edit several property and flags for each object, for
example speed, shooting delay, rotation speed, life,...
Such map editor and engine can be used to develop
too many games of the mentioned types.
And one thing, do it in 16bpp video modes, if you need
ground tiles, i have ripped Raptor, Tyrian, Delta Force2
tiles from their files Delta Force2 has many true color
tiles.

--MFC (The Matrix Foundation Crew)
I am wondering about copyright issues with using tiles from those games. I will be releasing the game as freeware, but charging for it to be shipped on a cd with full screen movies. So basically they are payihng for the movies, not the game, since it can be downloaded. Does anyone know if I could use these tiles then?
i''m not sure about this, but i think you''d only be able to charge for shipping and cost of disc.


crazy166
some people think i'm crazy, some people know it
Ok, so could I use tiles from tyrian or raptor if I released it as freeware, no charge at all? I am kind of thinking I''m not allowed to. I dunno though.

Llew
no, copyright infringement is copyright infringement.. it doesn''t matter if you give it away free of charge, it''s still illegal (check out the thread(s) about the Hasbro suit)
(1) move patterns work well
(2) I use a linked list! Sprite is simply added to the list shortly before it appears on the screen
(3) I currently use keyframing (splines) for the path! So I define some positions between the sprite is interpolated. This works very fine! Very smooth movement and easy creation of path!
Have fun BunnzPunch'n'Crunch

This topic is closed to new replies.

Advertisement