Jump to content
  • Advertisement
  • entries
  • comments
  • views

Perfect Circle

Sign in to follow this  


Sin and Cos are a programmers best friend!  I was looking at other games for inspiration and I saw this image from r-type


A circle of aliens spins around the player and you have to shoot them from the inside.

To calculate the points of a circle is quite easy, the calculation is - 


Therefore I have an array of 10 objects which is calculated as follows - 


230 pixels from the 'origin' and I have 10 objects - 360/10=36. I is incremented by 1 each step.

I now have a nice circle of aliens, I can increase the number by reducing the number 36.  I can make the circle smaller or larger by increasing the radius.

The first level is more or less complete, with boss monster at the end.  On to the second level!


Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!