Wednesday, November 21, 2007

A Game with Balls

For a new type of Prodent toothpaste, we've made a game where you walk around a club/disco trying to pick up girls or guys (yes, we're gay-friendly :)

Your breath smells, because you didn't brush your teeth, whenever you touch someone, they pass out from your death-breath and you lose a life. But when you pick up a tube of toothpaste, or a Menthol-ball (ahh.. 'a game with Balls' now I get it) then you can approach the guys or gals and 'score' but be careful, your fresh-breath only lasts a small amount of time.

Everytime you score, more characters come into the club, so the place just keeps on getting busier.

The characters in the game move around the club semi-randomly, with a very simple route-planning logic.

Basically, they pick a random direction and distance to walk to, then check if that trip is actually reachable (no obstacles in between), and if it is, walk to the new location.

I've used a bitmap to also guide the characters around the club, and made them follow this path roughly 'most of the time' while sometimes they pick a completely random destination. This way you don't get characters walking around the club in the same way all the time.
In this bitmap, I colored the pixels in a certain way, using the Blue value to tell the characters where they should move (or color 0 = not allowed to be here)

0x000011 means, move right
0x000022 means move down and right
0x000033 means move down

Usin this bitmap means that you dont have to draw a lot of obstacles and do collision detection on those to make sure the character only go where they're supposed to, and not walk through walls for example. Now I can just check for a pixelcolor, which is a lot faster.

To play the game, first, pick if you're a boy or a girl, then pick if you like boys or girls.

Move around using cursor keys, press space to pick up a tube of toothpaste or menthol ball.

Play the game : A game with balls

And let me know what you think :)

No comments:

Post a Comment