When I have trouble figuring out an algorithm I usually opt for a diagram in a program like Dia or on paper. A few days ago I was having a difficult time getting room saving to work properly in Constellation so I decided to draw it out. This time I didn’t use a flow chart or a diagramming program, I just used a napkin. In a few minutes I had sketched out the entire algorithm as it was going to be used in the program instead of building a set of flow charts I would only use once.
I didn’t need a big flow chart and a detailed plan of the algorithm, I just needed to see it. The sketch helped me visualize the steps. It let me refine the idea as I was working through it and spotting design flaws. Sometimes that’s all you need – A pen and paper to be your (very useful) rubber duck.
A few days ago I decided to work on a project just for fun. I called it Constellation because it sounded cool. I had no big plans or expectations for the code, I just wanted to have some fun with it for a few hours. I decided to use Ruby and try to see real results in one night. Usually these little projects don’t turn into anything and I toss the code into an “archive” to reference a couple of times a year, but this one’s different.
Writing my own text-based game engine is something I have wanted to do for a long time. I’ve played MUD‘s off and on for years and there’s something I like about text adventures. It’s like comparing reading a book to watching a movie; it’s a different experience. There is no lag, no glitchy physics, flickering textures or any of the other problems that graphical games can have to break the player’s immersion. Imagination can create more moving visuals than the most advanced rendering technology. Continue reading