Dear Scholars,
It is time to finally give you some behind-the-scenes look at what makes Selenwald tick - especially that it has been a while since the last entry and you deserve something more than just a status update. This entry will be first one of a small series on the code architecture because the topic is too big for a single post.
The first thing I'd like to write about is the reasoning behind what has been in the works for a very long time. As I mentioned in the past, I have started a massive code rewrite exactly a year ago. It was never supposed to be a minor refactor or a mere clean-up but rather a complete change of the underlying architecture. Scary? Sure! Needed? Absolutely.
But why?
The Core
But what this "architecture" thing even is? It's basically code that serves as a foundation for everything else, the relations between data structures and systems, as well as rules for writing specialized logic. Some of it is defined by the engine - Unity in this case. For example, the base building blocks in Unity are scenes which contain game objects, which in turn can be saved as prefabs to serve as reusable pieces you can edit in one place and see the changes reflected in all their instances. Game objects (and thus prefabs) contain code blocks called components - either built-in (like Rigidbody, Mesh Renderer, Light, etc.) or custom scripts. Another important element of the whole ecosystem are scriptable objects which (among other uses) are a very handy way to store data that can be shared among various unrelated prefabs.
The way the engine is structured imposes a specific workflow. However, sometimes it is necessary to think outside the box and create your own foundations that are still connected to the engine's way of handling things, but offer a different interface at a higher level. For example, it is natural to have every level on a different scene as this automatically handles loading appropriate assets to memory and unloading them when the level changes. But there are some cases where the entire game could sit on a single scene. This can be a viable approach in procedural games like Selenwald because the way of loading and unloading data needs to be handled in a custom way. After all, we don't know which assets are needed at a given level until we actually generate it. This is just a simple example but sometimes other seemingly critical parts of the engine become a hindrance and need to be reinvented. In Selenwald's new architecture I've almost entirely moved away from prefabs. This is something unthinkable for most Unity developers but this was a truly liberating change for this project. Why? I'll get to the technical details in the next entry. Don't worry - this time you won't have to wait several months for it! I'll do my best to write it before the end of December.
Anti-Vacation
Finally, I'm excited to report that I'm soon taking a vacation from my day job. And it's going to be a long one because I haven't used almost any of the paid time off available for me ever since I started the job in April. It's going to be a whole month, starting on December 7th and ending on January 6th. I honestly totally forgot about how much vacation time I have available so this came off as a bit of a surprise. Of course, I'm going to spend most of it working on Selenwald which excites me a lot because the last time I was able to spend an extended time working exclusively on it was December 2023, so almost an entire year ago. I hope I will use this opportunity to catch up a bit and finally get the demo close to the state which is functional enough to get some playtests rolling - something I had originally hoped to already have by now. I still can't give you any reliable date for the demo release but it's definitely getting closer and closer!
Also, a small reminder that if you want to support the development process, you can do it at Ko-fi.
Thank you for reading,
Wiktor