Getting Started
Frond supports multiple engines. Godot is the primary target for its accessibility and modding story.
Engine Options
| Engine | Language | Status |
|---|---|---|
| Godot | GDScript | First target |
| Bevy | Rust | Planned |
| Unity | C# | Planned |
| Love2D | Lua | Planned |
Godot Setup
Prerequisites
With nix flakes:
bash
nix develop # godot_4 includedOr install Godot 4 manually from godotengine.org.
Development Workflow
- Write GDScript patterns - frond provides composable utilities
- Test headlessly - no editor needed for quick iteration
- Integrate in editor - attach to scenes when ready
Headless Testing
Run GDScript without opening the editor:
bash
# Run a script directly
godot --headless --script res://tests/test_fsm.gd
# Run with quit after (for CI)
godot --headless --script res://tests/test_fsm.gd --quitExample test script:
gdscript
# tests/test_fsm.gd
extends SceneTree
func _init():
var fsm = preload("res://addons/frond/fsm.gd").new()
fsm.add_state("idle")
fsm.add_state("run")
fsm.add_transition("idle", "run", func(): return Input.is_action_pressed("move"))
# Test transitions
assert(fsm.current_state == "idle")
fsm.process(0.016) # simulate frame
print("FSM test passed")
quit()Project Structure
my_game/
├── addons/
│ └── frond/ # frond GDScript library
│ ├── fsm.gd
│ ├── timing.gd
│ └── stats.gd
├── scripts/ # your game code
├── tests/ # headless test scripts
└── project.godotRust Core (Optional)
For performance-critical features (spatial queries, pathfinding), use the Rust core via GDExtension:
toml
# Cargo.toml
[dependencies]
frond-spatial = "0.1"
frond-pathfinding = "0.1"
godot = "0.2" # gdextThe GDScript layer calls into Rust for heavy computation while keeping game logic moddable.
Next Steps
- State Machines - FSM patterns
- Character Controllers - Kinematic movement
- Philosophy - Design principles