Konstruisto: Week #1 – World geometry

This week was a bit slower than previous (I pushed 24 commits, total 70) since I needed to introduce some graphical user interface. I went with NanoVG library, which lets me draw basic shapes and text. There’s a new top bar with essential information about the city. You can place buildings now. I worked a bit with geometry to make a foundation for zoning (you assign a zone, e.g. residential, and people build if you provide media, low taxes, etc.).

Previous week

We were placed by hand!

Video preview

I will have to start talking about these features to let you understand what’s going on 🙂

Changelog

  • Buildings of different size, geometry methods to prevent collisions
  • Placing buildings by hand, buildings of different height
  • Time passing in turns
  • Introduced UI library
  • Top bar with basic info
  • Pause state

Code repository

Repo is publicly visible, watch or star in the sidebar. Github URL is https://github.com/kantoniak/konstruisto. Comments on code are welcome; it helps me improve the project. Try to build yourself! Also, I’m positively surprised someone reads the code 🙂 Thanks to chyla@github.

Download

Windows x64: Konstruisto v0.0.0-3bc106d DEBUG WINDOWS
Linux x64: Konstruisto v0.0.0-3bc106d DEBUG LINUX

CONTROLS

Esc - pause state
Q, E - rotate view
Left click and drag - place building
Right click and drag - move view
Mouse scroll - zoom
N - toggle normals
~, 1-3 - change time speed
Ctrl + 1-9 - set new buildings height

Next week

I didn’t have time to start the asynchronous simulation; I still read a book on parallel computing. I would like to start that (and finish the book 🙂 ). I will go back to rendering and start roads implementation.