Get the Godot Engine set up on your computer and create a basic scene.
1. Download Godot
2. Create a basic scene
- Open Godot and click
New Project - Select a your class folder and create a new folder for the project
Godot Intro - Choose
OpenGL ES 2.0(better for pixel graphics) - Click
Create & Edit
3. Organize folders
- In the FileSystem panel, create three folders,
ScenesandSpritesandScripts - In your Finder or FileExplorer, move your avatar art into the
Spritesfolder
4. Create a Scene
- In the Scene panel, click the 2D Node button and rename it default scene
- Name is
DefaultScene
5. Add some sprites
- Click the
+button to add a new node - Choose
Node2Dand name itScenery - Rick-click on the
Scenerynode and clickAdd Node - Choose
Sprite - In the
Inspectormenu, click the[empty]box next toTextureand clickLoad - Choose one of the tree sprites
6. Create a Player scene
- Right click on the Scenes folder and click
New Scene - Make sure it is in the
Scenesfolder - Name it
Player - Open the player scene and click
Other Nodeand chooseKinematicBody2D - Rename the main node
Player - Click the
+button to add a new node - Choose a
Sprite - Add your avatar image to the sprite texture
7. Add the Player Script to the Player
- Download the MMP 270 Assets folder
- Extract the
PlayerController.gdfile and drag into the Scripts folder - In the Player scene
Inspectorclick the[empty]next toScriptand then choose the player script - Adjust the properties in the
Script Variables
8. Add Player to Default Scene
- Switch back to the DefaultScene
- Click the
Instance Child Scenebutton that looks like a chain link - Choose
Player.tscn
9. Setup the input
- Open
Project > Settings - Go to the
Input Maptab - Type in
move_rightinto theActionbar and clickAdd - Click the
+next to the new input and clickKey - Press
Right ArroworDand then click Enter (don’t hit the Enter button it will change the mapping) - Continue with input for
move_left,move_up,move_down
10. Add a camera
- Click the
+button to add a new node - Choose Camera2D
- Add the
CameraController.gdscript - Adjust the properties in the
Script Variables - Set
CurrenttoOn - Add the
Playerscene instance to thePlayer Pathvariable
11. Preview the scene
- Click the Play button or Play Scene button
- Screen shot the window for documentation
12. Add some scenery
- To make your scene a little more interesting, draw some sprites for scenery and add them into the scene
13. Documentation
- Take a screen shot or video of your scene and post it on the Open Lab