Archive for the ‘Games’ Category

Fred Claus Racing

Wednesday, November 7th, 2007

fred-claus-racingUse the cursor keys to race Santa in this sleigh driving game.  Hit space to use any pickup bonusses you might find, and look out for cheeky shortcuts!

This game makes heavy use of my AS2 physics engine again to simulate the sleigh movements behind the reindeer. You can bash and crash and swing about in quite a fun way!

The tracks left in the snow are worth a mention too. The track is one giant bitmap stored in memory and scrolled around to show the player’s position. The game stores the sleigh’s skids’ start and end points for the current frame and the previous frame, then creates a polygon for each skid around the four stored points. This is then drawn to the main bitmap with blend mode ‘add’. Then it is drawn again, half as bright, with blend mode ‘subtract’ and offset down/right a little. The result is what you see – a permanant skidmark with a bright highlight on the top/left side, and a dark shadow on the bottom/right edge. Because it’s combined into the track as a bitmap effect, it is permanant, and costs nothing in terms of CPU time for a longer skidmark. The only cost is a small amount of work per frame to actually update the bitmap. Because the sleighs slide about in all sorts of directions and rotations, the track width varies and slides about beautifully in response. It’s an effect I haven’t seen done quite as nicely in any other web games.

Dareway Invasion

Thursday, October 11th, 2007

darewayUse the cursor keys to dodge the incoming laser blasts from the aliens on your Dareway scooter.

The Dareway itself is a cheap copy of the Segway scooter for children, only with none of the cleverness of the original. This microsite was to promote the toy, and the game was rushed together from the Silver Surfer games. It plays OK for a few minutes, but is never going to set the world alight with new concepts! Watch for the tell tale green glow of the laser lines approaching to anticipate where you’re being fired at from, and reposition yourself to avoid getting hit. Take too much damage and you’re out.

Silver Surfer DVD

Wednesday, October 3rd, 2007

silver-surfer-2Use your mouse to control the dark Silver Surfer whilst being chased by the light Surfer, and shot at by rockets. This is a very quick reskin of the earlier game with few extra elements. Frankly, the earlier game plays better, so I won’t be offended if you skip this one!

Sonic Rush Adventure

Thursday, September 27th, 2007

sonic-rush-adventureUse the mouse in this simple matching game to find the hidden pairs. You’re against the clock, so work fast!

Unusually for a pairs game, you can click as rapidly as you like. You don’t need to wait for the last two pairs to turn over before starting the next couple! Get to it and make it snappy.

Rant

Monday, May 14th, 2007

rantCause the biggest pile-up you can in this quick-hit driving game. Use the cursor keys to race up the road and smash into the junction at the end. The more you hit, the better your score!

Postmortem:

Whilst messing about with an idea I had in my spare time, I ended up creating a basic AS2 physics engine for simulating masses and springs. It turned out to be just what was needed for the Rant game. Each car is two round masses joined together by a spring, with a car graphic pasted over the top. The resulting losenge shape isn’t really much like a car I know, but it is perfectly sufficient for the game as it stands.

Initially, I tried making the cars out of a box made from four masses and six springs holding them in position. This ran considerably slower as the collision detection had that much more work to do, and there were that many more springs to simulate. The results weren’t as good either, with boxes occasionally turning inside out and often wobbling like jelly. The two-mass system worked considerably better and was considerably cheaper on the CPU. All round win!

A typical game of Rant only lasts a few seconds. You race up the road, tap a few cars, get a score then it’s all over. It turned out in playtesting that the trick to making this addictive was to make it really easy to play again. So, spacebar to reset at any point (even before the game is over) was critical. Likewise, there’s no lengthy transition effect before you’re back in control. In fact, there’s not even a brief half-second transition – I found that it annoyed people to wait even for that when you can replay so rapidly.

