Advertisement

Top Down Shooter AI

Started by February 23, 2009 01:02 PM
5 comments, last by Crow-knee 15 years, 8 months ago
Ok so top down shooter ai is pretty basic. Just fixed paths with bullet firing at specific intervals and what not. My question is: How would I design the paths into my game or whats the best way to implement this? I could store equations I guess but whats the norm for a top down shooter game when implementing AI? Ive been wanting to make a top down shooter for a while now and I'm just now getting around to it. Any ideas would be great. Thanks.
-------------------------------------------
http://www.MurderDev.com - Developing Killer Software
http://www.MobileCellOut.com - Cell Phone Contract Exchange
Don't need to manually design paths. Use steering behaviors like these:

http://www.red3d.com/cwr/steer/

http://www.red3d.com/cwr/boids/

Advertisement
It would be a list of offsets so that the pattern can happen any where on the screen. That is from start location move 6 down and zoom to closest screen edge or something. To do the initial design I would use paper and a pencil to draw the pattern you want. I would use something like a vector of a simple struct of (enum direction, int distance) maybe a enum entry for shooting if you want that kind of control. If you want more control than that the struct could be something like (int dir in degrees,int distance) if distance is zero shoot in dir instead of move.

Flocking rather seems like overkill for this case since you typically don't want characters reacting to each other or anything else in the scene.
Ok that's kind of what I was thinking. Yea flocking does seem overkill. This project isn't going to be very big and I somehow doubt that the first action shooters used flocking but either way thanks to both of you for the help.
-------------------------------------------
http://www.MurderDev.com - Developing Killer Software
http://www.MobileCellOut.com - Cell Phone Contract Exchange
valleyman86,

I'm thinking of starting a top down shooter as well. I'm not sure how much time you plan on spending on yours, and I'm still a few weeks away from writing the first line of code, but if you would like to have any discussions to help us both further our projects along, I'd be more than happy to talk with you.

John
Yea that would be good. Mine will be starting today I hope. It will be very basic at first but yea discussions are always good. I have another friend making one as well. There seems to be a lack of good information on any sort of standards when creating these games but I think I may post some of my trials and solutions in a blog as my first post heh. We will see.
-------------------------------------------
http://www.MurderDev.com - Developing Killer Software
http://www.MobileCellOut.com - Cell Phone Contract Exchange
Advertisement
Hi valleyman,
I wrote a simple 2D side-scroller shooter some years ago with VB and DX7. I played with a few ideas of pathing and found simple way-points to suffice. I stored just a list of 2D co-ords in order of the path, and in the .ini file, just assign the path to the enemy/enemy group.
Just traversing the waypoints gives a pretty stilted result, but if you apply some bezier curve or other smoothing algorithm, you can make movement very organic with very few points.
With shooting I had 2 types. One for "shoot at player", time based, and another for "pattern", also time based. The first is pretty simple, the second was basically a definition of periods and shooting vectors.
As with anything, start simply and build on it. Once you get the basics working you can add to it if you find the need (like I had only very simple bosses as they used the same functions as the pleb enemies).
Good luck with it.
Steele.

This topic is closed to new replies.

Advertisement