The Midnight Engine – iPhone

So I’ve taken, to porting The Midnight Engine to the iPhone. This is a task that I started 3 years ago. But as many of you loyally Midnight followers will know, time is not a friend to my projects.

I have been playing with getting the engine up and running under AirPlay SDK as this will hopefully give me a little more scope. It kinda goes against my normal philosophy with development, in that an engine must offer just the right amount of assistance to your project but not bog you down with far too many features that you don’t need nor want. There are reasons to consider AirPlay which I won’t go into here, but one of the advantages is that it allows me to keep development in C/C++ which is how TME was written. This is a bonus as I can just port the engine without having to rewrite – well that was the theory.

First I had to scrap my porting attempt from 3 years ago. A because there were an awful lot of errors, and B because I had no idea where I was at.

Creating a new project under XCode and Airplay, I had some 20,000 errors and warnings – mainly errors. Part of this problem was that the codebase had been written to cross-compile across OS’s. And it used to. Not any longer.

It’s been nearly 5 years since I did any proper work on TME, and things have moved on. The compiler didn’t like my code anymore. New keywords had been reserved. Warnings popped up for things that I’d never had warnings for before. eg. Comparing signed and unsigned variables. The Compiler was having different affects on areas of the code that previously compiled fine. The GNU compiler doesn’t appear to be as happy with namespaces as Visual Studio used to be. (that said I can’t get the old project to compile under VS2010 anymore!)

So I had to strip it back. And bit by bit put the code back into the project and painstakingly change everything that needed to be done to make it compile.

After a week – I’m done.

Now I need to do some testing and recoding. First is to get the project loading in the LOM database. This will allow me to wrinkle out some of the OS/Hardware issues in the TME libraries. After that I need to painstakingly test large chunks of the code to make sure they are still doing what I want them to…

Related Posts:

Doomdark’s Revenge


I know it’s been a while since I posted or did anything on this project, but I finally got round to doing something again today.

Firstly, I wrote a lot of code for DDR back in October 2006, I had a good few programming sessions on it, and then as usual faded away. I coded most of the NPC’s AI; Follow Liege, Follow Foe, Go after Object, Go home, Do Nothing, Approach a Lord, Pickup Objects on their travels, and Move. I coded the moving mist and wild thing regeneration. I also coded most of the battle code… and then I got distracted by shiny objects.

Since then I’ve changed computers and compiler; so loading up the project yesterday I found that it didn’t compile in a big way. So tonight I have mainly spent all the time fixing compiler issues… and there are an awful lot of them.

One of the other problems I have had with the project is that the graphics are getting so complicated that while running in debug mode, the project runs a little slow. I’ve been putting up with it because it isn’t so bad in Release mode but slowly it has been getting me down and distracting me from the issues. It’s hard to test logic if the frontend isn’t working properly.

I’ve wanted to move the graphics subsytem to make use of the hardware. By moving the 2d logic to use 3d cards I would be able to massively speed everything up. However, I’m not a 3d programmer and again the task just keeps distracting me away from things.

I had a word with Jon Alma today who has been working on the Legends Engine and hopefully he is going to knock up a quick wrapper for some OpenGL stuff that will allow me to move the graphics forward and solve the speed issues.

So today I felt that I made a little progress…

Related Posts:

Doomdark’s Revenge

I sat down today to do some DDR code, first in a while, and spent 3 hours debugging some crashes!

Don’t you just hate it when you leave your code in a none working state! One was some bad XML, incorrect closing elements, and the other was some memory being trashed. The memory problem was due to my string class doing a shallow copy on assignment… well actually it wasn’t, but the compiler was for some reason not using my string assignment operator and instead doing it itself! Actually I have no idea what the compiler is doing at that point… grr…
|inline

Related Posts:

Doomdark’s Revenge

I just thought I’d post a progress report, because it probably seems like I’ve been sat on my arse doing nothing – which on the whole, is probably true.

One of the main goals with The Midnight Engine, was its openness… this is part of the holy grail of all game development, the data driven engine (DDE); in this case I actually think it’s particularly important.

|inline

Related Posts:

Doomdark’s Revenge – Mist

I got the mist from Jure today, so here it is in all it’s glory. I’ve tried to get a few variant shots but the location that mist is in at the beginning isn’t great – and I have no night button working at the moment! The first shot is the opening screen, you will notice compared to the same screenshot posted the other day, the old mist has gone from the bottom right of the terrain, and the new improved one is in place. The other shots show off the mist more dramatically. I also managed to do some work on that bottom left panel for nootropic supplements, not to mention fixing a few UI bugs.
|inline

Related Posts:

%d bloggers like this: