Tile based 3D city builder maked from scratch with OpenGL.
- Runs on Windows and Linux
- A fixed time step game loop which process input events, update and render game objects
- Logging, Exceptions, Assertions
- OpenGL renderer
- Event system
- ImGui based menus
- Configurable with a config.ini
- A skybox for a nice background
- A camera that allows us to move freely
- Terrain manipulation (raise and lower)
- Tile selection
- Different tiles for residential, commercial, industrial and traffic zones
- The game determines if zones are connected, e.g. with a road.
- A road network can be built.
- Animated water surfaces
- Loads 3D models made in Blender (so we can load plants, trees, buildings etc.)
- Select buildings via menu
- Align game objects to the grid and highlights the tiles in color
- A complete city with simple gameplay
- Heightmap based terrain creation
- Load and save the city
- Win
- Linux
First, install the Conan package manager locally.
As this project relies on multiple 3rd-Party Libs, I created a conanfile.txt with all the requirements.
[requires]
glfw/3.3.5
glew/2.2.0
glm/0.9.9.8
spdlog/1.9.2
imgui/1.86
assimp/5.1.0
[generators]
premakeMy favor build configuration tool for Windows is Premake5. Premake5 can generate Makefiles and Visual Studio Solutions with a single description file for cross-platform projects. Download Premake5 to your preferred location.
Complete the installation of requirements for the project running:
$ conan install conanfile_win.txt -s build_type=Debugor
$ conan install conanfile_win.txt -s build_type=Releasefollowed by:
$ premake5 vs2019First, install the Conan package manager locally.
If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this with the following commands:
$ conan profile new default --detect # Generates default profile detecting GCC and sets old ABI
$ conan profile update settings.compiler.libcxx=libstdc++11 default # Sets libcxx to C++11 ABIAs this project relies on multiple 3rd-Party Libs, I created a conanfile.txt with all the requirements.
[requires]
glfw/3.3.5
glew/2.2.0
glm/0.9.9.8
spdlog/1.9.2
imgui/1.86
assimp/5.1.0
[generators]
cmakeComplete the installation of requirements for the project running:
$ conan install conanfile.txt -s build_type=Debug --build missingor
$ conan install conanfile.txt -s build_type=Release --build missingIf the following error occurs: ERROR: opengl/system: Error in package_info() method, line 80, then pkg-config must be installed first.
$ mkdir build
$ cd build
$ cmake ..
$ make
$ cd src/bin
$ ./SgCitySgCity is licensed under the GPL-2.0 License, see LICENSE for more information.
