Professional Documents
Culture Documents
- - -
-
- - -
-
-
- - - -
- -
-
---------
-
- - -- -
- - - - - -
- - - - - -
- - - - - - - - -
-
-
-
-
-
-
-
-
- - - - - -
---
- - - - - - -
- -
--
- - -- -
-
-
-
-
- -
- - - -
- -
-
-
- - -
- - - -
-
-
--- -
-
-
- - - -
--- - - - - - - -
- - -
Los Libs
II T L T ||P. T. L. E.
125 Pginas.
ISBN: 978-958-9146-71-2
Note: The examples in this text were tested in the GDevelop version 6.3.80.
For the creation of this book was used some of the pictures from the
GDevelop examples, particularly the example platformer.
Mechanics.............................................................1
Story..................................................................... 1
Aesthetics..............................................................1
Technology...........................................................2
2. What is GDevelop?............................................3
3. Basic Elements in GDevelop...............................4
4. Interface............................................................6
a. Top Panel ...................................................... 8
b. Project Manager........................................... 10
c. Objects editor..............................................10
d. Scene Tab....................................................11
e. Events Tab...................................................11
f. Status Bar....................................................12
g. Coordinate System ....................................... 12
5. Tools...............................................................13
a. Image converter........................................... 13
m. Activate Preview........................................ 34
n. Activate Play in window................................. 34
o. Stop the preview (native mode).................... 35
p. Export project to the Web.............................. 35
q. Export Native project (Windows).................... 36
PARTTWO:............................................................ 37
AUTOMATISMS AND EVENTS................................ 37
7. Automatisms....................................................37
a. Types of Automation:.................................... 37
b. Add an automatism...................................... 39
c. Eliminate automatism................................... 41
Add conditions.............................................47
Add actions..................................................48
Add a comment between events....................49
a. Scene events................................................51
Condition: At the beginning of the scene...........51
Action: Change background color....................51
b. Special Events..............................................52
Condition: Trigger once while true.................... 52
c. Mouse Events...............................................53
d. Multi-touch Events........................................54
e. Keyboard Events...........................................55
f. Collisions.....................................................56
g. Sound and music events................................57
Action: Play a sound......................................... 58
Action: Stop a sound........................................58
Action: Play music in the background................59
Action: Stop music........................................... 60
i. External Events............................................. 63
Create an external event...................................63
Insert link to an external event........................... 65
j. Group of events........................................... 66
PART THREE:......................................................... 75
INTERFACE OF THE GAME ..................................... 75
10. Instances, layers, order, cameras and scenes. 75
a. Create instance of an object......................... 75
b. Create multiple instances of an object........... 78
c. Create layers................................................ 79
d. Select object layer and Z order...................... 81
h. Creation of buttons.......................................89
i. Hide and show objects..................................92
j. Add scenes...................................................93
k. Establish a global object...............................95
l. Change of scene.......................................... 95
PART ONE:
FIRST STEPS
Mechanics
Story
Aesthetics
Technology
Mechanics
Defines the rules for the game and are reflected in the
goal or objective of the game.
Story
Aesthetics
Technology
After defining these four (4) elements for the game project,
proceed with the development of its graphic elements, then
it is the right moment to create the programming, which is
performed in this case using GDevelop.
2. What is GDevelop?
Objects
Sprites
Scenes
Events
Automatisms
4. Interface
2 3 4
5
1)
The graphical interface of an empty project in
2)
GDevelop is composed of the following main panels:
3) Top Panel
Project Manager
4) Panel of scene and Events
Objects editor
5) Status Bar
a. Top Panel
Projects
Images bank
Scene
Events
Objects
Code
File
b. Project Manager
Images
Scenes
External events
External layouts
Extensions
c. Objects editor
d. Scene Tab
The Scene tab is where you can see all the graphic
objects that compose the game scene and you can edit
its properties by clicking on each one of them.
e. Events Tab
f. Status Bar
g. Coordinate System
5. Tools
In the Projects tab (top panel), are two tools which are
of great utility to format the files that can be
used in the projects. One is to convert images and the
other to convert sound files.
a. Image converter
6. First steps
Desktop game.gdg
[images ]
[sounds ]
f. Insert an object
Then the file will appear in the list of the Images bank
and must drag it to the Images section in the same
window.
After this the window will close and you will see
the image in the scene, like this:
For this you should click with the right mouse button
within the scene window, and select the option Insert a
new object and then click on Tiled Sprite.
Then the image will appear in the list of the Images bank.
After, do click on the image and then in the green +
icon to select it, and finally in OK.
You can then scale the image, taking care to not pull
the square that has a line connected to the center of the
image, since it is the one that controls the angle for
rotating the Sprite.
After this, you will see that the image is not pixelated,
because is not scaled, but is copying itself again and
again, giving the impression of being the same image.
For this image to be used as tiled sprite, it must be
designed in such a way that it may give continuity to
both sides.
k. Scale objects
l. Rotate Objects
m. Activate Preview
After this a new window will open which will ask the
folder where you want to save the project to be
exported, and then you should click on Export.
After this, a new window will open which will ask what
the folder is where you want to save the project to
be exported, then you should click on Compile.
PART TWO:
AUTOMATISMS AND EVENTS
7. Automatisms
a. Types of Automation:
2
In native mode there are more types of automatism, but will not be
explored in this introductory text.
b. Add an automatism
c. Eliminate automatism
8. Management of Variables
9. Events programming
Conditions Actions
Note: The actions and conditions of the events that will be presented
below are available in both modes (Native and HTML5). There are more
types of actions and conditions in the native mode, but only a few will be
explored in this introductory text.
Add conditions
After this, in the events panel you will see two red
arrows, at the beginning of the condition.
Add actions
a. Scene events
b. Special Events
On some occasions, an event has actions that should
not be activated several times in succession. What is
needed is that the actions of the condition run only the
first time that this condition is fulfilled.
c. Mouse Events
d. Multi-touch Events
e. Keyboard Events
f. Collisions
The sound events are those that are used to play sound
effects that are repeated each time the user makes an
action. For example, the gunshot sounds (for a war
game) or the sound of the character jumping (in the
case of a platform game).
The music events are those that are used to play a track
or song, which will sound in the background, giving
the game some kind of sound atmosphere. For
example, you can use this event to inform
the player that he had little time left to finish the level,
making the rhythm of the music, play much faster.
h. Object Events
Random(SceneWindowWidth())
SceneWindowHeight() /2
i. External Events
j. Group of events
Random()
SceneWindowHeight()
Random(SceneWindowHeight())
PART THREE:
INTERFACE OF THE GAME
Object
Instance
You can see that this is the same object (character), but
they are two different instances. To confirm this, we can
open the list of instances on the Scene tab .
c. Create layers
Once you have assigned the new name to the layer (in
this case HUD) click on the OK button and return back
to the Layers Editor window, where you will see the
layer with the new name.
h. Creation of buttons
j. Add scenes
Before After
l. Change of scene
The files are useful for saving the records of best scores,
or to save the settings for each player. In
GDevelop managing files, to save and load data is
done by files in XML format
a. Read file
To show the value that was recovered from the file, you
can use the variable oldrecord to store the value tha
is read from the file to display its content in the text
object filecontent.
b. Save file
PART FOUR:
Examples
Finally, you will add to this event another action that will
allow to update the content that will be displayed over
At the end you can add an event that, pushing the space
key, then restart the scene (go to Scene1).
PART FIVE:
ANNEXS
Problem Solution
The Objects editor You need to click the scene
disappeared from the tab and then click on the icon of
window. the Objects Editor.
The Project
manager You need to click the Projects
tab and then click on the icon
disappeared from the of Projects.
window.
Fails Solution
Errors
saved project.
opening the You need to correct the paths of
all files. For this, it is better to
erase all the objects in the
Images bank and add them
again. In the case of having
sound events, you must do the
same procedure to add each
audio file again.
the
not Objects
appear in
Editor. You must select each item in
the Objects Editor and
click with the right button in the
The thumbnails do Edit After this,
option.
the Edition of a Sprite object
window will open, and then close
it. After this, the thumbnail of
each object in which you do this
procedure, will appear.
17. References