Game Project Structure
How a Nevo game project is organized and what each folder is for.
Overview
Nevo-base is the current reference game project. It contains game code, runtime assets, public engine headers copied from Nevo-Engine/shared, and generated engine binaries.
Nevo-base/
src/
game/
assets/
levels/
materials/
shaders/
systems/
textures/
include/
nevo/
lib/
build/
buildtmp/
CMakeLists.txt
build.bat
build.sh
run.bat
run.shCode
src/main.cpp is the application entrypoint. The reference flow is:
- Set up crash/logging handlers.
- Create the singleton
Public::Engine. - Pass command-line flags through
GetFlagManager().passFlags(argc, argv). - Register custom scene component creators with
Engine::RegisterComponent(...). - Call
engine.Initialize(). - Register custom ECS component types and systems with the
Coordinator. - Set system signatures.
- Load a scene with
engine.LoadScene("scene_name"). - Call
engine.Loop()whileengine.IsActive(). - Call
engine.Shutdown().
Runtime Assets
game/ is the runtime working directory.
| Folder | Purpose |
|---|---|
game/levels | JSON scene files loaded by Engine::LoadScene. |
game/assets | Meshes and model files such as .glb, .gltf, and .obj. |
game/materials | Material JSON files referenced by mesh renderers. |
game/shaders | Shader JSON metadata plus GLSL/HLSL shader files. |
game/textures | PNG textures used by materials and LUTs. |
game/systems | Game-owned C++ components and systems, such as Freecam and MonkeyRot. |
Scene loading searches in this order:
<name>.jsonlevels/<name>.jsonscenes/<name>.json
So engine.LoadScene("outside") resolves game/levels/outside.json in the reference project.
Public Engine Headers
Game code should include public engine headers from include/nevo after artifacts are synced:
#include <EngineExports.hpp>
#include <ECS/components/Transform.hpp>
#include <ECS/components/Rigidbody.hpp>
#include <ECS/systems/builtin/PhysicsSystem.hpp>Those files are copied from Nevo-Engine/shared. Avoid including include/internals/** from game code.
Binaries and Generated Output
| Folder | Purpose |
|---|---|
lib/ | Engine runtime libraries copied from engine builds. |
build/ | Runnable game executable and runtime DLL copy. |
buildtmp/ | CMake intermediate build directory for the game. |
include/nevo/build_number.hpp | Generated build number header copied from the engine. |
Build scripts can rewrite binaries and copied headers. Inspect git status before committing artifacts.
Custom Systems
Game systems are regular C++ types. Nevo-base keeps examples under:
game/systems/freecam/
game/systems/monkeyrot/A custom component that can be loaded from scene JSON needs two registrations:
engine.RegisterComponent("Freecam", CreateFreecamComponent);
engine.Initialize();
auto& coord = engine.GetCoordinator();
coord.registerComponent<Freecam>();
auto system = coord.registerSystem<FreecamSystem>();Engine::RegisterComponent maps the JSON "type" string to a creator function. Coordinator::registerComponent registers the C++ component storage.
