Setting up Godot
- Download Godot Standard version from here: https://godotengine.org/download/windows
- Unpack it and run the exe file
- Create a new project by pressing New Project, for a 2D game OpenGL ES 2.0 is suitable (it will run on more platforms).
This is a class diagram of Godot's base classes:
This practice is based on a Platform game tutorial series from HeartBeat:
- Create a new 2D project
- Add basic node World
- Save the scene
- Add a player
- Add a KinematicBody2D, rename it Player and attach script Player.gd
- Add Sprite to KinematicBody2D, with Godot icon
- Add variable motion Vector2
- Add func _physics_process(delta)
- Change motion.x to 0, 100 or -100 based on which button player presses
- Add move_and_slide(motion) to move it
- Add GRAVITY constant and make player fall
- Add a StaticBody2D named Wall
- Add sprite to the wall (you can use Godot icon and tint it black)
- Add CollisionShape2D with box shape to both player and wall
- Save Wall as a scene and duplicate it multiple times
- Make the player jump when up button is pressed
- Add check is_on_floor() check to determine that player is on floor
- Check if the up button is pressed and change the motion.y when it is
- Add UP constant Vector and add it to the move_and_slide
- Update the motion by the return value from move_and_slide
- Add export variables for gravity, speed and jump_height, configure them in inspector
- Download sprites from https://www.dropbox.com/s/dq0q4udpujh1fzp/Sprites.zip?dl=0
- Import sprites as 2D pixel texture.
- Create a tileset.
- Create a new tileset scene (Regular node)
- Add sprite to the tileset and rename it to tile0.
- Turn on sprite region and select a tile.
- Add StaticBody2D and CollisionShape2D to the sprite and configure them.
- Duplicate sprite object to each different tiles.
- Save the scene as tileset: Scene -> Convert To -> Tileset
- Add Tilemap to the scene with the previously created Tileset
- Set the correct cell size.
- Change the view size (640, 480) Project -> Settings -> General -> Display -> Window (640, 480)
- Draw a simple map
- Set the view test size to (1280, 720)
- Set Mode to 2D and aspect to expand
- Animate the character
- Change Sprite node to AnimatedSprite
- Create new SpriteFrames
- Create Idle animation with Idle sprite (1 frame)
- Create Run animation (5 frames)
- Create Jump animation with only the first frame (1 frame)
- Resize the collision to fit the sprite
- Flip the sprite when the player changes the direction
- Switch between run and idle animations in code
- Play the Jump animation when player is not on the floor
- Add acceleration to the the player with a max speed
- Make player to slow down when stopped (friction is higher on ground)
- Change the collision shape to a capsule
- Create a portal between scene
- Add Area2D with a collision shape and icon.
- Add a script to it
- Loop over overlapping bodies, and if the body.name == "Player" change the scene.
- Alternatively you can use duck typing and add the change scene functionality to Player.
- Make the scene configurable by adding: export(String, FILE, "*.tscn") var world_scene
- Add a Globals singleton for keeping score and increase it every time the player uses the portal.
- Use getter and setter method for accessing the score value.
- Add an on_set_score signal to the Globals singleton and call it when the score changes.
- Add a following camera node to the character
- Add a parallax layer node to the character
- Download sky texture from here: https://www.dropbox.com/s/esskpfovx1lkk7v/Dirt%20Autotile%20and%20Sky.zip
- Use pixel snap: Settings -> General -> Rendering -> Quality -> Use Pixel Snap
- Add a basic UI and menu
- Add VBoxContainer
- Add Game Title
- Add Start and Exit buttons
- Configure Start and Exit buttons through events
- Add a theme
- Use scrollbar.png from here: https://opengameart.org/content/match-3-gui
- Configure buttons and background for the panel
- Individual tasks:
- Spawn a bouncing ball when player presses "F" key.
- Destroy the ball when it collides with player again. Hint: use duck typing to determine if the other node has the collision method node.has_method("your_function") and call it when it has.
Submit a compiled version of your game (Windows 64 build). Zip your build folder into a single package and make sure that all the additional files (that were created when building the game) are also included in this package. Don't submit your source code.
Deadline: 01.12 (before midnight)