Monthly Archives: March 2013

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/main.py
 5 ./src/games/hellmouth/info.py
 5 ./src/games/meat_arena/info.py
 9 ./src/lib/util/mixin.py
 11 ./src/lib/util/dynamic.py
 11 ./src/lib/util/log.py
 11 ./src/lib/util/math.py
 11 ./src/lib/util/time.py
 13 ./src/lib/data/dialogue.py
 17 ./src/lib/objects/items/collection.py
 17 ./src/lib/util/system.py
 18 ./src/lib/objects/items/armor.py
 19 ./src/games/meat_arena/levels/screens.py
 25 ./src/lib/components/views/screens/help.py
 25 ./src/lib/util/event.py
 28 ./src/lib/data/help.py
 31 ./src/lib/util/debug.py
 32 ./src/lib/agents/actors/player.py
 32 ./src/lib/objects/items/modifiers.py
 35 ./src/lib/agents/components/movement.py
 36 ./src/lib/objects/items/carrion.py
 37 ./test.py
 41 ./traits.py
 44 ./src/lib/agents/components/component.py
 46 ./src/lib/data/art.py
 50 ./src/lib/generators/points.py
 50 ./src/lib/util/color.py
 63 ./src/lib/data/generators/items.py
 67 ./src/lib/util/text.py
 76 ./src/lib/data/generators/points.py
 77 ./src/lib/data/traits.py
 80 ./src/lib/objects/terrain.py
 80 ./src/lib/wip/overworld.py
 81 ./src/games/meat_arena/agents/actors/monsters.py
 81 ./src/lib/data/generators/equipment.py
 85 ./main.py
 86 ./src/lib/util/key.py
 87 ./src/lib/generators/items.py
 93 ./src/lib/generators/generator.py
 94 ./src/lib/util/result.py
 104 ./src/lib/agents/actors/npc.py
 118 ./src/lib/util/db.py
 120 ./src/lib/agents/components/status.py
 120 ./src/lib/util/dice.py
 122 ./src/lib/data/generators/text.py
 129 ./src/lib/util/command.py
 132 ./src/lib/agents/contexts/combat.py
 141 ./src/lib/generators/maps/meat.py
 142 ./src/lib/agents/contexts/context.py
 142 ./src/lib/generators/maps/mapgen.py
 142 ./src/lib/util/define.py
 144 ./src/games/meat_arena/levels/chargen/lifepath.py
 146 ./src/games/meat_arena/levels/arena.py
 147 ./src/lib/components/views/screens/screen.py
 147 ./src/lib/generators/text/describe.py
 150 ./src/lib/generators/text/combat.py
 155 ./src/lib/agents/components/action.py
 159 ./src/lib/components/views/view.py
 163 ./src/lib/data/screens.py
 167 ./src/games/meat_arena/main.py
 174 ./src/lib/components/component.py
 182 ./src/lib/agents/actors/ai/astar.py
 184 ./src/lib/agents/components/container.py
 201 ./src/lib/maps/encounter.py
 225 ./src/lib/maps/cell.py
 246 ./src/lib/maps/map.py
 247 ./src/lib/data/skills.py
 247 ./src/lib/util/hex.py
 266 ./src/lib/agents/components/equipment.py
 273 ./src/lib/agents/agent.py
 278 ./src/lib/agents/components/combat.py
 284 ./src/lib/components/input.py
 296 ./src/lib/objects/items/item.py
 329 ./src/games/meat_arena/levels/chargen/chargen.py
 414 ./src/lib/agents/components/bodies/body.py
 456 ./src/lib/agents/components/bodies/parts.py
 519 ./src/lib/agents/components/manipulation.py
 601 ./src/lib/data/items.py
 624 ./src/lib/util/hex_fov.py
 671 ./src/lib/components/views/tactical.py
 984 ./src/lib/agents/actors/actor.py
 998 ./src/lib/data/lifepaths.py
 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!)