This game is built using the Godot Engine. Godot uses its own script and has a version where you can use C#. For the purposes of this game, GDScript is used as most tutorials and guides are written in this script.
- Install Godot
- Clone this repository
- Locate Main.tscn in src/Main and double click it
- Press F6 to run these scene
- Select a scene file (.tscn extension)
- Press F1 to display the scene, scene tree will be displayed on the left
- Select a node (anything named) on the scene tree and press CTRL + A to add a new node as a child
- Select a node on the scene and view the Inspector on the right to edit its attributes
- Use this to edit label texts, adjust the size of the container, and margins of the conatiner.
- I can't move a node in the 2D viewport
Some GUI nodes like VBoxContainer and HBoxContainer take control of where their children are displayed and Godot won't allow you to move those children manually in the viewport. These nodes act similar to Web Dev components like Flexbox and Grids. Think of them as Flexbox parent containers.
A few things you can do:
- With a child node selected, you can edit the size flags of it in the Inspector. Default is set to Fill, but you can select Expand so that node will take up any left over space. You can Shrink Center or Shrink End. You can adjust the minmum size in Rect and any extra margins in Margin.
- You can add a node that doesn't have restrictions like VBox, HBox, or Margin such as a plain Control node or ColorRect if you want a background. Any child nodes added here can be moved manually in the 2D viewport.
Something like this:
MarginContainer
--ColorRect
----VBoxContainer/ Other Nodes
- Double click a script file (.gd extension)
- Press F3 to enter the script editor
Signals documentation here.
Code documentation for GDscript are found here.
Follow the best practices guide found here.
Keep Scene files and scripts associated with each other in the same folder. i.e. from the Docs
models
town
house
house.fbx
window.png
door.png
characters
player
player.fbx
player.png
enemies
goblin
goblin.fbx
goblin.png
npcs
suzanne
suzanne.fbx
suzanne.png
levels
riverdale
riverdale.scn
List of tutorials collected by Godot here