Page 53 - PortGPT_V2.1_C6_Flipbook
P. 53
The components of the editor page are:
Game simulator: Run and test your code.
Game control: Move your player or press function buttons.
Simulator toolbar: Provides tools to control various aspects of the game.
Download to hardware: Download your code.
Name of the project: Shows the name your saved project.
Save the project: Save your game project by giving the name you want.
Undo: Reverse the last executed command.
Redo: Restore any actions done previously using an undo.
Zoom out: To see more of the view of the window at a reduced size.
Zoom in: Get a close-up view of your window.
Share project via URL: Share your game with others.
Block toolbar: The Toolbox has all of the blocks you need to build your game.
Programming workspace: Place where you drop your blocks to make your game.
Let us take a look at some of the blocks from Block toolbar
Scene : It is used to modify the background of the game simulator. Some of the
commonly used blocks of this section are:
Screen width: It stores the value of the width of the screen.
Background image: It stores an image for the background.
Set Background Color: It is used to set the background colour.
Set Background Image: It is used to set an image as background.
Loops : It is used to repeat a set of block multiple times.
Repeat: It is used to repeat the execution of a set of block multiple times.
Logic : It is used to add conditional blocks to the program.
If-else: It is used to make decisions based on a condition. If the condition is true, then the if
block is executed otherwise else block will be executed.
Variables : It is used to create variables.
Math : It contains blocks to perform mathematical operations.
Teacher’s Corner
1. Discuss the real-world applications of coding with the students.
2. Tell the students about some of the programming languages.
Introduction to Coding 51

