A C++ 2D isometric grid application using SFML that features a dynamic camera system to navigate through an isometric map, showcasing an integration of grid layout, infinite world generation, chunk system, camera movement, and rendering culling. This technical demo builds upon previous work by exploring these features in an isometric perspective, offering a robust foundation for further experimentation.
IsometricGrid.Demo.mp4
Key Features:
-
Infinite & Async World Generation: Chunked world generation with caching. Uses
std::future/std::asyncfor background generation so it doesn't block the main render loop. -
Procedural Terrain: Perlin noise--based terrain height creates natural-looking variations across multi-layer isometric tiles (
GRID_LAYERS), including variants for water, dirt, and ground. -
Optimized Rendering: Implements strict view culling and visible-chunk calculation to ensure the engine only draws what's strictly needed.
-
Resource Management: Features a built-in texture manager (simple loader and scaling) alongside a flexible
celltype that optionally holds a sprite. -
Smooth Navigation & Testing: Smooth camera controls (WASD) with an FPS counter in the window title. Includes an easy regeneration feature (press
R) to re-seed and refresh the world for quick testing. -
Educational Architecture: A clean, small codebase specifically suited for learning SFML rendering, chunk systems, and coordinate transforms (cartesian ↔ isometric).
- Use WASD to move the camera and explore the grid.
- Refresh the Grid: Press R to refresh the grid.
1. Download SFML SDK from https://www.sfml-dev.org/download/ and extract to some folder (example C:\libs\SFML-3.0.0).
2. In your project root (where CMakeLists.txt is), run:
# optional: remove old build
Remove-Item -Recurse -Force build
# configure (point to the SFML SDK)
cmake -S . -B build -DSFML_DIR="C:/libs/SFML-3.0.0/lib/cmake/SFML"
# build (Release)
cmake --build build --config Release-
Resulting executable:
build/bin/Release/IsometricGrid-SFML.exe -
The included
CMakeLists.txtwill automatically try to copy SFML.dllfiles (when-DSFML_DIRis provided) and all.pngassets next to the executable to make the result run out-of-the-box.
If the exe complains about missing DLLs, either:
-
make sure you used
-DSFML_DIRpointing at the SDK, or -
manually copy
SFML_ROOT/bin/*.dlltobuild/bin/Release.
On Debian/Ubuntu you can install SFML via apt:
sudo apt update\
sudo apt install build-essential cmake libsfml-dev
# from project root\
rm -rf build\
cmake -S . -B build\
cmake --build build --config ReleaseExecutable usually at build/bin/IsometricGrid-SFML (or build/bin/Release/IsometricGrid-SFML depending on generator).
-
Detects project layout (works if
CMakeLists.txtis in repo root or insideIsometricGrid-SFML/) -
Tries SFML 3 (
Graphics,Window,System) and falls back to SFML 2 component names when needed -
Copies
.pngassets from the source folder into the runtime directory after build -
If you pass
-DSFML_DIR=".../lib/cmake/SFML", CMake will attempt to locate SFML'sbinfolder and copy.dllfiles to the executable's folder (Windows), making the binary runnable without manual DLL copy
-
Missing
sfml-window-3.dll/ other SFML DLLs-
Ensure you invoked
cmakewith-DSFML_DIRpointing to the SFML SDK. -
Or copy
SFML_ROOT/bin/*.dllto the exe folder manually.
-
-
CMake can't find SFML
- Use:
-DSFML_DIR="C:/path/to/SFML/lib/cmake/SFML"or-DCMAKE_PREFIX_PATH="C:/path/to/SFML".
- Use:
-
Executable opens then immediately closes
- Run the executable from a terminal to see errors (DLLs, runtime prints).
-
Download and extract SFML
- Download the SFML SDK (ZIP file) from the SFML Download Page
- Extract it to your preferred location (e.g.,
D:\libs\SFML-3.0.0)
-
Configure Visual Studio
In Project's properties, update the following paths:C/C++ > General > Additional Include Directories→"<sfml-install-path>/include"Linker > General > Additional Library Directories→"<sfml-install-path>/lib"Linker > Input > Additional Dependencies→ Add"sfml-graphics.lib","sfml-window.lib","sfml-system.lib"
-
Need help setting up SFML?
Check out my SFML Visual Studio Template for a preconfigured project: SFML-VS-Template
- C++17
- SFML 3.0+
- Visual Studio

