For Ludum Dare 34 I created a small game called A Growing Prince. The game itself was largely incomplete and lacked a lot of expected features. I then preceded to finish/create a game that was functionally complete. This is a small part of a larger project that I will go into more depth about at a later time. Below is a Screen Shot, the game is not much to look at, but that is the roll of a text based adventure game. You can play the game right now, right here. Below will be some thoughts about the game, and how it all works.
This is a reposting from my personal blog over at blog.allaroundgames.net If you want to stay up to date with my blog you can subscribe over there. I'll always post there first.
Assuming that you followed the link above you will have noticed that you can just start playing the game. No logging in, no registering or anything. Yet the game is still saved for you, so that you can play it over a few days. This was one of the fundamental goals of creating this style of game. I also did not want to make use of a mysql database to accomplish it. I like the idea of having a lighter weight web browser game. What happens is that I take your ip address (in theory each user has a unique ip, in practice it is not so) from this I create a file that store the variables in a text file. Then each page reload I recreate the file that stores your data.
That was the basis of the game, and what I accomplished for the Ludum Dare version of the game. for Ludum dare I just added some really simple leveling/game logic and that was it. There was no way to lose, no way to move around, and no story. It wasn’t a game so much as a test to see what I could do with this style of game engine.
Post Ludum Dare I wanted to expand the game, I wanted to add a story, a location, and build something of a world. I don’t claim that the story is good, but it is there. The text was handled dynamically, rather than writing just the four lines of text that you see I wrote all of the lines of text, then I just had to clip it down to the proper size. This proved a little bit tricky because I needed to have respect to the words and not just cut them off. But the php function of wordwrap can be used to accomplish this goal. Then I just load them into an array and pick the array value based on the id starting at zero and progressing based on input.
The next part was to add combat to the game. I wanted a simple turn based combat system, You strike the enemy, if they don’t die then they strike back. The damage and armor stats come into play for combat. It is really just simple math with a few other factors added in to add some variation. The mob stats are set in the player file and stored there until they are defeated.
The final part of the game (although I actually worked on it first) was to add movement to the game. The player needed an actual location, the first step was just to add a X and Y position variable to be stored. Next I needed to create the actual maps, simple enough to do with a max size value. Then I added a peppering of Treasure Chests, NPC, and teleporters (to change maps).
Those are the three biggest features that were missing from the Ludum Dare version of the game. With them in place now the game feel a lot more like a game, and presents a challenge. I still think of it more as a engine experiment than a serious game, but it presents the possibilities that can be pursued later on.
If there is interest in the game and seeing how it works I would be willing to released the code as open source. If you are interested just let me know in the comments below.