Computer Science Canada

Top Down Shooter

Author:  Amit [ Sat Jan 31, 2009 10:46 pm ]
Post subject:  Top Down Shooter

My calculus and vectors course just ended, and I decided to try and put some of that knowlege to use. This is a top down shooter, using vectors to draw the bullets. Any tips or suggestions are welcome.

You might not want to look at the code, as I just kinda wrote this off the top of my head, so it's uncommented and very messy. There are probably a million ways it could be made more efficient, but since this was just a fun little project, I probably won't both to fix it up too much.

Author:  DemonWasp [ Sun Feb 01, 2009 12:59 am ]
Post subject:  RE:Top Down Shooter

Nicely done. With just a few modifications that could be a really excellent game.

1) Though probably pretty difficult, consider adding multiplayer. Either versus or cooperative is great.
2) When your enemies attack you, have them stay some distance away and block your movement.
3) Give us a reload button (R!)
4) Add in pictures for the player and enemies.
5) Change the title to "Zombie Assault!" edit: looking at your code, I see they're already called zombies. Play this up and you could have a decent zombie game!

Author:  SNIPERDUDE [ Sun Feb 01, 2009 3:05 pm ]
Post subject:  RE:Top Down Shooter

If you want to expand your use of vectors knowledge in the game, try this challenge: figure out a way to strafe (move left or right of the direction you are facing). great start, loads of potential.

Author:  CodeMonkey2000 [ Sun Feb 01, 2009 4:21 pm ]
Post subject:  Re: RE:Top Down Shooter

SNIPERDUDE @ Sun Feb 01, 2009 3:05 pm wrote:
If you want to expand your use of vectors knowledge in the game, try this challenge: figure out a way to strafe (move left or right of the direction you are facing). great start, loads of potential.


Aren't you just traveling along the vector [y,-x] for strafing, if [x,y] is the direction that you are looking in?

Author:  Amit [ Mon Feb 02, 2009 8:40 pm ]
Post subject:  Re: Top Down Shooter

Update Time.

@DemonWasp, I followed almost all of your suggestions, except for the blocking one. I added multiplayer, pictures, and fixed the collision detection a little. I decided to take out the knife, because it wasn't very useful.

@SNIPERDUDE, the code to strafe is in the player class, but commented out. In it's place is a way to make sharp turns, which I found moure useful.

As it stands right now, there is multiplayer, but both players have the same controls. You can change it in the code, where you create the players. I couldn't find a good setup that was confortable for two people on one keyboard, but If anyone does, post it.

Again, any comments or advice are welcome.


: