Early March Progress


A relatively brief update this week (by my standards). Received word part-way through the week that I'm moving office (after lightning strikes, unconscious naked girls and vandalism we're glad to move!), so my dev-cycle was interrupted. There's no new pre-alpha release this week, because I'm in the middle of things. It also nixed any chance of doing a 7DRL, so I'll just have to be satisfied with theone I already made.

First of all, some bad news: I've decided not to support OS X. I keep running into things that would be easier with a newer version of OpenGL (compute shaders, especially) - and Apple just don't want to support it (and it's really buggy sometimes). It was a major source of stress anyway, so it's better for me overall. Hopefully this won't generate too many grumbles!

Camera rework

Thanks to u/darkgnostic (on Reddit) for pointing out the perspective issue last week! I added the option to switch perspective on and off, and added all 4 diagonal views - so you can be pretty sure that terrain won't obstruct your view. Turning perspective off definitely makes it easier to designate a large construction project - but turning it on makes it a lot prettier for watching the fun. I also found the black background annoying, so I added a simple skyshader.

UI Work

Updated to ImGui 1.53, which killed the tabs solution I was using (but fixed a bunch of other stuff). I looked long and hard and at the tabs code, and concluded that it wasn't really fixable in a lasting manner (and I don't really want to maintain a fork) - so I replaced it. I added in some consistency items (escape always closing panels, close buttons in the right place, game pausing when you are on an information window, windows being the same size), and also zebra-striping on big tables of data (much more readable).

Keyboard Support

I've always liked not having to reach for my mouse in Dwarf Fortress, and I'd like NF to be the same (but with good mouse support if you want it!). To that end, I started working through all of the designations systems ensuring that you can navigate with the cursor keys (and shift-cursor to move the map). For paint modes, brush selection/resizing can all be done from the keyboard. Enter works as a click, and backspace works as a right-click. To make this nice to use, I standardized a few controls (so they always have the same shortcuts), and played the game in keyboard mode as much as I could.

Graphics Engine Work

* Updated the back-end to request OpenGL 4.3 or better.
* Updated all shaders to `430 core`, and tweaked one shader that was using a newly reserved keyword as a variable name. This alone led to a small performance increase on Windows (presumably not using a compatibility path anymore).
* Moved all the various camera uniforms into a Uniform Buffer Object (UBO) and shared it between shaders (updating only when it needs to). I was amazed at how much of a speed-up this gave.
* Went through the voxel code with a fine toothcomb. Found a couple of places where temporary structures weren't cleared/resized after uploading to the GPU. Total program RAM usage went down to 1.2 GB!
* Rewrote the voxel rendering path to use newer OpenGL techniques. It looks exactly the same as before, but is 4 times faster. All voxel models now share a single buffer (no more context switches!), and all instanced-rendering data shares an SSBO and is dispatched with glDrawArraysInstancedBaseInstance. It cut the number of interactions with the GL driver by a HUGE amount (now I feel like I should do the same for the terrain!). I didn't really need the speedup *yet* - but now I can add a LOT more models and be confident that it won't stall on me.

Get Nox Futura

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.