Oli's old stuff

Tinkering with retro and electronics

Jul 31, 2016 - 5 minute read - oldcode

Updating Manta-X

Old Code, New Code The last 8 posts have focussed on the past, bringing an old dog back to life. Now it’s time to look to the future. We’re no longer stripping things away, we’re now in the process of refactoring, modernising and - Horus forbid - adding new features. The process of iteratively refactoring something is a skill you seem to pick up with experience. I clearly didn’t have this skill 12 years ago, as I left the game in a broken state, with a bunch of things ripped out and not working.

Jul 30, 2016 - 3 minute read - oldcode

Manta-X Code (Part 7)

Entity System One thing that has bugged me on this whole project is that crappy entity messaging system. Now that things are simpler, leaner, I feel happy enough to get rid of it. Removing it was fairly simple; the only 4 messages used now are Update and PreRender, Render and PostRender. Realistically, the way they’re used right now is that I have Update and Render. So I decided to collapse these down.

Jul 30, 2016 - 7 minute read - oldcode

Manta-X Code (Part 6)

You Didn’t Need It You Ain’t Gonna Need It is pretty much a guiding principle of mine in more recent years. The concept of ‘future coding’ is very easy to fall into. You anticipate a need for something so you try and cater for it early; kind of like risk mitigtion. The problem with all of this is that things change. The age old philosophy that Change is the only constant in life cannot be avoided.

Jul 29, 2016 - 5 minute read - oldcode

Manta-X Code (Part 5)

Unfinished Business It’s been fairly cathartic to go back and clean some of this code up - almost feels like some unfinished business. Still not sure if I want to continue working on it, but I thought I’d at least cull some of the garbage in here to unmuddy the water a bit. Let’s take away the easy stuff. All those classes that aren’t used or do nothing I’d want to take forward.

Jul 28, 2016 - 6 minute read - oldcode

Manta-X Code (Part 4)

Up and Running Now that the code compiles quicker, my iteration times will be faster in this codebase. The first thing I want to do now is get the game “running” and “playable” to the point that it was. I won’t add any new features, but just try and plumb together whatever’s there. Rendering First thing to do is get the render loop running. The game currently uses OpenGL and used to use GLFW for windowing.

Jul 28, 2016 - 2 minute read - oldcode

Manta-X Code (Part 3)

Improving Compilation Time Compile times on this 6094 loc project is much slower that it should be. A full rebuild (including TinyXml): Time Elapsed 00:03:00.35 There’s a bunch of reasons, but one of them is poor header discipline. The all-emcompassing header In every header file (and therefore every cpp file), there is #include "StdHeaders.h" at the top. This StdHeaders.h file is some stupid include file that has a bunch of “common” junk in it.