Skip navigation

Category Archives: Uncategorized

Quick update: I finally finished the game engine for Kleptos! Celebration!

I’m now going to be putting together the flow of the actual game (events, puzzles, items, etc.). It’s going to be ridiculously simple compared to the effort that went into making the game work – I have about a dozen really easy puzzles planned. Naturally, I will continue to tweak the engine as I begin the content phase.

Although Kleptos is not going to be very much, in the end, I will have had practice building a framework that I could either immediately apply to more complicated games (say, a fuller Kleptos where this is only the first level) or further refine as a learn how to apply it to other genres – other text-based games (such as roguelikes) or even graphics-based games.

I’m sure that existing engines/libraries, such as pygame and flixel, can do a lot more: I’m not celebrating having inventing the wheel. But it’s good to know I can work through problems like this. Who knows? Maybe I might be able to contribute something to the game development world in the future.


Ok, so I’m still working out the engine for Kleptos, my text adventure project, but I am almost finished. This means that the rest of it is going to go very quickly, and I could be finished relatively soon. I’m going out of town Friday through Sunday, so I miss out on a fair amount of time I could be coding, so I expect to be done sometime next week. Exciting.

So my content management system is pretty much finished. It basically runs like this: when the game opens, an object I called the Library reads a bunch of files in a directory system I created for the project. The files make up all of the content of the game (as opposed to its structure), from the introduction and back story, to the description of each room of the house that appear at the top of the screen, to lists of possible commands.

The files are read into the Library one of 4 ways, based on how I want the game to handle it:

  1. as a big old chunk of text
  2. as a list
  3. as a dictionary, with every other line being a key and and a string as an item
  4. as above, but the items are all lists containing strings

So, for example, a list of items in the game would look like this in the text file:

stab slice dice
lock unlock
light throw
drop throw

and would look like this, once Library has read it:

{"dagger":["stab","slice","dice}, "key":["lock","unlock"], "lamp":["light","throw"], "rock":["drop","throw"]}

From that point, it is a simple matter for the program to add and subtract words from the player’s vocabulary, depending on what his or her inventory contains at the moment. (E.g., you can only “stab” when you have the dagger.)

I was considering explaining some other aspects of the game, but it would take too long, and I’d like to wait until it’s all finished. I’ll say for right now that most of the game’s functionality is wrapped up in this system, where all the content is mapped out in text files, rather than in the code itself. I like the idea of keeping the two processes – composing the game and coding the game – separate. They are intertwined but nonetheless distinct.

I’m going make a point of posting more updates than usual as I get closer to my goal. I’d like to get some good practice in explaining what I’m doing – I can get tongue- (and finger-) tied trying to make it even barely comprehensible to other people, sometimes.

Happy coding, everyone!

Wherever man adheres to being something or doing something, there his roots remain in the human, and out of his roots he can become whole, and in whatever he engages himself, in knowledge or in the word, in beauty or in joy, in death or in eternal honor, he can be saved through himself and can himself establish his life. But where man adheres to the illusion of possessing something, there he tears up his roots out of the human; they no longer draw up healing to him from out of the human earth, and I know no help for him.


— Martin Buber (after Rabbi Nachman of Bratzlav), “The Master of Prayer”