Saturday, October 16, 2010

Fixed collision

So I was able to fix checking if the bullet collided with the meteor. The previous function worked in theory, but because the point positions were still "local" (relative to when it was first drawn, so the x's and y's of my points were all under 150, and my window is 800x600). In the function I transformed the points of the shape to global and it worked! Although the hit boxes could use a little tinkering, that's another thing I'm going to fix later. I also added an "outofbounds" function to the meteor class, but it's based on if the center of the meteor shape is out of bounds, so it's very specific, later I'll fix it to check the individual points of the shape.

As of now, this is what "works":
  • The ship can move, shoot bullets, and move from the very bottom of the screen to the top
  • When the bullets collide with the meteors, both disappear
  • When meteors move out of bounds, they appear on the other side of the screen
And here's what I need to work on:
  • Adding a Start Menu before the game starts
  • End game after all meteors are destroyed
  • Some sort of point system
  • Adding different levels after all asteroids get killed
After that's done here's what needs to be fixed/added:
  • Acceleration of the ship
  • Hit boxes of meteors
  • Out of bounds function of meteors
  • A high score board
  • "Blowing up" animation for the meteors
  • Varying speed for meteors
Oh and no picture today, everything looks the same as the last post.

No comments:

Post a Comment