Oli's old stuff

Tinkering with retro and electronics

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.

Jul 25, 2016 - 6 minute read - oldcode

Manta-X Code (Part 2)

Removing PhysicsFS I wanted to get the game running so I thought I’d go and remove the PhysicsFS dependency. I didn’t really need it at this point and can’t be bothered with another 3rd party library for the sake of it. Turns out it was used in 3 classes: ModelManager (for loading Milkshape3d models) ShipClassManager (for loading XML data about the ships) TGAImage (for loading texture data) Each of these essentially did the same series of operations:

Jul 24, 2016 - 5 minute read -

Manta-X Code

Manta-X: Toe in the code Last post I talked about the overall folder and asset composition of a very old game codebase I found of mine (from 2004). It looks like when I got it compiling back in 2014, I’d ported it to Visual Studio 2013, however the IDE is now crashing so I will use 2012 for now. After more time than it should have taken, I configured cloc to skip the deps and dist folders, we have the following counts:

Jul 23, 2016 - 4 minute read - oldcode

Manta-X Archaeology

Manta-X: Uncovering a relic I’ve been digging around in my visualstudio.com projects and came across Manta-X Game. This was a real blast from the past for me - a game dev project that I was working on back in 2004. The goal of Manta-X was to essentially recreate the Andrew Braybrook C64 classic Uridium for the PC. I remember the ambition was to have 3d graphics instead of sprites, so I was using OpenGL.