January 2007 - Posts

Recent Silence

I am not dead!  We have just released a major product (well, suite of products) at work, using a bunch of new technologies and that (with help from my 6-month-old collie) has left me with no time to blog.  Normal service shall resume shortly...

Nintendo Wii - First Impressions

With two of the many, many Davids in my work giving the Nintendo Wii such positive reviews (the word "raving" might not rest uneasily in a description of their opinions), I decided to give it a try.  To give an idea of the difficulties that lie in wait for the would-be wii owner, the process went like this: Murray's wife spotted some being delivered to Game at the Gyle in Edinburgh, and picked one up for him.  He passed the word on to me, but the intervening 10 minutes saw the rest sell out.  However, the sales assistant suggested trying their St James branch, whose deliveryas later.  Sure enough, six had been deposited there scant minutes before, and by the time I got there by taxi (ten more, tense minutes) there was one left.  Gotcha.

Apparently the St James Centre branch - a very small and less-known outlet - gets around one hundred calls every morning about availability.  Nintendo have played this one very well indeed, so far.

Anyhow, on getting the console home I tried out Wii Sports.  Tennis was great fun.  The radical change in experience made possible by the motion-sensitive controller reminded me of the novelty of the first time I played console tennis (with a white dot and two white bars for rackets) back in 1980 or so. It was a genuinely new gaming experience to play a game by actually, well, playing the game: flicking the wrist forward as I play the ball to add topspin; reaching over my head to serve, changing my body position to play backhand strokes: hilarious stuff and really natural-feeling.

Next was Golf.  The graphical quality of the course was, of course, no Tiger Woods.  But EA - who I hate and loathe with a jihadist's zeal - couldn't dream of making something so fun (unless last year's model was identically fun, of course).  It was immediately apparent that the best and most accurate way to play the game was to stand up and actually play the golf stroke "for real", remembering to play with a steady downswing and controlled follow-through.

Bowling was astonishingly accurate: I bowled pretty much the score I would with an actual ball, and found myself with the same right-to-left drift cause by spin from my wrist-movement.  It is difficult not to let oneself make the same follow-through and stand there, as if one had just released a real bowling ball in a real alley, waiting for the clatter of success.

I'll post more about the other games I bought (Rayman's Raving Rabbits - typical Nintendo weirdness but fun-looking - and Zelda) when we get bored enough of the freebie bundle to try them out..

Multiverse - Adding Server Add-ins (Part One)

I've not stopped working on stuff in Multiverse, but Christmas and the New Year made it a bit trickier.  I'll do a technical update with some code in a few days, but in precis, here's what I've been up to.

I decided to try scripting a server-side add-in.  I wanted something non-diku-ish, non-graphical, and which touched a few areas, so I decided to try adding a Sims-style, basic needs-centric AI.  What Will Wright did with The Sims, basically, was to give each toon needs like sleep, hunger, cleanliness etc.  Each incremented, both with time and with activities: so while the need for cleanliness would slowly increase throughout the day, it would increase faster if a Sim did strenuous exercise. Some items, like showers, satisfied these needs (and "advertised" as much), so a Sim would be attracted to them when a need was at a certain level.

So what I wanted to do was try adding a set of counters which would increment with time for npcs, which would (in this test form) be arbitrary: I called them spin, up, down and strangeness.  Making given activities increase these counters was beyond the scope of what I was doing, as was my plan to later provide simple hot-spot locations to which the NPCs would move when a given need hit a trigger level.  For now, I just wanted to add these new statistics to NPCs and to try incrementing them.

This would let me work on holding new variables for an existing object type (my zombie NPCs in the example world), as well as sending server messages (periodically incrementing needs) and making these values persistent (so that a given NPC could be de-instantiated when nobody was near).  I was also interested to see what the effect on server resources were, both in terms of memory and CPU utilisation.  AI in MMOs is traditionally rotten, because it is resource-intensive, and because it is generally better-looking to have NPCs wandering a given street where players can find them than disappearing off to the toilet, so they get given paths to follow, or basic reactions like attacked:fightback or 20% hit points:scarper.

