A Growing Prince

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.

Desktop 12-24-2015 12-50-46 AM-771

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.


Deprecated: Function comments_rss is deprecated since version 2.2.0! Use get_post_comments_feed_link() instead. in /home/dh_sandaag/allaroundgames.net/blog/wp-includes/functions.php on line 5413
This entry was posted in Game Jams and tagged , , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

One Comment


  1. Fatal error: Uncaught Error: Call to undefined function ereg() in /home/dh_sandaag/allaroundgames.net/blog/wp-content/themes/aag_theme/functions.php:68 Stack trace: #0 /home/dh_sandaag/allaroundgames.net/blog/wp-content/themes/aag_theme/functions.php(26): commenter_link() #1 /home/dh_sandaag/allaroundgames.net/blog/wp-includes/class-walker-comment.php(184): custom_comments(Object(WP_Comment), Array, 1) #2 /home/dh_sandaag/allaroundgames.net/blog/wp-includes/class-wp-walker.php(147): Walker_Comment->start_el('', Object(WP_Comment), 1, Array) #3 /home/dh_sandaag/allaroundgames.net/blog/wp-includes/class-walker-comment.php(139): Walker->display_element(Object(WP_Comment), Array, '5', 0, Array, '') #4 /home/dh_sandaag/allaroundgames.net/blog/wp-includes/class-wp-walker.php(390): Walker_Comment->display_element(Object(WP_Comment), Array, '5', 0, Array, '') #5 /home/dh_sandaag/allaroundgames.net/blog/wp-includes/comment-template.php(2346): Walker->paged_walk(Array, '5', 0, 0, Array) #6 /home/dh_sandaag/allaroundgames.net/blog/wp-content/themes/aag_theme/comments.php(43): wp_list_comments('type=comment&ca...') #7 /home/dh_sandaag/allaroundgames.net/blog/wp-includes/comment-template.php(1591): require('/home/dh_sandaa...') #8 /home/dh_sandaag/allaroundgames.net/blog/wp-content/themes/aag_theme/single.php(41): comments_template('/comments.php', true) #9 /home/dh_sandaag/allaroundgames.net/blog/wp-includes/template-loader.php(106): include('/home/dh_sandaa...') #10 /home/dh_sandaag/allaroundgames.net/blog/wp-blog-header.php(19): require_once('/home/dh_sandaa...') #11 /home/dh_sandaag/allaroundgames.net/blog/index.php(17): require('/home/dh_sandaa...') #12 {main} thrown in /home/dh_sandaag/allaroundgames.net/blog/wp-content/themes/aag_theme/functions.php on line 68