December 20, 2009

Ghost in the Phone

After spending a lot more work on the menu system than anyone should be expected to handle, I finally took the time to implement the time-trial mode ghost cars.

As I had expected, it was a lot easier to implement than the AI cars. As a bonus, it also needed less than half of the CPU cycles to run it. The ghost cars are essentially keyframed animations recorded when you play. The keyframes and some meta data are serialized to a plain text ghost file format.

We all know how fun it is to race against a ghost of yourself or a friend. I have fond memories of I and my brother playing Moto Racer on my first PC. Naturally, we want to enable this competitive excitement in our game, even when you play a quick game on the bus. (Or if you don't have any friends.)

Anyway... Ghosts are uploaded to our server and shared with other player over the world. You race against your own best time, plus two downloaded ghosts. Whenever you beat the best one, it will be replaced by a new one, at least 0.3 seconds faster than your best time. This means you will always race against ghosts slightly better or worse than yourself.

The result is a great gaming experience! Even after playtesting this all day long the last few days, it's still hard to put the game down when you lost the race by a fraction of a pixel.

Another great thing is that when you drive alongside a ghost, you can easily spot the tiniest gain or loss as you cut corners along the race track, allowing you to perfect your driving technique.


  1. I read this blog once, then lost it. Took me forever to come back and find it. I wanted to see what comments you got. Great blog by the way.
    Racing Games

  2. However instead of risking such actions from the authorities the best thing is to acquire a cheap auto insurance Massachusetts which should serve you well as long as you are in the state. Any wise car owner knows that the risk associated with driving without valid auto insurance is not worth it.
    Learn more

  3. Upon the receipt of the utilized iPhone, assess the thing precisely for outside harm and inside water harm, and afterward test the thing to ensure it works.

  4. Sounds pretty good, doesn't it? Can you just feel the rush of adrenaline your son will get when he sees all the party decorations set up? He will feel like he is on that track, with you and Dad as his party pit crew.automoves

  5. It is basically a website that holds the details of your app and is used to send your iPhone app binary code to Apple for them to approve..Visit website

  6. Apple utilizes an armada of automatons to make the upgraded Maps App give more significant bearing and data to clients. Check This Out

  7. Amazing work on the writer's part and This blog has a positive and excited outcome.
    Rogue buddies 2 unblocked

  8. I know this is a really old post, but thank you anyway.
    Minecraft APK

  9. The power supply gives out three different DC voltages to your computer 12VDC, 5VDC, and 3VDC which are used differently by computer components.Best Pickleball Paddles

  10. Moreover, with a wide range of applications that an iPhone offers, people have become so dependent on their iPhones that they find it difficult to stay away from it for even an repair


Games, design and programming for web and handheld devices.