I've added a couple of power ups to Extinctathon, cancerballs and bibles. The cancerballs (I should probably come up with a different name for that) shoot out in a straight line, although I might make them bounce like fireballs in Super Mario Bros. The bibles go up in an arc and cut a swath of heavenly destruction through thine enemies (unlike the balls, which are destroyed when they hit an enemy). There's a fair amount of tweaking to be done, but I'm happy with how the power ups have gone so far.
Since the XBox 360 hates in-game object creation, the player's sprite has a pool of five projectile sprites (five being arbitrarily chosen, adding or subtracting from this is as simple as changing a number one time in the code--it feels like a good number, though) from the time of its creation. The sprites are all "dead", so to speak (i.e. this.state == SpriteState.Dead), so they aren't updated or drawn. When the player hits the B button, it cycles through, finds the first dead sprite, and reforms it into the appropriate projectile. If all the projectiles are active, as in there are five bibles being thrown around, no new projectiles will be created. When the projectiles have died (after a couple seconds), new ones can be created. Simply, the player can shoot out up to five of a projectile at any given time.
I also added some pills, which are basically like coins, rings, or any of the other pointless(ly fun) collectible items from every platformer ever. Each pills gets 100 points, and 100 pills get you a brand new life.
The main thing now is to get the blocks to pop out the power ups (I'm manually spawning them with the level creator at the moment, as you can see in the video). I'd also like to make the brick blocks breakable, and make some brick blocks that pop out power ups, pills, 1-ups, stuff like that.
From here on out, I have a couple of big changes remaining:
- GAME STATE MANAGEMENT! I keep putting this off
- serious improvements to the collision detection
- an improved level editor
- hardcore optimization for the XBox 360
Video:
Extinctathon: Pills, balls, and bibles (720p 19.1mb download)
No comments:
Post a Comment