# 'Curtain Shooter' Math

Hi, I'm trying to create a 'curtain shooter' game. Essentially this is a side scrolling shooter (think Gradius, R-Type etc) but the enemies throw out a rediculous number of bullets. Here is an example:

http://www.sss-mag.com/images/strayfire2.jpg

could anyone advise me as to how I could do the mathmatical side of this? I've looked at what I am trying to do and have summarised that I need to:

i) Create a circle (n.b - this isnt a problem)
ii) Plot points at regular points around the circle (this is where the problem lies)
iii) The circle will also have to grow by a set amount each frame, and the space between the intervals will have to grow also.

I was also hoping to do something with sine and cosine waves.

However im not sure how to approach this (I get the feeling its a lot easier than I think it is...its 2d geometary). Is there a specific topic i should look up? Can anyone recommend specific reading?

Last edited:

Related Other Physics Topics News on Phys.org
daniel_i_l
Gold Member
Give each bullet a certain angle if there are n bullets then the angle between each one startion from 0 would be 360/0. To get the bullets (x,y) position were the distance of each bullet from the center is r,
x = rcos(angle), y = rsin(angle) - (don't forget to change to radians first. I'm not sure about other languages but in C/C++ the sin and cos functions take radians as input)
Now you simply have to increase the r every frame.

Thats exactly what i needed. Thanks a lot for your help! :)