< All Topics
Print

Unit 2 – Hello World


Items In This Unit

 

  • “Hello World” in GD Tutorial

“Hello World” GD Tutorial

We will use GD short-form moving forward instead of GDevelop.  The GD game engine has 3 main concepts

  • Objects (on the screen)
    • Objects are graphics shown on the game screen.
    • Objects include player sprites, enemy sprites, the text shown on the screen etc.
  • Events (for every frame drawn on the screen)
    • When something occurs make changes to the screen
    • Typically, a screen is refreshed 60 times per second on modern computers
  • Behaviours
    • When you assign behaviours to objects, you simplify your game development with behaviours built-in such as platform behaviour, player platform behaviour, destroy when outside of screen etc..

In this tutorial, we will start using GD’s text object in illustrating the basic game creation process. Follow the following steps for the creation of our first “Hello World” GD project.

Step Instructions

1

Open GDevelop on your computer.

2

You should see an empty screen from which you want to select “Create a New Project”

3

You should now see an options menu from which we want to choose the “Empty game” option.

4

You will see the empty project screen as shown.

5

Every game is made of at least one scene. You can think of a scene as a game level.  To create our first and only scene, click on the “+” button as indicated.

6

You should see the new scene entry. The name of our scene is currently “New scene”. Rename your scene by clicking on the 3 dots as indicated below. Rename the scene to “Level 1” 



Press the Enter key once done.

7

Next, double-click on the “Level 1” scene. You will see an empty project. Now you are ready to create your very first video game. The game will be simple it will just say “Hello World” but that’s okay. It is good to go through the basic process of video game generation. 

If you cannot see the middle rectangle you can use the “+” and “-“ keyboard keys or roll the middle mouse button to zoom in and out of your game design area until you see the game viewable area.

8

Remember how we said that there are 2 most important parts of the GD game engine? Well, you are looking at one of those! The center area represents the game viewable area. This is where you place visual objects (e.g. graphics for players, enemies, text etc.)

To the right of the game design area, you will see the “Objects” pane. This is where you will define your graphics, text etc..

Next, click on the ”+” next to “Add a new object”.

9

You should see a new window with several object-type options.

10

Select “Text”. You will see a new dialogue box.

11

For the “Object name” change the name to “greeting”.

For the “Initial text to display” change the text to “Hello World”.

Your screen should look as follows.


Click on Apply

12

Next, you should see the new “greeting” text object appear within the right pane as shown.

Click and drag the “greeting” object to the center of the screen. Make sure it is shown within the center of the rectangle.

13

Your screen should look like the one shown.

14

Next, click on the Preview button.

You will see the game screen opens.

15

You can use the Preview button to quickly preview your game or a specific scene (level).

16

To complete this exercise let’s save this project.

Click on “File” then “Save As”.

GD saves the game in JSON text file format. Rename the default name (game.json) to helloworld.json.

Click on “Save”.

Congrats! You have learned the following in this unit tutorial:

  • How to open and create a new game project
  • How to create a scene or game level
  • How to create a text object
  • How to add an object to the game design view
  • How to preview the game scene or level
  • How to save your game

Next, we will learn about the GD’s coordinate system.


Game Files/Resources

You can download the files from the link below. 

Download link.

 

Table of Contents