Another way to reduce user friction was to store their high-score in their Flash Shared Object. I found that people got into a routine of restarting rapidly, and sometimes did so when they had a highscore by accident. Rather than lose the chance to submit it, I allow them to submit it at any point in the future after a game too. The highscore table automatically allows just one entry per person, so there’s no chance of one person filling the table when they’ve achieved a top score.

Ultimately, Rant is a game of luck. If you’re lucky, you can hit all three of the randomly placed speed boosts, catch a few cars just right on the junction itself and hit lots of parked cars for that magical score. The game keys into that ‘one more go’ trap that we’re all succeptible to, and a little bit into the semi-gambling gene that makes us play dice games like Yahtzee, even when there’s nothing other than a highscore at stake.

Lessons

  • Very short games can increase replayability and addiction, since people don’t have to invest much time in each go
  • … as long as there’s very little friction before playing again
  • When simulating physical objects, go for the simplest underlying representation that will suffice
  • You don’t always need a lot of gameplay to generate addiction

Travis: Trolley Dash

Friday, March 30th, 2007

travisUse the cursor keys to race your trolley around the supermarket in this Travis oriented racing game.

Postmortem:

This game was written as a development of the Unaccompanied Minors racing game, and used much the same engine underneath. The major change here is that the trolley doesn’t have to behave like a car, and as such needed to be much more slippy-slidey. The simple way to achieve that is with a basic vectored thrust and momentum movement model – something I’ve written many times over for space rocket style games in the past. It’s easy to get it feeling great for rockets (and trolleys), although it really doesn’t feel right for anything but the slipperiest of cars (think ice-racing rally cars, for example).

There are other enhancements over the Unaccompanied Minors game here too. The tracks have a clearly marked out path you can follow, so you needn’t get lost at every corner. Track design in general is much better too: There are shortcuts for the observent to find, pickups to collect for bonus points and the game runs better too due to better prepared graphics (the artist for this one followed my direction perfectly in terms of what would affect performance).

The mood of the game is a little depressing for my taste. The yellow floors and dimly lit store rooms remind me of the bad strip lighting in stores like Lidl and Aldi. That’s on purpose of course – it’s like that to fit in with the Travis song/video, but it still drags the mood down a bit for a racing game.

The biggest mistake in this game however is the collision response. It’ s much improved over Unaccompanied Minors, and you can do a lot more when you have a momentum vector hanging around that you can modify. The edge approximation still sucks however, and it’s not hard to find yourself accidentily rotated into a wall. There are all sorts of horrible special-case hacks in the code for recovering from such incidents, but luckily they don’t have to be used much, unless the player attempts some of the tighter shortcuts where it’s easier to get stuck.

Lessons:

  • Half-decent collision response still isn’t good enough!
  • Decent performance makes everything feel better
  • Everybody likes sliding around

Toonami Pinball

Tuesday, February 20th, 2007

toonami-pinballThis game selector was built for Toonami to give kids a fun way to select a random game to play. Hold the down-arrow to pull back on the plunger, and let rip!

Bareback

Thursday, January 18th, 2007

barebackTranquilise warewolves and bring them back to the safehouse in this moody driving game.

Use cursor keys to drive around and the mouse to aim/shoot. Use the minimap to navigate.

Play Bareback

Postmortem:

This game was written to promote a novel called Bareback, about lunes (warewolves to you and me). It has nothing to do with what you’ll find if you google for ‘bareback’, which I don’t suggest you do if you’re in the office!

The premise is that there are various people out there who turn into wolf-like creatures by night. It’s your job to drive around in a pickup truck tranquilising them and locking them in a safehouse until the morning. It’s got good ingredients: Driving, shooting, dangerous creatures. Unfortunately, the overall effect just doesn’t work in this game, as you’ll see if you play it for a few minutes.

I think the core problem here is that there’s too many concepts mixed together. You have to drive around in the dark, slowly, navigating. Then you have to do shooting and dodging and collection of knocked-out-animals. Then you have to get them back to the safehouse with more dodging/navigating/driving in the dark before one of them wakes up.

