Keys: Left/Right. Instructions: You are the spaceship going through...uhh...space. Dodge the objects as you fly. You get points for each object you successfully dodge, and level up every 100 points (making the game harder). Get hit too much and your game is over. Post your highscore in the comment list!
Credit for the background music goes to "Axelay". All Scratch code made by myself from scratch in Scratch. Notable coding snippets to look at in this game for those interested in trying to duplicate my techniques are: 1.) Object/Clone generation. Note yet again how I make use of this same technique from WumpusHunt and Typing Game. You use an invisible "controller" which generates multiple instances (clones) of a sprite. These clones know how to behave by themselves, and their first instruction is to move to wherever the controller is, so they can be positioned correctly. In this game, for example, I used that idea to make my hailstorm of falling bullets. 2.) The 'modulo' operator. In order to level up every 100points, I could have created a 'countdown' variable. But rather than create a new variable besides score, I used the mathematical "modulus" operator. A modulo operator performs division, but then keeps the remainder. For example, 112 mod 100 = 12 (the remainder). So the statement Score mod 100 will 'trigger' every time our player hits a score divisible by 100. 3.) MovementLocking I *could* have allowed objects to be generated in any given X coord, instead I used "every 33 pixels" (so random(0-15) * 33). This way, it takes less objects to convincingly cover the entire screen. Enjoy! -AHMAD (youtube.com/BountyHunterSAx