Category Archives: Programming

7DRL 2013: Husk

My 7DRL 2013 entry is titled Husk. I’ve written a post about Day 1 here.

Marching into Hell

Between my six months working at Romney for President, my vacation to San Francisco, and my new job at AppNeta I’ve had a hell of a time working on Hellmouth. I have a great development roadmap that should land me at a beta before the end of the year, and I’ve made some really exciting backend changes, but as a game it doesn’t play any different than it did a year ago. In some sense, it’s actually buggier – there have been a lot of regressions that I haven’t yet addressed since I’m regularly gutting entire portions of the codebase.

About a month ago, I decided to dedicate as many Saturdays as possible to Hellmouth development. This decision was partially prompted by the announcement of 7DRL 2013, which will be using Hellmouth’s (currently unnamed) framework. I’m arbitrarily defining success as spending at least 12 hours exclusively coding to the extent possible (I already plan too much, and eating is optional).

I wasn’t so successful the first few attempts, but it’s starting to pay off, and yesterday I managed to program for about 20 hours with minimal breaks. And apparently, it’s paying off! There’s a noticeable LOC uptick even though my recent commits have involved a ton of churn. Here’s what the line count looks like file-by-file:

eronarn@Carcosa:~/Code/Hellmouth$ find . -name '*.py' | xargs wc -l | sort -nk 1
 4 ./src/games/hellmouth/
 5 ./src/games/hellmouth/
 5 ./src/games/meat_arena/
 9 ./src/lib/util/
 11 ./src/lib/util/
 11 ./src/lib/util/
 11 ./src/lib/util/
 11 ./src/lib/util/
 13 ./src/lib/data/
 17 ./src/lib/objects/items/
 17 ./src/lib/util/
 18 ./src/lib/objects/items/
 19 ./src/games/meat_arena/levels/
 25 ./src/lib/components/views/screens/
 25 ./src/lib/util/
 28 ./src/lib/data/
 31 ./src/lib/util/
 32 ./src/lib/agents/actors/
 32 ./src/lib/objects/items/
 35 ./src/lib/agents/components/
 36 ./src/lib/objects/items/
 37 ./
 41 ./
 44 ./src/lib/agents/components/
 46 ./src/lib/data/
 50 ./src/lib/generators/
 50 ./src/lib/util/
 63 ./src/lib/data/generators/
 67 ./src/lib/util/
 76 ./src/lib/data/generators/
 77 ./src/lib/data/
 80 ./src/lib/objects/
 80 ./src/lib/wip/
 81 ./src/games/meat_arena/agents/actors/
 81 ./src/lib/data/generators/
 85 ./
 86 ./src/lib/util/
 87 ./src/lib/generators/
 93 ./src/lib/generators/
 94 ./src/lib/util/
 104 ./src/lib/agents/actors/
 118 ./src/lib/util/
 120 ./src/lib/agents/components/
 120 ./src/lib/util/
 122 ./src/lib/data/generators/
 129 ./src/lib/util/
 132 ./src/lib/agents/contexts/
 141 ./src/lib/generators/maps/
 142 ./src/lib/agents/contexts/
 142 ./src/lib/generators/maps/
 142 ./src/lib/util/
 144 ./src/games/meat_arena/levels/chargen/
 146 ./src/games/meat_arena/levels/
 147 ./src/lib/components/views/screens/
 147 ./src/lib/generators/text/
 150 ./src/lib/generators/text/
 155 ./src/lib/agents/components/
 159 ./src/lib/components/views/
 163 ./src/lib/data/
 167 ./src/games/meat_arena/
 174 ./src/lib/components/
 182 ./src/lib/agents/actors/ai/
 184 ./src/lib/agents/components/
 201 ./src/lib/maps/
 225 ./src/lib/maps/
 246 ./src/lib/maps/
 247 ./src/lib/data/
 247 ./src/lib/util/
 266 ./src/lib/agents/components/
 273 ./src/lib/agents/
 278 ./src/lib/agents/components/
 284 ./src/lib/components/
 296 ./src/lib/objects/items/
 329 ./src/games/meat_arena/levels/chargen/
 414 ./src/lib/agents/components/bodies/
 456 ./src/lib/agents/components/bodies/
 519 ./src/lib/agents/components/
 601 ./src/lib/data/
 624 ./src/lib/util/
 671 ./src/lib/components/views/
 984 ./src/lib/agents/actors/
 998 ./src/lib/data/
 13202 total

