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 start
loop, grab aset background image
block 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
pause
block 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 mySprite
block under the last block we set. - Click the drop down menu next to mySprite. Create a new variable and name it
Blinka
or 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
Player
sprite type. - Now add a
set position
block 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
move
block 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 mySprite
block, 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
SparkySpeedx
andSparkySpeedy
. - Also in the variables block section, drag in two
set mySprites to
blocks. Set one toSparkySpeedx
with a value of40
and the other toSparkySpeedy
with a value of60
. - Now, with a
set mySprite velocity
block, choose Sparky as the sprite, and drag in theSparkySpeedx
andSparkySpeedy
as 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 screen
block, change the drop down tobounce on wall
and switch toon
.
- Drag in a
set life
block and set the desired value. - Next, drag in
set mySprite
block, create new variable calledStar
, make the sprite graphic and change the kind toFood
. - Set its location.
- Drag in a
start countdown block
and set the desired value.
- In the
sprite
blocks category, drag in anon sprite of kind
block, set kind toPlayer
and overlaps kind toFood
. - Play a sound when Blinka hits each star.
- Add a
change score by 1
block. - Next we want the star to move to a new random location. To do this drag in a
set position
block. In themath
blocks category, find and drag in apick random 0 to 0
block inside both x and y values. Set ranges accordingly. - Start the countdown over.
- Drag in an
on sprite of kind
block, set kind toPlayer
and 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 ms
block 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 by
blocks and enter value of desired speed increase. - Then to update Sparky's speed, drag in a
set velocity
block, changing the sprite to Sparky and the vx and vy toSparkySpeedx
andSparkySpeedy
.
Text editor powered by tinymce.