Month: August 2010

A Sisyphean potter

I’ve been a bit sick lately, so instead of going out and having fun, I’ve been cooped up inside. On the upside, I’ve been writing Kung Fu Legends code. So far I have the main GameManager, Options, Graphics, Input, Event management and some testing frameworks set up. I gave the UI a good Harvard try, but fell in a heap. I tried to integrate MyGUI and CEGUI, but both were annoying to attach to my code. Not because of the library code itself, but the accompanying documentation is sparse and scattered, and presumes that I’m using Visual C++. I really didn’t like Visual C++ (it has a workflow and feel counter to my ingrained habits experience). I’m using MinGW so I get all the goodness of gcc, with the convenience of being Windows native. In any case, I wasn’t entirely ready to roll my own UI code at this point, so I moved onto something else.

Next I tried adding sound support. The obvious choice was OpenAL. But alas, it doesn’t seem to come with codec libraries automatically, so I was off on another hunt to get the libogg and libvorbis packages. “This should be easy,” said I, not learning my lesson from the previous paragraph. All the code for the two libraries were there, but to compile it, you needed the autotools library prebuilt. This is kinda okay if you use CygWin, but I don’t. Grr. Getting the autotools compiled through MinGW was too much of a hassle for my extremely low level of caring. I mean it was two libraries distant from my work, so any time working on that meant time not working on something personal. I’m sure it’s not insurmountable, but spending an evening wrestling with that stuff, all the while knowing that my friends were out getting drunk… well it rubbed me up the wrong way, so I put it too on the To Do pile.

So where did that leave me? There are a bunch of engine components that I could write, but seemed overkill. Kinda like installing a glovebox when the car didn’t have a steering wheel yet. Coincidentally, at this time I had gotten a few queries from friends about the game simulation. While I had a half-skeleton of a game engine up and running, by sheer amounts of self-control I didn’t have the simulation even sketched out on the code level. So tonight, I started. Here’s the first demo of the game, in all its glory:

Dude A created in Place A. Dude B created in Place B. Dude A went to Place B.

Woo! To get this unexceptional pile of bits I had to implement a few hacked frameworks (hacking around the EventManager, a specialised TextOutputManager and how I’m doing Events and Actions)[1. And oh god, work around the annoying peculiarities of how compilers deal with C++ templates. My handy-dandy, super-powerful Options framework failed because the compiler was either too smart about types, or completely stupid. As a result, my spiritually beautiful code constructs had to be hacked down to things that the compiler wouldn’t barf on]. But it’s a start and its sorta within the framework that I’m designing[2. Sure, I could have just dumped that string to std::cout, but that’s no challenge.]. An earlier attempt at writing the whole game left me implementing detailed systems I didn’t need yet, but wanted to program. I’m starting to warm to YAGNI (You Ain’t Gonna Need It) because it’s easy to disappear down a rabbit hole of design and implementation relevant to very little. Hopefully I can build up more and more supporting systems so I can start to develop the game simulation in parallel with the game engine. This way I can see if the game idea works in principle, and once the engine is more capable, I can see if it’s “fun”.

So yeah, like all my projects, progress is slow but measurable.

Laying concrete

So despite my recent blue-sky posts, I have been writing actual honest-to-goodness code for Kung Fu Legends. I’m working on the boring bit at the moment which is getting all the helper libraries set up and working. Currently I have options, logging and graphics subsystems primed and running. I had to rewrite and refine a bunch of my previously-written stuff to fit a new engine model and set of standards. The next bits to implement are:

  • Input (mouse and keyboard)
  • User Interface

The UI is the hardest because previous attempts to graft on a library led to disastrous results. I’m tempted to write my own, mostly because I want a lot of custom widgets and not a whole lot of the standard widgets. But this is of course a biggish undertaking.

The reason I’m doing all this instead of the fun stuff is that I need to be able to test my world model. I have two directions I can take at the moment: develop a basic UI and test within that, or leave the engine stuff until later and just test via copious amounts of logging. Both have their merits. For now I’m going with the former, but might just get annoyed and go the latter. You have to be careful though, leaving all the boring stuff to later makes it tough to face it. Ideally you’d work on the two (engine and game world) in concert so the requirements of one can inform and evolve the other.

The other main reason for the focus on the engine is that it’s a reasonably known quantity. My game world and game mechanics are still being formed so it’s hard to set off too far in any particular direction. But the important thing is that I have code that compiles and runs. Woo!

Motivations II

In my last post I discussed a few ideas I had rolling about for motivating players to play my (currently vapourware) Kung Fu Legends. It was focussed on intrinsic motivation – ways inside the game to make players play more. Now I want to talk about a few ideas I had for extrinsic motivation – ways outside of the game to increase motivation. This motivation is not just the players, but how I want to motivate myself to actually write the thing.

Read more

Motivations I

I’ve been sick all week ┬áso I’ve had lots of time to read and think (and cough and sleep). Recently, Chris Hecker posted notes on his Game Developers Conference talk “Achievements Considered Harmful?” Apart from being responsible for some of the awesome tech in Spore, Chris Hecker is working on a game I am dying to play: Spy Party. Anyway, his GDC talk is great and I recommend you listen to it if you have the time. In it he outlines some of the psychological research that could be applicable to game design and achievements on Xbox Live or Steam. As always, I’ve been thinking about how this applies to my current main project, Kung Fu Legends.

Read more