Topic outline

  • General

  • HOW TO DEVELOP VIDEOGAMES IN MBLOCK SOFTWARE?

    The game that we will develop during this course consists of a set of questions, in which if we answer the question the mBot will advance, and, if on the contrary we fail, the mBot will go back.

    You will play one team against another, and there will be 2 mBots linked together with a string. The first team that manages to move the other mBot to its field will win the game.


    mBots


    To do this, we will carry out the steps described below:

    1. Design the elements of the game.
    2. Programming.
    3. Test the game and enjoy.

  • DESIGN OF BACKGROUNDS AND GAME ELEMENTS

    First, we will know the program's interface:




    In the next step, we will teach you how to load a fund to our game:



    For the creation of sprites or elements of the game, we have the following options:




    Once we have the chosen background, in the Backgrounds section, we can edit the image:




    To edit the selected sprite, we can also edit it in the "disguises" section:



  • PROGRAMMING THE GAME

    It should be noted that there are different layouts to carry out the programming, the elements that we want to appear in the background will be programmed in the background section, and for the elements of sprite in the sprites section.


    In the first image the elements programmed for the background are appreciated, and in the second the elements of the sprite.




    In the background layout, we will initialize the variables:



    In the sprites layout, we will schedule the presentation of the game and the questions:




    Next, we will analyze each block of programming in more detail:


    1. Game Presentation:


    2. Questions Programming:



    3. End of the game: