3. Case 02: Coins Hunter#

3.1. Purpose#


  • Create a game of coins hunter.

3.2. Materials Required#


../_images/retro-case-01-01.png

3.3. Software#


MicroSoft MakeCode

3.4. Program#


  • Set the background color to green and create mySpirite, set the type as player, create another mySprite2 and set the type as Food. Control the movement with buttons and set it stay in screen in on status, then set mySpirite2 displays at a random place.

../_images/retro-case-06-01.png

  • While the player overlaps with the food, set the food display at another random place, start the countdown in 3(s) and the score adds 1.

../_images/retro-case-06-02.png

3.5. Program#


3.6. Downloading Program#


After programming, connect the computer with the Retro via the USB cable.

  • ../_images/retro-case-01-10.png

  • Choose hardware “F4”.

    ../_images/retro-case-01-11.png

  • Click the reset button on the Retro and go to the downloading page.

    ../_images/retro-case-01-13.png

  • Match the devices and get connected with “Arcade (app)”.

    ../_images/retro-case-01-12.png

  • Click downloading to compile the program into the Retro.

    ../_images/retro-case-01-14.png

3.7. Conclusion#


  • Control the movement of the hunter in the screen, while it reaches one coin, the score adds 1, after that it starts countdown 3 seconds, the game is over if the time runs out, or it reaches another loop if the hunter gets another coin.