edit: look in newer comments for updated version
https://gist.github.com/a03bfdab757c1d978061
This game is far from complete. But I wanted to share it before it became incomprehensible and thus useless for new game developers!
HOW TO PLAY:
The point of the game is simple. See how many waves you can handle before you die. Each wave increases the enemy count by one.
If you kill an enemy, there is a 33% chance they will drop a bonus item. You can hit the bonus item to get a boosted effect.
There are three bullet types you can experience using bonuses. The default, blue, is simply bullets. There is also green, which are missiles. The final and most powerful type is cyan, cluster bombs, which when they hit the enemy will explode and create ten missiles nearby.
Your player is equipped with a shield and health bar, just like the enemies. The shield gradually recharges, but the health will permanently remain depleted once removed. So be careful if your shield gets low! Try to focus your fire on one enemy at a time so you can make their shields less effective.
MORE INFO:
Currently there is only one type of enemy and no real pattern to their spawning. I plan on working on that and making more enemies.
Some of the functions in this are purely aesthetic. Every bullet, when it strikes something or explodes, will turn into two smaller bullet particles just for graphic effects. Also when the player takes damage you will notice a 'stun' effect, caused by abusing the fact that you can draw on top of previous draw loops.
Tell me what you think, and I hope you guys can get some ideas out of this and make your own awesome games!
KNOWN BUGS/TODO:
Needs more enemy types.
Needs formation patterns for enemies when they spawn.
Enemy bullets can be easily avoided. Needs to be fixed with more enemy types or a better spread of bullets.
Missiles/Cluster Bullets can cause substantial lag. Implement Quad splitting so the Hit Tests are less intensive.