In the latest batch of changes I’ve written a base Agent class shared by everything from Actors to Terrain, switched over to an entity-component system for Agents, refactored almost all Agent methods as mixins, rewritten key handling and added more generic event handling, added a variety of nifty decorators, and rewritten some important parts of action logic as Python generators.

Unfortunately, most of those changes haven’t actually make the game play any differently, so it looks basically the same as it did a year ago. However, the most recent round of changes has at least made the framework much more flexible, which should help me during the 7DRL. (Fingers crossed!)

With a little help from my friends…

(Screenshots at the bottom of this post.)

One of my design goals in Hellmouth is to emphasize knowledge and perception as alternative playstyles by making them as game-changing as combat attributes are in most games. Consequently, there will typically be a lot of information about a situation available to the player at any one time. Games that provide a lot of information can be very intimidating, and unfortunately one of my favorite games is well-known for failing to usefully communicate its rich complexity.

One of the ways that I’ll get a handle on information overload is by providing reasonable defaults but allowing the player a lot of control over the ultimate level of detail dislayed. There will be many LOD-based implementations throughout the game (such as item descriptions or combat text), but one of the most important to have is also one of the simplest to implement: a zoom control for the tactical map. Read more »

Meat Arena v0.2

I’ve been putting a lot of time into Hellmouth lately. Since I’ve made enough progress that I feel comfortable doing an alpha release, I just pushed the 0.2-meat tag on Github. It’s the first tag since the 7DRL version, and trying to assemble a full changelist would be insane. However, I’ve touched upon some of the improvements here.

That page also details your options for playing Meat Arena.

Screenshots from the past few days below the fold.
Read more »

Editing color schemes of console applications

Lately I’ve been working on Hellmouth‘s combat interface. While I’ll be giving weapon choice a dedicated submenu, I’d like it to appear on the main screen as well. Unfortunately, I didn’t properly account for this in the initial interface design document. While I can change that design, I’m almost completely out of room so any change needs to be done carefully. Since it’s irritating to have to restart the game and seek out appropriate test cases after editing code, I started looking for a way to take an HTML screenshot of a console application.

About thirty seconds later, I remembered that I had Hellmouth running in shellinabox on my server! Read more »


Yes, this actually happened on the first time I went to take a screenshot.

Hellmouth progress update

I’ve been putting my free time to good use working on Hellmouth. Here’s what I’ve added to the game since my last post about it:

  • combat
  • cross-level travel
  • A* pathfinding
  • an attribute and skill system
  • random map generation
  • random item generation
  • elemental color support
  • several major new interface features
  • folder structure

If I keep working at my current pace, the first beta release will be within a week or so. I’ve created a page for Hellmouth on Roguebasin, and I’ll fill that out with more information about the game when it happens.

There are some new development screenshots below the fold. Read more »

Uploading bash output within IRSSI

I’m hardly an IRSSI power-user, but I occasionally make use of its more advanced features. While IRSSI already allows shell execution, it’s handy to have an alias that prints both the command and results to the channel (particularly when you’re running IRSSI on a server). I had previously picked up such an alias from Whales in #rgrd: Read more »

Lifepaths, flowcharts, Edge, and human greed

Hellmouth was my semi-failed entry into the 2012 7DRL competition. I’ve continued to work on it over the past few months, and while the game is still sorely lacking in features, I’ve made some real progress by focusing on building components in isolation from each other as much as possible.

One such component is the character generation system. Hellmouth uses a lifepath system where your decisions about your character’s history affect their capabilities. Here’s what one of Hellmouth’s lifepath nodes looks like: Read more »