Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Gamedev Challenge - Shooter with no weapons

Gamedev Challenge - Shooter with no weapons

r1ckparker
r1ckparker's Journal · · 1 min read
4,364 3

The requirement is to create a horizontally scrolling shooter game with no weapons. I thought that I could have the enemies shooting at you and you could use their own bullets against them. If you had a shield, you could reflect the bullets back.

I created a quick demo and generated some bullets. The first problem was how to work out which direction to bounce the bullets back. After a bit of tinkering I found the best way was this -

1) Get the direction between the playerx,y and the bulletx,y

2) Invert this (add 180 degrees)

I tested out and it works OK, I think. Note that in the video, the bullets don't just get bounced in the opposite direction they are travelling, with a bit of skill you can actually 'aim' the bullets towards different parts of the screen, depending on where they hit your shield. A nice demo, but can I turn it into a game???!!


Discussion

Loading comments...