RODINA

Milestone 1 Complete: Engine Work

Since I released the Rodina tech demo video a month and a half ago, I’ve been overwhelmed by the response and positive feedback the game has received. What was a quiet, personal project one day suddenly required tweeting, communication, and updates. It’s been a lot to take in but it’s also been quite wonderful. Thank you to everyone for your interest in the game!

I thought that the best way to balance these two responsibilities (creating the game and communicating with the public) is to organize my game updates the same way that I’m scheduling the production of the game itself- around milestones. Since a milestone is a big set of high-level features, this means that I won’t be giving out weekly updates on every little thing I make. But it also means I can focus on production without distraction. The first official milestone that is now complete is based around engine features, so without further ado, here’s what I’ve been working on!

  • Lua Integration
    The big task this month was getting Lua integrated into the game. Lua is a programming language that will run on top of the C++ code the engine is primarily written in. The biggest benifit of Lua is that, unlike C++, it can be reloaded on the fly while the game is running. This means that I can change the behavior of an object or an actor in the game and see it update in real time. If you’re familiar with the concept of Flow, then you know how important the ability to stay focused can be. I’m primarily a creative programmer rather than a technical one, so the ability to experiment with behaviors and quickly see the result is paramount. Additionally, this feature forms the basis of the player’s ability to reprogam ingame computers.

    As a result of this work, all entities in the game are now controlled by Lua code. I did the work necessary to constantly scan script files and reload them as they change. Finally, Lua was treating me so well that I added a second big task to this month’s update.

  • Procedural Textures
    While integrating Lua I had an idea- why not go a step further and, in addition to scripting entities, also script the renderer? This means that I will be able to reprogram rendering techniques in real time. The biggest function for this feature is a procedural texturing engine, which allows the game to generate high-quality textures without the use of art assets. Here’s some examples of what I’m talking about:



    On the left, we see an example of Fractal Perlin Noise. Next, a normal map for the noise is generated. On the right we see a slight distortion to the normal map.



    Detail of the distorted normal map. Somebody call MoMA, I think I’ve created Art!



    A sequence of procedural textures can become quite complicated (this texture uses Perlin Noise, Voronoi Noise, normal mapping, distortions, color gradients, and masking effects). I would love to devote more time to this someday and turn it into a full-fledged application. Currently I find it superior to other procedural texture engines because you can view all the textures at once, and they all update in real time as you modify options. Very important for keeping that Flow state I was talking about earlier.



    The final product of this particular sequence. This might be like something I would use to create the look of a planet surface as seen from space. I’ll be improving planets in a later milestone, so this will make a reappearance then.

    My intention is to use this system to create all of the UI art in Rodina, though that won’t come until a future update. I’m also hoping, though I haven’t tried this at all yet, to use the procedural texturing to create dynamic starfield skyboxes. We’ll see if there’s time to try that out!

  • Precision Issues
    One thing that I neglected to show in the tech demo were the various issues that come with having a game world the size of a solar system. Once you get far enough away from the origin, various weird things start to happen. Textures start to jiggle, character movement becomes choppy, the 3D models start to dance around as if they are being electrocuted. These are a result of the limited precision of floating point numbers. Fixing this was just a matter of identifying the various ways this problem can rear its head and fixing them all individually, either by using Doubles, or by centering things around common offsets, or what have you.



    Video would be much more suitable for showing just how much jiggling we’re talking about here. Not just the blurry terrain, but also character movement, vertices, everything.



    You can see the terrain is much sharper in this image. Precision issues fixed!
  • General Engine Improvements
    Honestly most of the month was taken up by projects too small to be of common interest. Suffice to say that there was much effort put in this month towards making the engine more thread-safe, getting the entity management to be significantly less-hacky, doing work on the renderer to improve dynamic lighting and alpha blending, caching shaders so that we don’t have to compile them when the game loads, reworking the atmosphere so that it can be more customizable, and many other small items.

    This particular goal is, obviously, never ending. I will always be making engine tweaks and upgrades and rewrites. However, it was important for me to schedule an entire milestone around the basic engine features because I felt that the game wasn’t quite ready for full production yet. Creating final versions of enities, UI, gameplay, etc all required that I solidify a few things. Now that this has progressed a bit more, I am ready to start work on the higher-level game features.

That’s it for this first update! For those of you who were hoping for more of a gameplay-related updated, I can only ask that you stay tuned- the next milestone (due date TBA) is centered around Enemies and Combat. The next few weeks is when Rodina goes from being a tech demo to being an actual game- I will be implementing AI-controlled ships that can fly around the player and engage in dogfights, and improving the controls to the player ship. If there’s time, it’d be great to add in the necessary special effects like smoke and explosions, but don’t quote me on that.

I know this won’t slate anyone’s appetite, but then again probably nothing will until the game is released. In the meatime, please feel free to engage with me on Twitter as well as on the discussion forums at Rodina.reddit.com. I’d be happy to talk more about anything in this update or about the game in general!