The first thing was just to use the example code on the site to get an add-in working.  In the past, I would have launched immediately into writing my own from scratch, which is certainly a good way to learn stuff in-depth.  But It doesn't help when there are five things wrong with what you've done, three in implementation and two in code, and in trying to find what they are (not knowing that there are several issues) you end up repeatedly trying and discarding valid fixes.  So it's quicker to crib the example code, get that working, then change one thing at a time.  Ah, the caution of age.

I had wanted to write it in Java, as I mentioned before: Java I can do, Python I have little experience of.  Happily, there is no example code for Java, just a note saying "we'll add this bit later".  More than that, there is very little documentation at all for how to do it in Java in the developers' wiki.  I say happily because I was rather hoping to learn Python, and this forced me to start doing so.  Sometimes, I am a net importer of willpower.  In any case, from the look of it, Python will be a quicker way to do most things after a while, even if it's slower to run.  Well, tell you what: when I get 20 mill in VC funding I'll blow some of it on rewriting.

Anyway, this is getting a bit lengthy, so I'll document the next step in my next MV post: getting the add-on running.  It wasn't tricky, but the documentation was a touch obtuse in places - lots of assumptions - so it might be worthwhile for others.

The Obligatory "Five Things" Post

Dragon tagged me with a meme that has been circulating the game-o-sphere for a few days: what are five things you don't know about me.  I would once have been able to say "1 - I don't do memes", but since this is my second, that's really not going to wash.  In any case, if it's good enough for LumBrian, Raph*, Matt and others, then it's good enough for me.

Of course, those who know me IRL, and a few others, might know some of these.  But I'll bet that two of them are new to everyone in the world.

1 - I tried to create a mechanical flight simulator when I was ten.  I had just used two computers by then - both Commodore Pets - and neither had a flight sim on it, so I don't know exactly where the idea came from.  We were building a house at the time, so I had loads of materials available, so I tried to draw a scene on the back of a long roll of heavy paper and make two winders at the top and bottom of a flat board, masked by a piece of wood with a hole for a windshield.  The effect would have been a little like an isometric-view scroller, but for the fact that my utter lack of artistic ability lead me to give up in disgust.  Not for the last time, my technical plans were foiled by artistic ineptitude.  Me and Hitler both.

2 - I can count to any number up to 1023 in binary on my fingers faster than you can do it in decimal or out loud.

3 - When I was young - some time before 11, again - my father explained traversable circuits to me, with an example of a square with a St. Andrew's cross, explaining that it couldn't be traversed.  Bad idea.  I started tracing it out on paper, then on my hand, then in my head, and my brain got stuck.  I still do it sometimes without really noticing, when reading or thinking.  It's a kinda mild OCD-type thing.  Interestingly, he also explained the four-colour theorem, but I lost interest in that after less than six months of bull-headed experimentation.

4 - Today, I had to pass up the invitation to apply for an absolute dream job.  I mean, the sort of job where you don't care what you would be doing, just to get to work there.  Topical!

5 - My grandfather (during the war, a combat engineer) rather unwisely taught me to make a powerful depth-charge, which I once, just as unwisely, tested with some friends in the Wall'O'Kirk pool.  The material needed for the charge was very easy to get, although nowadays you'd have to nick it from a school or lab.  The variable timer mechanism would make you weep with its elegant simplicity.  The result was terrifyingly effective, and there were soon a surprising number of dead eels on the surface of the water.  I hope you don't mind me declining to post the recipe.

----------

*When I trackback to raph's site it seems to post the entire article so, being a good citizen, the link is http://www.raphkoster.com/2006/12/27/the-5-things-you-dont-know-about-me-meme/ if you want it)