Skip to content

Make a first change

Everything in game\ is yours now. This page changes three things you can see, so you know the whole loop works: edit, build, run.

  1. Change the greeting. In game\states\hello_state.cpp, find where the greeting is created:

    samples/minimal/states/hello_state.cpp
    this->greeting_ = this->scene_->add(std::make_unique<Label>(
    L"Hello from the engine.", font_name, this->position_, resources,

    Change its text:

    L"Hello from my game.", font_name, this->position_, resources,

    The L makes it a wide string, which is what the engine’s text drawing takes.

  2. Make it spin faster. Near the top of the same file, the speed is a constant beside the one thing it configures:

    samples/minimal/states/hello_state.cpp
    constexpr float spin_speed = 1.2f;

    Change 1.2f to 3.0f. The unit is radians per second.

  3. Name the window. In game\main.cpp, change the window’s class name and title:

    samples/minimal/main.cpp
    options.window_class_name = L"MinimalSampleWindowClass";
    // ASCII only: this file gets copied into new projects, and a wide
    // literal's encoding depends on how the compiler was told to read the
    // source.
    options.window_title = L"Labrador - minimal sample";
    options.window_class_name = L"MyGameWindowClass";
    // ...
    options.window_title = L"My game";
  4. Rebuild and run:

    Terminal window
    cmake --build --preset x64-debug
    out\build\x64-debug\game\MyGame.exe

    Only the two files you changed are compiled again. The window has your title, and your greeting circles faster.

The comments in hello_state.cpp explain why each part of it is written the way it is, and they are the best next thing to read. After that:

Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.