Skip to content

Oscar-Ryley/Get-Moving-with-Godot-Workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get Moving with Godot Workshop | DurJam 2025

2D & 3D Movement tutorial for getting started in Godot!

Full workshop recording on the Durham University Computing Society YouTube Channel




2D Movement

  1. Start a new project

  2. Start a scene with a Node2D and name it 'Scene'

  3. Start another scene with a Node2D and name it 'Character'

  4. Add child nodes to this scene so that it has the following structure:

    • Node2D <-- 'Character'
      • CharacterBody2D
        • CollisionShape2D
        • Sprite2D

  1. Go to Project Settings -> Input Map (2nd tab)

    • Add the following actions, and press the + button to attach keys to them
      Action Suggested Buttons
      "Left" <A>, <←>
      "Right" <D>, <→>
      "Up" <W>, <↑>, or <space> (jumping)
      "Down" <S>, <↓>

  1. Atach a script to the CharacterBody2D Node

  2. Use the code in 2D-Movement.gd to allow your character to move!

You can either have your movement be top-down by not adding the gravity elements in the file, or a traditional side-scroller/ platformer style with jumping and gravity implemented


A full template Godot Project can be found in Basic Godot Projects/2d_movement.zip



3D Movement

  1. Start a new project

  2. Start a scene with a Node3D and name it 'Scene'

  3. Start another scene with a Node3D and name it 'Character'

  4. Add child nodes to this scene so that it has the following structure:

    • Node3D <-- 'Character'
      • CharacterBody3D
        • MeshInstance3D
        • CollisionBody3D
      • Node3D <-- 'Neck'
        • Camera3D

  1. Go to Project Settings -> Input Map (2nd tab)

    • Add the following actions, and press the + button to attach keys to them
      Action Suggested Buttons
      "Left" <A>, <←>
      "Right" <D>, <→>
      "Forward" <W>, <↑>
      "Back" <S>, <↓>
      "Jump" <space>
    • The mouse perspective movement will be handled by capturing mouse movements using Godot mouse modes (.MOUSE_MODE_CAPTURED)

  1. You'll need a surface in the 3D Scene to walk on, so add a surface mesh, MeshInstance3D with a cubic StaticBody3D & CollisionShape3D to stop your character from falling into the void. Use the following structure:

    • MeshInstance3D
      • StaticBody3D
      • CollisionShape3D

  1. Atach a script to the CharacterBody3D Node

  2. Use the code in 3D-Movement.gd to allow your character to move!


A full template Godot Project can be found in Basic Godot Projects/3d_movement.zip



Full Godot Project folder


The Demo Game implements both 2D and 3D movement, with both a 2D and 3D scene that you can toggle between to play different takes on the same game concept.

The game fits the DurJam: Remastered (2025) theme 'A Twist on a Classic' as it twists the platformer genre; instead of the aim being to get to a particular place using the mechanic of the platforms, the goal is to have visited every platform.

The blue texture of the platforms turns red when they have been visited.

Visiting every platform extends to the 2D demo minigame, and the concept is further twisted on by the new mechanic of toggling platforms. Visiting a platform twice will un-select it, turning it blue again. This means that the player must find a route to all platforms that visits each platform an odd number of times.

By pressing <Q> in the 3D demo, you can switch to this alternate game mode to try out this new concept in the 3D environment.


  • Controls
    • <W, A, S, D> for movement
    • <space> to Jump
    • <E> to switch between 2D & 3D demos
    • <Q> to switch to alternate, toggle platform (hard) mode

3D textures sourced from Polyhaven.



Sources

Extra Resources

About

Godot Workshop for DurJam 2025

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published