PAYNEful - the site where humour goes to die, the repository of all things by Sean Patrick Payne

About Labb Rat

Labb Rat is a text-based adventure game utilising multiple choice answers to progress.

About the Project

Labb Rat was my final year university project, with the proposition that you could utilise the scripting language to build a text-based adventure game. Aside from being something I'd always wanted to do since taking web design as a degree, it would also give me incentive to learn PHP as my knowledge in it, up until that point, had been horribly lacking.

Unfortunately, like most university students, I was a lazy sod who had more pressing things on my mind during the six months I was supposed to be spending on project work (things like Uncharted 2 and Batman: Arkham Asylum). I managed to blag the first half of the project with level concepts, maps and research into adventure game design.

At some point in March 2010 I decided that it might be a good idea to do some actual proper work, but didn't fancy sitting down and learning PHP; after all, there was still a month and a half to go! So instead I wrote the final report based on an estimation of how much of the game I'd be able to create and had most of it completed the month before hand-in.

As typical of most students I lacked foresight and the other four or five projects around that time stole what time I had been planning to build the game. It came to 24 hours before hand-in and I had no game. Sitting down in front of my computer with a PHP textbook, I sat and coded from about 12:00PM to 3:00AM the next morning. The results of that late night coding spree are available to play here.

In fairness, my memory is a little foggy on the matter but I swear that it really was the 24 hours before hand-in, which seems terribly irresponsible and yet I'm still fairly proud of what I achieved in those 24 hours.

The game presented here is pretty much the same code that was handed in, bar some tweaks. It's fairly clunky and the code would probably make proper web developers weep but it works for the most part. All I've done is make a few style tweaks and add in some code to hopefully deter massive cheating.

The original intention was to require that the player type in what they want to do like traditional text-based games (like the Hitchhiker's Guide to the Galaxy game) but after realising that I'd literally have to match countless combinations I went with having multiple choice input instead, more like those "choose your own adventure" books.

I have no idea if this game is technically property of my University since I handed it in - I know that many educational institutions have insidious fine print that makes claim to the better projects of its academics, and if my university wants this little effort then they can have it as there's nothing particularly innovative or revolutionary about how it's been put together or what it does.

How to Play

It's really very simple: you will be presented with different scenarios and all you have to do is click the button that matches the course of action you want to take.

For example, you might be presented with the situation where you are on a plummeting plane (you won't be but we're talking theoretical here). The options might be:

All you have to do is pick the action you want to take, it's really that simple. In this specific case, since you're not wearing a parachute and have no pilot training, both would kill you (obviously).

Labb Rat is fairly forgiving when it comes to which course of action will kill you and give you a game over, but it might be a good idea to occasionally pick the wrong answer just for kicks; I spent a lot of time writing those death scenes!


I have not extensively tested this game with different browsers and the like. If you play it and it breaks for you, please do let me know how it broke and I might be able to do something about it.

Play Labb Rat