25 March 2025 - Steam, Soundtracks, and Terrain
<<< Previous Post
Next Post >>>
I've made a lot of progress over the past few days, but alas, the time has come for one of those retrospectives where I look over everything I have done and solidify existing systems. I've also got some news so this is kind of one of those "mixed bag" posts.
Steam
I am happy to announce that I have paid Lord Gaben the fabled $100, so The Conservatory now has a Steam Store page! This page is private until I am ready for my testing phase, but don't worry - you'll know when it's up, because I'll be asking you all to wishlist it or join the tests that I host.
Having a proper Steam store page is a huge milestone for me, as it kind of symbolizes how far I have come on this project. I'm so excited!
Music (and YouTube)
For those of you who have been keeping a closer eye on things, you'll know that I have been learning how to write music, to compose my game's soundtrack.
Now I'm brand spankin' new to music. I don't know anything, and everything I have made thus far is purely based on what "feels good" (and as far as I can tell, this is an outstanding way to make music).
With that, I am excited to be able to share with you the first song I have ever written! This YouTube video is also on the official channel for my business, though I doubt I will ever use it much beyond releasing the soundtrack, and maybe some devlogs.
A short story, for the song...
Sure, they might have been considered religious zealots by some, even though it is widely known that The Conservator of this Universe is very much real... Still, if that fact alone was somehow not enough to validate who they were, it seems that The Conservator personally designed and delivered special, highly advanced technology directly to them. They claim they received it in order to aid their research of Ether, the starry, celestine fluid seen throughout the deepest, most primordial lattices of creation.
In a way, it was almost as if they had been given a divine laboratory. Some think it was a reward for their faith. Others think that The Conservator simply finds a certain joy in seeing Its children figure out what makes The Universe tick. Regardless, the work they have done since then is nothing short of awe-inspiring.
Terrain
One constant point of pain has been the world generator. In the Discord (which you can get to on the home page), I've mentioned some recent changes to it, but those are in the ramblings channel and only small tidbits of what to expect. It's still running old code that I was tinkering with, and to be frank, it's still pretty slow. As much of a joke as it is to compare any voxel game with Minecraft, I think here it's actually a very good comparison to make since it's the de facto standard of how fast a voxel game's world should load.
Frankly, taking upwards of 20 seconds to load an 8x8x8 render distance of chunks is actually abysmal, no beating around the bush.
While this decision does kill some time and delay things, it is vital that the terrain generator gets a rewrite. For a rundown of what has happened over development:
- The first terrain system used multithreaded design but with very basic locking. Multiple chunks could be generated, but access to a chunk was exclusive, and one at a time. Things had to queue up.
- Notably, this system was kind of janky. I wrote my code defensively, that is, I made it try to handle errors and make guesses for what was meant to be happening. Lots of obscure and hard to trace bugs come from this sort of design!
- The second (and current) system makes use of RW locking, which is the same as what I did with inventories in the last blog post: Several things can read at once, but only one thing can write at a time. This dramatically improves access efficiency, while still retaining the safety guaranteed by locking.
- This system is extremely strict. Even the slightest mishap in data handling purposely crashes the game to prevent even a semblence of data corruption. The issue with this one is that error handlers were being triggered in the first place. My design is not good enough!
If you wonder what "locking" is, it's useful in multithreaded code. An excellent analogy, and one that I have used before, is to imagine threads like people with pencils. The computer's memory is writing seen on a sheet of paper.
In traditional single-threaded environments, this is as straightforward as it gets. The man reads his page, or writes on it.
In multithreaded environments, things get complicated. Generally, it's safe for everyone to read stuff that's on the paper together even if all at once. Things go awry when you have several people trying to write at the same spot on the paper at the same time. That doesn't exactly work too well, now does it? There's also some issues of scenarios like, what if someone reads text that someone still hasn't finished writing yet?
This is all resolved by locking. Locking provides a way for one of our metaphorical writers to say "Hey everyone, I need to write something down, don't write at the same time as I am." - and then all the other people will wait if they need to write. The RW locking I mentioned prior goes an extra step, and basically adds "Oh, and if you need to read this paragraph, wait a bit, that's the one I'm working on" to that sentence. This ensures everyone gets safe access to the data, and no one conflicts with each other.
As it stands now, however, the current system is still too heavy. It's big and slow. The code is also unclean, with functions blurring into each other. I'll spare the fine details, but this is part of why it's so slow. The design isn't functional enough.
Thankfully, these current systems are not useless. They are an excellent leanring example, and I understand precisely what I need to do to make the world generator fast.
Closing Thoughts
I'm looking forward to being able to actually show you all proper gameplay soon. I'll be honest: Nothing exists yet. It's still just backend system work. I've just started working on the frontend, the stuff you can see, and seeing all these months of work stitch together into something is truly amazing.
I encourage you all to join the Discord to keep up to date! Link is on the home page.