Coin Chase Adventure - Simple Game in MakeCode Arcade
Let's make
a simple game in MakeCode Arcade where a player controls a character to collect
coins while avoiding an enemy.
Steps to Create the Game
Open
MakeCode Arcade:
Click on
"New Project" to start coding.
Use Blocks for coding
Step-by-Step Instructions for coding
1. Create a Player Sprite
Click
Sprites → Drag "set mySprite to sprite of kind Player" to the on-start
block.
Click on
the gray box and draw your player character (or use a built-in one).
2. Enable Movement
Go to
Controller → Drag "move mySprite with buttons" inside on start.
3. Add Coins (Collectibles)
Go to Game
→ Drag "on game update every 2000 ms".
Inside
it:
Go to Sprites → Drag "set sprite to sprite of kind
Food".
Click the gray box and draw a coin.
Go to Sprites → Drag "set position of mySprite to random x,
y".
Replace mySprite with the coin sprite.
4. Increase Score on Coin Collection
Go to
Sprites → Drag "on sprite of kind Player overlaps with otherSprite of kind
Food".
Inside:
Go to Info → Drag "change score by 1".
Go to Sprites → Drag "destroy otherSprite".
5.
Add an Enemy
Inside on start, add:
Go to Sprites → Drag "set enemySprite to sprite of kind
Enemy".
Click the gray box and draw an enemy.
Go to Sprites → Drag "set position of enemySprite to random
x, y".
Go to Sprites → Drag "set velocity of enemySprite to random
-50 to 50" for both X and Y (so it moves randomly).
6. End Game on Enemy Collision
Go to
Sprites → Drag "on sprite of kind Player overlaps with otherSprite of kind
Enemy".
Inside:
Go to Game → Drag "game over (lose)".
To Run the Game
Click the
Play Button in MakeCode Arcade.
Move your player, collect coins, and avoid the enemy.

