Create a new project”.Desktop Full HD (1920x1080) as
the resolution.New empty project”.Object Panel on the right
side of the GDevelop interface.Add a new object”.Sprite” from
the options.Player” as the
object name. (Important: name)Add a new object”.Add a new object”.Object Panel and name it
“Cherries”.Player” in
the Object Panel.Edit Object”.Behaviors” tab.Add a behavior”.Platformer Character”.Floor” in the Object
Panel.Floor” or click the
three-dot icon and select
“Edit Object”.Behaviors” tab.Add a behavior”.Platform”.UI.Add a New Object:
Add a new object”.Create a Text object for the score:
Score: 0.Select the Text object and drag it into
your scene
With the Text object selected in the scene (click on it),
navigate to the properties panel on the left side of
your screen. Set the layer of the Text object to
UI.
0 in the
properties panel to place it behind other objects.At the beginning of the scene.Objects → Player → Camera center X position)set to Player.CenterX()Objects → Player → Control pressed or simulated).Set Player animation to
“Run”.
(Animation(by name) → Player → Run)Flip Horizontally to
Yes.Flip Horizontally to
No.Jump
key is pressed.Jump”.Idle”.Player → Collision → Cherries)Cherries object.Text (General/Text capability)set to."Score:" + ToString(Variable(Score)).Score by
+1:
Change variable value (General/Variables).Score.add and set the
value to +1.Play a sound effect when
certain events occur (e.g., collecting Cherries).Just have fun.