Basic Setup Guide
This guide covers the essential setup steps for your Godot project to work with Argode.
Setup Autoload
- Open Project Settings (
Project → Project Settings) - Go to Autoload tab
- Add ArgodeSystem:
- Path:
res://addons/argode/core/ArgodeSystem.gd - Node Name:
ArgodeSystem - Check Enable

Set as Main Scene
- Create a new scene (
Scene → New Scene) if you haven't already, and save it (e.g.,Main.tscn). - Go to Project Settings (
Project → Project Settings). - Under the Application → Run section, set Main Scene to your
Main.tscn(or whatever you named your main scene).
Prepare Visual Layers
Argode utilizes Godot's CanvasLayer nodes to manage the visual depth and display of backgrounds, characters, and UI elements. While you can manually set up these layers, Argode provides a streamlined approach using the ArgodeScreen node.
Recommended Approach: Using ArgodeScreen (Simplest)
The ArgodeScreen node (found at res://addons/argode/ui/ArgodeScreen.tscn) is a pre-configured Control node designed to simplify layer management. It automatically handles the creation and assignment of CanvasLayer nodes for common roles (background, characters, UI, effects) when its "Auto Layer Expansion" property is enabled (which is the default).
- In your main scene (
Main.tscn), add anArgodeScreennode as a direct child of your root node. - Ensure the
ArgodeScreennode's "Auto Layer Expansion" property is enabled in the Inspector (it's usually on by default). -
Your scene tree will look like this:
- Main (Node2D or Control) - ArgodeScreen (Control) - Background (CanvasLayer) - Characters (CanvasLayer) - UI (CanvasLayer) - Effects (CanvasLayer)The
CanvasLayernodes created byArgodeScreenwill have theirLayerproperties automatically set to appropriate values for visual depth.
Alternative: Manual CanvasLayer Setup (Advanced)
For advanced users or specific project needs, you can manually create and configure CanvasLayer nodes.
-
In your main scene (
Main.tscn), create the followingCanvasLayernodes as direct children of your root node:- Background Layer: For displaying backgrounds. Set its
Layerproperty to a low value (e.g.,0or1). - Characters Layer: For displaying characters. Set its
Layerproperty higher than the background (e.g.,2or3). - UI Layer: For displaying user interface elements. Set its
Layerproperty to a high value (e.g.,10or100). - Effects Layer: (Optional, but recommended) For displaying screen-wide effects. Set its
Layerproperty to the highest value (e.g.,200).
- Background Layer: For displaying backgrounds. Set its
-
Your scene tree might look something like this:
Initialize ArgodeSystem
In the script attached to your main scene (Main.tscn), you need to initialize ArgodeSystem by mapping the CanvasLayer nodes you've prepared to their respective roles.
# Main.gd (attached to your Main scene's root node)
extends Node2D # Or Control, depending on your root node type
func _ready():
# Map your CanvasLayer nodes to Argode's layer roles
# If using ArgodeScreen, access its child CanvasLayers
var layer_map = {
"background": $ArgodeScreen/Background, # Or $BackgroundLayer if manual setup
"character": $ArgodeScreen/Characters, # Or $CharactersLayer if manual setup
"ui": $ArgodeScreen/UI, # Or $UILayer if manual setup
"effects": $ArgodeScreen/Effects # Or $EffectsLayer if manual setup (Optional)
}
# Initialize ArgodeSystem
if ArgodeSystem.initialize_game(layer_map):
print("ArgodeSystem initialized successfully!")
# Start your first RGD script
ArgodeSystem.start_script("res://scenarios/main.rgd", "start")
else:
print("ArgodeSystem initialization failed.")
# Handle initialization errors (e.g., display an error message)
Run Your Project
Press F5 to run your project. If everything is set up correctly, Argode will initialize, and your res://scenarios/main.rgd script will begin executing.