The SDK ships three sample projects insideDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Excurs1ons/PrismaEngine/llms.txt
Use this file to discover all available pages before exploring further.
sdk/samples/. Each sample is a self-contained CMake project that demonstrates a different level of engine integration — from a minimal render loop all the way to a feature-complete voxel game starter. You can build and run them directly against a local engine build or a prebuilt SDK, and you can copy any sample as a starting point for your own game.
Sample overview
BasicTriangle
Minimal runnable app. Covers window creation, platform initialization, and a frame loop with
BeginFrame / EndFrame / Present.BlockGame
Game logic patterns. Covers input handling, simple world generation, player movement, AABB collision detection, and block placement.
PrismaCraftStarter
Voxel/craft game starter. Integrates PrismaEngine with the PrismaCraft library for chunk loading, full block registration, terrain generation, and a basic inventory system.
BasicTriangle
BasicTriangle is the smallest complete application you can write with PrismaEngine. It creates a window, initializes the render system, and runs a frame loop until the user closes the window. No game logic, no assets — just the engine lifecycle in its most direct form.Build commands
Full source: main.cpp
The complete source file for BasicTriangle demonstrates the canonicalIApplication<T> pattern. All three lifecycle methods — Initialize(), Run(), and Shutdown() — must be implemented. The LOG_INFO and LOG_ERROR macros write to the engine’s thread-safe logger.
IApplication<T> uses CRTP (Curiously Recurring Template Pattern). Your concrete class is the template argument. SetRunning(bool) and IsRunning() are inherited from the base class and control the main loop state.BlockGame
BlockGame demonstrates how to build game logic on top of PrismaEngine. It covers the patterns you need for any action game: a fixed-timestep game loop, keyboard and mouse input, a simple voxel world, player physics with AABB collision detection, and block placement and destruction.What it covers
| Feature | Description |
|---|---|
| Game loop | Fixed-timestep update loop with delta time |
| Input handling | Keyboard (WASD, Space, Shift, 1–9, ESC) and mouse (left/right click) |
| World generation | Procedural world with simple noise |
| Player movement | Movement, jumping, crouching, and acceleration |
| Collision detection | AABB-based collision against block geometry |
| Block interaction | Place and destroy blocks, select block types |
| Rendering | 3D scene rendering using PrismaEngine’s render system |
Code structure
Build commands
PrismaEngine::Engine and PrismaCraft::PrismaCraft. Make sure PrismaCraft_DIR is also set if you are building against a local PrismaCraft installation.
Controls
| Key / Button | Action |
|---|---|
| W / A / S / D | Move |
| Space | Jump |
| Shift | Crouch / accelerate |
| Mouse left | Destroy block |
| Mouse right | Place block |
| 1–9 | Select block type |
| ESC | Quit |
PrismaCraftStarter
PrismaCraftStarter is a full voxel game starter that combines PrismaEngine with the PrismaCraft library. It targets developers who want a Minecraft-style foundation with chunk loading, a complete block registry, terrain generation, and a basic inventory — ready to extend without building those systems from scratch.How it differs from BlockGame
| Feature | BlockGame | PrismaCraftStarter |
|---|---|---|
| Game engine | PrismaEngine only | PrismaEngine + PrismaCraft |
| Block system | Simple custom implementation | Full Minecraft block registry (50+ blocks) |
| World generation | Simple noise | Minecraft-style terrain, caves, structures |
| Chunk system | None | Full chunk loading and unloading |
| Entity system | Simple player | Full entity system |
| Inventory | None | Basic inventory system |
| Lighting | None | Simplified lighting system |
Build commands
Project structure
Using samples as project templates
Each sample is a self-contained CMake project. To use one as a starting point for your own game:Update the project name
Open
CMakeLists.txt and replace the project() name and add_executable target name with your game’s name.