Another problem is that none of the tasks ended up much fun! The van is slow so that you can keep it on the road. What’s fun about driving a slow van? Might as well do it for real and earn some dosh for it. Navigating is hard, as the mini-map is small and whilst the zoom works well, a lot of the time your attention is entirely focussed on a tiny part of the screen. The roads are dark and colourless, meaning you’re squinting endlessly to see what’s happening. That’s an eyetest, not a fun pastime. Shooting is difficult and restrictive, so isn’t very rewarding. Then when you do get a vanload of warewolves all sorted, you probably won’t make it back to the safehouse in time before the buggers wake up, undoing all your hard work.

This game went through a lot of itterations before it’s final state. We spent much longer than we normally would on trying to get it right. We knew at each itteration that it didn’t play well, but no matter what we did it just didn’t improve much. 

Lessons:

  • Sometimes, the core concept is just broken. Give up on it already!
  • There’s truth in the saying: Throwing good money after bad
  • Games must be fun. MUST
  • If it feels like work, it probably isn’t fun
  • They can’t all be hits!

Iron Maiden: Different World

Thursday, December 14th, 2006

iron-maiden-different-worldUse cursor keys and mouse to fill the screen with bullets in this platform-shoot-em-up. Collect as many of the blue power-ups as you can to upgrade your puny starting gun into a harm-producing device of chaos. Double jump if you need to, and press down to reload in quiet moments.

Postmortem:

After the success of the first Iron Maiden game we built, EMI comissioned a second. This is the result – a fast paced platform shoot-em-up. I had a specific goal in mind from the start, and that was to make it as over-the-top as possible. I wanted to be able to upgrade the gun tens of levels so that it goes from a weedy pop-gun to a bullet spitting death dealing mayhem device. I achieved that, but somehow a screenful of bullets still wasn’t quite as satisfying as I’d wanted. The solution was a mega-powerup that gives you all the max gun settings, at double the firing rate and with a rose-tinted death-glow over everything. That works quite well!

I think one reason the gun isn’t quite as satisfying as I’d wanted is simply that it doesn’t make much noise. We tried out various sound effects, and none really fitted. Plus, they dominated the sound-stage completely since you’re pretty much firing the entire time you’re playing.

The platforming element works remarkably well for the simplicity behind the scenes. Everything is based on a simple hit-shape that defines where the ground is, and care is taken that you can’t fall so fast as to tunnel through it. The sliding trapdoors are then just animations in that hit shape. So simple! The character can climb gentle slopes and stairs, which is essential if the player isn’t to get stuck on the slightest of objects.

The automatic, fixed pace level scrolling works well to keep the pressure on. It wouldn’t suit all games of course, but it serves its purpose well here. The only downside is that the character animation moonwalks a lot of the time!

Baddie AI is ultra simple too. They are generated at fixed positions in the game, and follow a set path. They shoot at random, but directly towards the player. This is enough in this game’s case to produce plenty of challenge, since there’s lots going on.

We struggled graphically for an explosion sequence. They always just looks pasted on top, rather than being part of the action. In the end, we settled on not having one and instead flashing the baddies brightly for a second and making them fall apart. The result works well!

Whilst this game was well received, it wasn’t anything like as widely played as the first Iron Maiden game we built. I never quite understood why, but very few portals seemed to pick up on it. I don’t think it was seeded any differently to the other game. It was still a success, but nothing like as strong as A Matter of Life and Death.

Lessons:

  • If your game contains a dominant power-up, make sure it is given at designed points in the game rather than at random
  • Everyone loves to fill a screen with bullets
  • Don’t force your character to stop shooting back whilst he’s taking damage!
  • Spend the time to make the character climb up slopes and stairs automatically. It’s well worth it for playability
  • Double jumps add to the fun factor and controlability of a character

Unaccompanied Minors

Friday, November 24th, 2006

