MicrolearnENPTES

Behaviors do the heavy lifting

Lesson 3 of 16 · GDev.Micro

Moving by hand shows the idea, but real games need gravity, jumps, acceleration and slopes. GDevelop packs this kind of logic into behaviors that you attach to objects.

Attach Platformer character to the Player and it runs with the arrows and jumps with Space. It still needs something to stand on: attach the Platform behavior to the Ground.

Behaviors and events work together. Behaviors handle the standard parts; events add the rules that make the game yours.

In GDevelop, behaviors are added in the object editor, on the Behaviors tab. Other common ones are Top-down movement, Physics, Draggable and Tween.

Give Player the Platformer character behavior and Ground the Platform behavior. Then preview: run with the arrows, jump with Space.

Do it in the browser: a real game design tool, a short mission and instant feedback. No install.

Start this lesson — free
← Move with the keyboardCollect the coins →

All lessons · GDev.Micro