A simple 2D game made in the Godot game engine, based on the "Your first 2D game" tutorial:https://docs.godotengine.org/en/4.2/getting_started/first_2d_game/index.html
Find a file
Avik Das 81ee44bb42 Add controller support
Tested on a few controllers:

- Xbox controller
- Logitech Rumblepad 2
- NES-style USB controller
2024-01-14 18:41:04 -08:00
art Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
fonts Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
.gitattributes Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
.gitignore Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
HUD.gd Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
HUD.tscn Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
icon.svg Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
icon.svg.import Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
Main.gd Add "press ESC to quit" functionality 2024-01-14 16:50:29 -08:00
Main.tscn Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
Mob.gd Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
Mob.tscn Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
Player.gd Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
Player.tscn Complete "Your first 2D game" tutorial 2024-01-14 16:44:50 -08:00
project.godot Add controller support 2024-01-14 18:41:04 -08:00
README.md Add controller support 2024-01-14 18:41:04 -08:00

Godot 2D game

A simple 2D game made in the Godot game engine, based on the "Your first 2D game" tutorial. Note: I've linked the Godot 4.2 docs because that's the version of the tutorial and the version of the engine I used. I have added some minor additional functionality, which can be seen with the commit history:

  1. The initial commit follows the tutorial directly, no changes.
  2. The following commits are built on top based on my own learning.

Quick start

  1. Open this project in the Godot Editor.
  2. Press "Run Project".

Controls

Keyboard:

  • Enter: start game
  • Arrow keys: move player
  • Esc: quit

Controller (tested on an Xbox controller, and some generic controllers):

  • Start or "A" button: start game
  • D-pad or left joystick: move player
  • "Back" button: quit

The "back" button may refer to the actual back button on an XBox controller, or something equivalent, like the select button on an NES-style gamepad.