Gododin Gododin Documentation

Chapter 1 of 5

Getting started

Gododin adds compiled Odin components to a Godot game. Keep scenes, input, UI and presentation in Godot; put the computation and data you want to own in Odin. It is a useful fit for simulations, procedural generation, bulk data processing and native libraries. You should know basic Godot scene editing and Odin structs, procedures and explicit allocation. Odin files produce native Godot classes; they are never attached as Script resources.

This compact guide follows Ripple Pond: one native RipplePond node steps a grid of water, while GDScript displays it. Start by running a small working slice, then add a method and observe your own code change. For the broader picture and help deciding whether it fits your game, read Gododin at a glance.

  1. Getting started — run Ripple Pond and see the native component at work.
  2. Writing native code — add a method, use it from GDScript, and understand state, properties, signals and engine calls.
  3. The development loop — change that method, observe the new result, then debug, test and recover.
  4. Common patterns — bulk data, workers and baking.
  5. Shipping and updating — profiles, exports and SDK changes.

Read the first three together; consult the last two for a particular task. Detailed lookup stays in CLI help, source and generated API documentation.

Start with a configured project

The guide starts with Gododin connected to your project and uses a configured copy of Ripple Pond. If you need to prepare one, follow Installation and project setup once, then return here.

Optional shell examples later in this guide use two paths:

sh
sdk="/absolute/path/to/gododin-sdk"
project="/absolute/projects/ripple_pond"

Use absolute paths without symlink components. The SDK location belongs to this machine; the game's gododin.toml and gododin.lock belong in version control. Your editable game lives at the configured godot_project_root; generated files and accepted build snapshots are produced from that workspace.

See the first native result

Open the configured authored game from Godot's Project Manager. The Gododin dock connects automatically and builds native code. Inspect the RipplePond child in the main scene: its saved damping is 0.991. Save your work and press F5 / Run Project. F6 / Run Current Scene retains Godot's usual scene selection. A native compile error blocks Play and appears in the dock.

The shell paths above are needed only for the later automation examples. gododin editor and gododin run remain available for CI and recovery.

Press 2 to select Odin (native) and click the water. Waves and the HUD's signal message confirm that Godot called the native component and received its result. GDScript still owns the texture, input and UI. The example README has the complete controls and test modes.

Follow the small native seam

The useful slice is four calls: configure creates the pond, splash disturbs it, step advances the water, and frame_bytes returns one packed frame for Godot to display. The component also exposes a stored damping property and emits a splashed signal. GDScript chooses when to call it; the hot loop and its buffers stay together in Odin.

The complete implementation has three parts:

For a new game, build outward from that small slice. For an existing game, keep its scene and GDScript orchestration, add a native node, and move one substantial operation behind its API. The next chapter shows how to wire it into your own scene and explains the code you maintain.

Continue with Writing native code.