unaccompanied-minorsRace against the computer drivers in this all-action speed game! Use the cursor keys to steer your cart around the airport, avoiding crashing into things!

There are three tracks of varying difficulty to race on, and practice/race modes to try out.

Postmortem:

I’ve always loved cars, driving and everything associated, including racing games. I was thrilled to be building a driving game to promote a film, even if the film was one of those Christmas cash-in kids flicks that hardly anyone had heard of (I haven’t even seen it myself, several years later).

Having never built a driving game before, I had a lot of technical issues to solve in a relatively short project build time. Given that the cars in question were airport baggage handlers, I thought it perfectly acceptable to cheat and give them perfectly sticky tyres, which made dealing with things like realistic skids, oversteer, understeer, handbrake turns etc much easier: They simply didn’t exist in this game.

Surprisingly, this technique worked just fine and the game feels perfectly OK. There’s an issue with not being able to see far ahead on the track (partly solved by scrolling the player’s car to the opposite side of the screen to the direction of travel).

To give the illusion of sliding, I added faux skidmarks that fade in whenever the player has been accelerating and turning for more than a set amount of time, and also when they brake. This turns out to be easily sufficient for an arcade racer like this! It’s surprising what shortcuts you can get away with sometimes. Skidmarks are attached permanantly to the track, which is bad for performance but looks great after a few laps.

Graphically, it’s pretty easy to get lost on-track sometimes. You kind of have to learn which way to go on a slow lap, then put your foot down later. I suppose that’s what the practice mode is for, but I can’t help but think it would have put some players off to be constantly crashing into the walls.

On the subject of crashing, the collision detection and response was another technical issue. Car to car collisions were done by detecting when two cars were within a certain distance of each other and tweaking their position apart like billiard balls, then applying a small speed penalty. This works remarkably well, and gentle nudges don’t penalise you much so you can go for those risky overtake opportunities without fear of ending up miles behind. It helps the AI to stay on course too.

Collisions between the cars and the track edges however are not so good. I built several test concepts, none of which really worked before settling on one that was more or less adequate. It still isn’t good though, and really could have done with lots more work if the project were given extra time. The way it works is to test the corners of the player’s kart against a giant hit shape that covers the track. If a corner is in collision, a circle of samples is taken around that point. An approximate line is generated here, and the player’s car is pointed along the reflection vector of this line. The problem however is that the line approximation is a bit flaky, and varies considerably depending on exactly where the samples fall. This means you can be turned unfairly into the wall rather than away from it, or bounced inside the collision shape and all sorts of other horrible artefacts.

One aspect of this game I’m quite proud of is that the AI players are driving cars that are identical to yours. I.e. each AI player has a virtual left, right, up and down control that they can press. The rest of the sim of the car is identical to the human’s car. Except it isn’t collided with the scenery! The AI isn’t smart enough to get out of a bad collision with the edge of the track, and at the time most people’s computers weren’t really fast enough to run the collision detection for all 6 cars together either. The AI follows a virtual track path that differs for their ability. A good AI driver follows a neat track path. A bad AI driver follows a wonky path that misses apexes etc. The path doesn’t define exactly where to drive, but defines a line to be followed if possible. The computer measures its distance from the path and steers towards it appropriately, following an algorithm that real industrial robots use to navigate warehouses. This means it can deal with moderate perturbations from the given path if the player collides with it and pushes it off course.

The game was well received by people who played it, it seems. This may be to do with the fact that most Flash racing games are total junk! In fact, I don’t think I’ve played one yet that I really like a lot, including my own!

Lessons:

  • Racing games are popular!
  • Racing games are tricky to write and balance
  • AI drivers are hard to program!
  • If you spend the time to make a good driving game, spend a bit longer filling it with plenty of tracks too. Three isn’t enough.
  • If you add a bit of code that doesn’t work very well, don’t just accept it! Find a way to make it better or suffer the consequences