Project Structure

How the on-disk pieces of a game project fit together — the scene, material, and project file formats you author, and what a shipped build produces.

A game project on disk

A project (created and opened through the Hub) keeps everything under one folder:

FolderHolds
assets/Everything the game uses — scenes, materials, textures, meshes, audio, UI, behaviour trees.
assets/scripts/Your native C++ gameplay scripts and systems. Source, compiled into the game; the packer drops it rather than shipping it as data. See Scripts & IDE Workflow.
Older projects kept scripts in a sibling scripts/ folder. Opening one migrates it into assets/scripts/ automatically — unless both folders have files, in which case the editor leaves them alone rather than guess how to merge them.

Scene files (.thread)

YAML, serialized by SceneSerializer. Top-level keys:

Scene:
  Skybox:    [px.png, nx.png, py.png, ny.png, pz.png, nz.png]
  Entities:
    - Entity:        4294967296          # entt::entity raw ID (not persisted across rebuilds)
      IDComponent:   { UUID: 17263... }  # the stable identifier
      TagComponent:  { Tag: "Sun" }
      TransformComponent:
        Translation: [0, 5, 0]
        Rotation:    [-0.785, 0, 0]
        Scale:       [1, 1, 1]
      DirectionalLightComponent:
        Color:     [1, 1, 1]
        Intensity: 1.5
        Enabled:   true

The serializer order-reverses entities on write to compensate for EnTT's reverse-iteration view, so the hierarchy panel keeps the same order across Play / Stop cycles.

Project files (.tproj)

One YAML per project, opened via the Hub. Stores:

  • Name — display name.
  • RenderAPI — the backend the editor and the game use (DirectX 11, DirectX 12 or Vulkan).
  • ProjectDirectory — root path.
  • AssetPath — relative subdir (usually assets).
  • StartScene — relative path to the boot scene.

Build artefacts

File ▸ Build Project… opens Build Settings — the scene to ship, the target platform (Windows or Linux), the output folder — and its Build button runs BuildSystem:

  1. Takes the output folder from Build Settings.
  2. Generates a standalone CMake project (THREAD_BUILD_STANDALONE=ON, THREAD_WITH_ASSIMP=OFF) around a minimal runtime entry point.
  3. Runs cmake --build in Release mode.
  4. Copies the resulting .exe and any DLL deps to the output dir.
  5. Merges the engine, editor and project asset folders, runs the mesh precompile step (FBX/OBJ/glTF → .tmesh + drop source), then packs into assets.pak via PackBuilder.
  6. Cleans up the temp dirs.

Shipped game = the executable (YourGame.exe on Windows) + assets.pak + the runtime libraries it needs. No Assimp, no editor-specific code, no ImGui.

See also

Engine Architecture · Asset Pipeline

Struktura projektu

Jak łączą się elementy projektu gry na dysku — formaty scen, materiałów i pliku projektu, które tworzysz, oraz co daje gotowy build.

Projekt gry na dysku

Projekt (tworzony i otwierany przez Hub) trzyma wszystko w jednym folderze:

FolderZawartość
assets/Wszystko, czego używa gra — sceny, materiały, tekstury, siatki, audio, UI, drzewa zachowań.
assets/scripts/Twoje natywne skrypty i systemy gry w C++. Źródła, kompilowane do gry; packer je pomija zamiast wysyłać jako dane. Zob. Skrypty i IDE.
Starsze projekty trzymały skrypty w sąsiednim folderze scripts/. Otwarcie takiego projektu automatycznie przenosi je do assets/scripts/ — chyba że oba foldery mają pliki; wtedy edytor ich nie rusza, zamiast zgadywać, jak je połączyć.

Pliki scen (.thread)

YAML, zapisywany przez SceneSerializer. Klucze najwyższego poziomu:

Scene:
  Skybox:    [px.png, nx.png, py.png, ny.png, pz.png, nz.png]
  Entities:
    - Entity:        4294967296          # surowe ID entt::entity (nie trwałe między przebudowami)
      IDComponent:   { UUID: 17263... }  # stały identyfikator
      TagComponent:  { Tag: "Sun" }
      TransformComponent:
        Translation: [0, 5, 0]
        Rotation:    [-0.785, 0, 0]
        Scale:       [1, 1, 1]
      DirectionalLightComponent:
        Color:     [1, 1, 1]
        Intensity: 1.5
        Enabled:   true

Serializer przy zapisie odwraca kolejność encji, żeby skompensować odwróconą iterację widoków EnTT, więc panel hierarchii zachowuje tę samą kolejność przez kolejne Play / Stop.

Pliki projektu (.tproj)

Jeden YAML na projekt, otwierany przez Hub. Przechowuje:

  • Name — nazwa wyświetlana.
  • RenderAPI — backend używany przez edytor i grę (DirectX 11, DirectX 12 albo Vulkan).
  • ProjectDirectory — ścieżka główna.
  • AssetPath — podfolder względny (zwykle assets).
  • StartScene — względna ścieżka sceny startowej.

Wynik builda

File ▸ Build Project… otwiera Build Settings — scena do wydania, platforma docelowa (Windows albo Linux), folder wyjściowy — a ich przycisk Build uruchamia BuildSystem, który:

  1. Bierze folder wyjściowy z Build Settings.
  2. Generuje samodzielny projekt CMake (THREAD_BUILD_STANDALONE=ON, THREAD_WITH_ASSIMP=OFF) wokół minimalnego punktu wejścia.
  3. Uruchamia cmake --build w trybie Release.
  4. Kopiuje wynikowy plik wykonywalny i potrzebne biblioteki do folderu wyjściowego.
  5. Łączy foldery assetów silnika, edytora i projektu, wykonuje prekompilację siatek (FBX/OBJ/glTF → .tmesh + pominięcie źródła), a potem pakuje wszystko do assets.pak przez PackBuilder.
  6. Sprząta foldery tymczasowe.

Wydana gra = plik wykonywalny (YourGame.exe na Windows) + assets.pak + biblioteki uruchomieniowe, których potrzebuje. Bez Assimpa, bez kodu edytora, bez ImGui.

Zobacz też

Architektura silnika · Potok zasobów