As you know, I have a version of the map data, I have the graphics from the Spectrum version and I’ve started to get things up on the screen.
I’m having to re-arrange the room data, and to that end I wrote an editor. I realised with a frisson of delight that it wouldn’t be impossible to draw all 64 rooms at the same time if I scaled the map down. So that’s what I did, and I threw in a simple editor that allows me to re-arrange the room. I could extend this to allow the room to be edited too, but I don’t need that just now.
I even have the original ZX Spectrum colours reproduced. I’m toying with the idea of allowing the use of graphics from any of the four original versions.
If anyone wants the Mac executable to play around with, let me know, not that it does much apart from scale the scene up and down and allow you to do a sliding puzzle on the whole map.
I’m currently using Cinder after openFrameworks stopped working on Mountain Lion for some weird 64-bit reason. No matter what I tried with openFrameworks, I couldn’t get Chimera compiled. I put a message up on the forum a few days ago, but nobody has responded, and there doesn’t seem to be a lot of activity, so I decided to give Cinder a try instead. Now Cinder seems to work fine on my MacBook Air, but resolutely refuses to run for more than six or so seconds on my Mac Mini without crashing, even with an empty app.
Now I have all 64 of the original map rooms displaying and I’m very pleased about that. Here’s a screen shot taken from a running build on my Mac.
I have been pretty unwell as you know. I accepted my lot. Most things in life you can do very little about. It’s shocking that so many things go as you might expect, or then again, maybe they go that way because you allow yourself to become accustomed to how things turn out, whether or not you wanted things that way.
So today, I got back to the office and coughed and spluttered my way through half a day of work. I had very little energy by the working day’s end and expected to get an early night.
I fired up Xcode anyhow and managed to get a fair bit done, of which I’m very pleased. I made progress in a number of areas.
First, I wrote a simple “Constrainer” class that given a point, limits it to a 3D block of variable size. Very simple really, but it stops my man from falling off the edge of the room or climbing above its given height.
You might be interested in where I got the dimensions from? Well they’re being read off an XML file and I’m now using the RapidXML library as recommended by Ricky. Wasn’t as difficult as I feared in the end.
I did have to write a simple File Loader class too, because openFrameworks doesn’t have any built-in file-loading abstraction and neither does RapidXML (it expects a character pointer)
And finally, I managed to get text printing isometrically, which made me very happy. I know this is no achievement for real programmers, but it was a nice, simple problem that nobody had a library for and I had to do it myself, so I was happy with that. Here’s some of the code:
Really simple, just to get it working. I’ll turn this into an IsoTextPrinter class next, with the ability to isometrically print down the X axis (remember the Chimera axes, right?) and up the Z axis. the IsoTextPrinter class should also allow a bunch of state setting to allow text scaling, colour, alpha and rectangular background. Then of course, I want the text to behave like particles because it will be used in scores.
I’m looking forward to working out a rhythmic scoring system, but for now, I just wanted to print isometric text.
I’d like to leave you with one of my favourite songs of all time, from one of my favourite bands of all time.
This isn’t really for experience programmers, who will be laughing at my pathetic tinkering.
This is me struggling against the fog of decades, of increasingly worse concentration since damaging my brain from hypo after hypo after save hypo. It is exceptionally hard for most people to focus these days, but for someone who has been through the mill in more ways than I’d care to remember, including a couple of mini-strokes, blindness and a lot worse than all of that, believe me when I say that this represents progress for me.
So I have the character responding to input, facing the right way when told to. Here’s some IM output from me a few minutes ago.
I have my man standing on top of an iso floor, facing down and right, squarely on a tile
the floor is slowly materialising and dematerialising in a sin wave pattern
I NOW HAVE HIM RESPONDING TO KEYSTROKES
believe me when I tell you that for me, this is a breakthrough
he faces the right direction depending on the key strokes