Game Rules
- Blinka the purple snake has 4 seconds to get to the star. Clock resets and the score increases by 1 each time this is accomplished.
- Blinka must avoid Sparky the blue smoke monster who is bouncing around the screen. Each time Sparky hits Blinka, one out of 3 lives is lost.
- Sparky's speed increases every 5 seconds.
Feel free to follow along by creating a new project in MakeCode Arcade or by viewing the completed project.
- In an
on startloop, grab aset background imageblock and create the desired background image for the game to start on. - You can edit this image by clicking the part of the block with the thumbnail.
- Next add a
pauseblock to let the intro image stay on the screen forone second. - Then set the background image and background color to black.
- Now drag a
set mySpriteblock under the last block we set. - Click the drop down menu next to mySprite. Create a new variable and name it
Blinkaor what ever character name you want. - Next, click the thumbnail for the sprite and create your desired sprite.*
- Click the drop down menu at the end of the block and select the
Playersprite type. - Now add a
set positionblock to place Blinka in a specific spot each time the game starts. By clicking on the number values, the program allows us to set x and y values visually. Just move the mouse over the game console to choose a place to put the sprite. - Lastly add a
moveblock and click the plus sign to set arrow keys as the way we move Blinka around.
*MakeCode Arcade usually allows importing images to use for background and sprites by dragging and dropping png files into the editor space. However at the time of this writing, this functionality is not available due to being in Beta Mode.
- Drag in
set mySpriteblock, create new variable calledSparky, make the sprite graphic and change the kind toEnemy. - Set to a position in the game.
- Create two new variables called
SparkySpeedxandSparkySpeedy. - Also in the variables block section, drag in two
set mySprites toblocks. Set one toSparkySpeedxwith a value of40and the other toSparkySpeedywith a value of60. - Now, with a
set mySprite velocityblock, choose Sparky as the sprite, and drag in theSparkySpeedxandSparkySpeedyas the velocity values. This will allow us to increase the speed of Sparky over time later! - Lastly, drag in a
set mySprite to stay in screenblock, change the drop down tobounce on walland switch toon.
- Drag in a
set lifeblock and set the desired value. - Next, drag in
set mySpriteblock, create new variable calledStar, make the sprite graphic and change the kind toFood. - Set its location.
- Drag in a
start countdown blockand set the desired value.
- In the
spriteblocks category, drag in anon sprite of kindblock, set kind toPlayerand overlaps kind toFood. - Play a sound when Blinka hits each star.
- Add a
change score by 1block. - Next we want the star to move to a new random location. To do this drag in a
set positionblock. In themathblocks category, find and drag in apick random 0 to 0block inside both x and y values. Set ranges accordingly. - Start the countdown over.
- Drag in an
on sprite of kindblock, set kind toPlayerand overlaps kind toEnemy. - Play desired sound when Sparky hits Blinka.
- Lose a life.
- Move Sparky to a random new location.
- Shake camera to show player a life has just been lost.
- Drag in an
on game update every x msblock and change value to desired amount of time intervals in which to increase Sparky's speed. 5000ms is 5 seconds. - From the variables block category, drag in two
change mySprite byblocks and enter value of desired speed increase. - Then to update Sparky's speed, drag in a
set velocityblock, changing the sprite to Sparky and the vx and vy toSparkySpeedxandSparkySpeedy.
Page last edited March 08, 2024
Text editor powered by tinymce.