Latest Demo – April 2018






Download Lamorna Engine Tech Demo April 2018

[For 64 bit modern versions of Windows]

The last 6 months I’ve had my head down working to bring the engine’s systems to a professional level of quality. In the years spent pottering part time on the engine I found it sufficient just to get a system working then move on. Who wants to spend days on end pouring over minutiae when there’s animation and particle effects to work on? There was no compulsion to put in that final 10% to ensure the system was rock solid. As a result the engine’s functionality has been almost there, but not quite. The collision scheme is a good case in point, it worked most of the time but there would be those moments when the player pressed against a wall at a certain speed and angle and fell straight through the floor. This is acceptable in a home brew project, but not in an aspiring commercial product. There’s a saying along the lines of the last 10% is as hard as the preceding 90% and I found that to be true. After some effort the engine is well on it’s way to being a simple yet robust product. Here’s a brief synopsis of changes:

  • An entity-component system. The old entity code, which was a tangled mess, is gone, replaced by my own take on an ECS. So far I’m very happy with it. Components are stored in a common database, entities only exist implicitly, and systems know nothing about entities, only the components they operate on.
  • Rock solid collision scheme. I converted the collision code to use fixed point math, which gave me the precision guarantees I needed. As an added bonus, the approach will allow me to support non-axis aligned surfaces when the time comes. The collision scheme is now threaded.
  • Fixed point representations for absolute positions. For precision purposes I moved all absolute positions to use 16:16 fixed point. This gives me numerical stability guarantees for larger maps going forwards.
  • MIP-mapping. The engine now does per-fragment mip-mapping. I would have implemented it per-pixel but found myself stymied by the gaps in theĀ  SSE 2.0 vector instruction set. A variadic bit shift and bit scan instruction would have made this possible. I’d like a ubiquitous vector complete ISA please!
  • Texture filtering, then not. I experimented with bi- & tri- linear filtering, coupled with texture blending on a number of surfaces. Since the dynamic light maps that power the world ‘painting’ effect are only updated in the topmost MIP, my idea was to smooth the transition out with filtering. It ended up eating too much performance, and I have returned to point sampling on all surfaces, with multi-texture blending available where needed. Since the the light maps are much lower resolution than the screen, it proved faster to generate new MIP hierarchies for updated surfaces each frame than do filtering in the pixel shader.
  • Switch to 64 bit. I bit the bullet and faced down a bunch of errors relating to compiling in 64 bit, in the end it didn’t take long to resolve.
  • General improvements in renderer. I worked the rendering pipeline code over and tidied up a bunch of things.
  • Broad improvements in the sound system.

There are still a host of minor things to do, but the engine has taken a big step forward. The game systems are pretty much where I want them to be, save a few tweaks. Next I move onto a small game project, details to follow!


Leave a Reply

Your email address will not be published. Required fields are marked *