Crazy, Crazy World

The world seems to have gone to hell. Countries are on the verge of collapsing, economies held together with sticky tape and Pritt stick, kids getting beaten up by police on the streets of London and Liberals turning out to be utter sell-outs.

Yet for some reason that I can’t quite fathom, when I should be at my most radical, with all of my activist engines on full boost, I am excited about my trade. My trade? Video games. That’s right. I’m so very excited about games, about making them, playing them, learning about them.

I’ve talked about making games with a message, subversive games, but that’s not why I’m loving them at the moment. My guess is that coding is a problem I enjoy solving and something over which I have some control. It is an area in which I can experiment, ask questions and get answers.

I’m still kind of dumbfounded that I have anything at all on the screen and despite my tardiness in recent times, I have made great strides and the results of that will be visible soon.

I managed to get boost::signals (or is it the single ‘s’? I can never remember) working. I had to drag the source for the signals library into my Xcode project, but that worked just fine. I also updated to the latest version of Xcode 4 and I’m particularly enjoying the Assistant mode, but I can’t really talk about that I don’t think, so let’s stop right there.

I am really surprised at just how powerful boost::signals and boost::bind are, and I will be using them a fair bit now.

I’ve also been thinking about the design and have some more ideas on that. Happy to share too.

Remember I talked about two phases to the game? Material and Energy? Well now I know how to switch phases. I want to do a twist on “game over” – it’s called “it’s never over” – when your energy drops to a critical level in the Material phase, the game switches to Energy mode. Everything becomes brighter, ethereal, vector-like and yes, glowing and sparkly. I like the sound of that. And to get back to material mode (reincarnate?) you need to accumulate sufficient energy. Or rather, “recycle” it. Everything will get smoother, more dream-like. So that’ll be a particle system then.

[Update: 21:44 – I’ve just got the threshold value-checking in and I was just thinking aloud – how about if the switch from material phase to energy phase was under player control? And the phasing is quite fast and frantic. Other games have jump and shoot as “panic mechanics” – I could have “the switch” – I’m usually good with names so I’ll have to come up with something suitably pretentious to describe it. For now, it’s just “the switch”.

[Update 22:09 Eureka! Energy gradually goes down in material phase, culminating in death with zero energy unless you switch to energy mode, in which case energy starts increasing gradually. In material phase, you use large amounts of energy for more energy-expensive moves. In energy phase, you gain large amounts of energy, but you lose material (i.e. room structure, perhaps the floor or the hull of the spacecraft) – I like this – and it could be fun if the rate at which you need to switch phase varies according to environmental factors]

 

 

The Boost Library

chimera-and-boost-library.jpg

I’ve been struggling for a while with indecision. At first I wanted to write an event system from scratch. Then I got sidetracked somewhat by McShaffry’s Game Coding Complete (bought in Kindle format and read on iPad). I’ve been doing an awful lot of C++ reading and I’m not ashamed to admit that much of it (certainly at first) seemed beyond me. Some of the things people get templates to do are just dizzying.

The upshot is that after much vacillation, I decided to use boost::signal. That’s when the real problems began. I tried search after search and found that I couldn’t get the basics done no matter what.  I read all kinds of distracting advice on what the problems might be, but ultimately realised that the issue I was facing was somewhat more fundamental. The scripts that build boost weren’t finding G++. It finally dawned on me that the build tools weren’t set up properly. So I installed the latest release of Xcode 4 and this time, told it to include the Unix tools. Now bjam was finding G++, but still not working.

It was just as well that I’d already given up last night and decided to simply drag the files from the signal source directory directly into my Xcode project. Everything worked fine after that. It’s worth mentioning that much of boost doesn’t require libraries, as everything you need is in the header files. There are some boost classes that do require building into a library, and boost::signal is one of those classes.

There really should be a binary distribution of a library as important as boost for Mac OS X and I’m surprised at how poor the state of support is.

Still, back to Chimera now – and how energy conservation can be turned into a game mechanic. I’m also thinking about the revision of history as a game concept and the notion of redemption as a gameplay mechanic. Yeah, I’m serious. This is a game after all.

(By the way, I particularly enjoyed reading this perspective on Chimera).