It’s been a long time since the last update – exactly 993 days. Luckily, there are new features coming in, what lead to implementing… trees!
I pushed 122 new commits since the last update, current total 282. What has changed?
Trees
A completely new feature, you can paint trees over terrain. Brush supports modifiers:
Shift
increases brush radiusCtrl
decreases brush radiusAlt
will switch to single tree placement mode
Placing building or a road will remove all trees on affected tiles.
New rendering pipeline
I spent majority of time implementing a new rendering pipeline for objects. After engine loads models through Assimp, new renderer packs them up to a single buffer for static geometry. It also holds definitions of materials (basic Phong shading right now). On flush()
renderer sorts all draw commands to minimize state changes and sends OpenGL batches to GPU. Instancing is supported with transform matrices per instance.
New collision system
I created a new, simpler collision system where bodies are separate from game object representation. With layers, you can for example place a road which crosses another one, but not a building. This also fixes a few weird quirks when placing roads.
Game saves
Combinations Ctrl+S
and Ctrl+L
will save/load buildings, roads and camera position. This is a feature from 2018, I’m yet to port it to new collision system (in February?).
Code repository
Go and see https://github.com/kantoniak/konstruisto. There are Star and Watch buttons in the sidebar (right). Repository contains setup scripts for both Visual Studio and makefile
/clang++
. Have fun!
Great content! Super high-quality! Keep it up! 🙂