Hellmouth + MEAT ARENA: Day Six & Seven

Day Six was, like Day Four and Day Two before it, a non-starter.

Day Seven, on the other hand, was a whirlwind of activity. Like I mentioned in my previous post, I knew that my time constraints would prevent me from bringing Hellmouth to the level of detail that I would’ve liked. I tried to focus on features that would be appealing in a minimal game. Color seemed the most obvious one, so I started my day off with that. Unfortunately, setting up colors in curses took way longer than I expected and I then had to scramble to make said minimal game actually playable. With about two hours left on the clock, and still missing several major features, I decided on the new theme: MEAT ARENA. Continue reading “Hellmouth + MEAT ARENA: Day Six & Seven”

Hellmouth: Day Four & Five

Today I focused on getting Hellmouth into a minimally playable state. This means boring features like an action queue, printing stats in the interface (still filler data, but at least it’s coming from the player object), and so on. However, that’s all boring bullshit compared to the coolest feature added in the past 48 hours:

That’s right – locational damage! The current wound interface prints how many points of damage resulted in each wound on that location. This is mostly a debug tool: since 1 damage on a body part won’t necessarily cause 1 damage to you, the only time you’ll care about anything other than broad ‘fine/hurt/crippled’ brackets is when healing. Note that the values won’t go that high in the game… unless you’re incredibly unlucky.

From here it’s just a hop and a skip to gruesome dismemberment and decapitation for all. In fact, I’ll probably scale my 7DRL down to mostly be a body part damage simulator. Working three days out of my challenge (with a five hour commute each day!) won’t make me fail the challenge, but it will eat into my polishing time dramatically.

So, where did those wounds come from? The NPCs, of course!

Just look at those suckers go! 😀 Currently they just move randomly (and attack whatever they try to move into), but I hope to add some basic AI tomorrow night to make investment into the combat mechanics a bit more fruitful.

There’s more work to be done, of course. Even in writing this post I found two bugs – sorting the wound list isn’t working and the player glyph disappears if you stand still. Back to the code mines!

Hellmouth: Day Two & Three

Unfortunately, Day Two was a complete bust. I stopped coding shortly before my Day One post and didn’t end up with any free time until several hours after Day Two was over.

Day Three has been somewhat better. Right after convincing myself that I was going to get nothing done today and whining in IRC about it, I sat down for a bit to try to code something. It worked, and I proceeded to hammer out several new features in a few hours. It felt pretty good! It’s not much compared to my Day One sprint, but it’s at least more than I expected.

Here’s what Hellmouth looks like right now:

Most importantly, everything necessary for hex movement and rendering actually works! The @ is the player (admittedly, it’s currently rendered with a really ugly hack I added just for this post); the Xs are FOV cells beyond the map boundary (and thus inaccessible); the other symbols are just randomly generated glyphs to make testing movement easier.

After getting hexes working, I turned my attention to the interface. I don’t think there’s much special here, but I do like the way in which I’m rendering the stats. I’m also using that approach for the status lights, which will work similarly to those in Dungeon Crawl (except showing up closer to the action due to the hexagonal layout).

The combat log is a little short, but you’ll usually be fighting single opponents. Like the status lights, I intend to maximize my use of space, so the triangle to the left of the log will contain an interface for scrolling through past entries without having to obscure the map.

I’m hoping to turn the reserved area into a paperdoll displaying your health status. The game will feature hit locations, and printing a list of them would take up a lot of space. Unfortunately, drawing a paperdoll with ASCII is quite difficult and getting Unicode to work consistently could be an uphill battle.

Eventually, I’d like to print some other information: currently wielded weapon, a minimap, currently viewed enemy stats (with toggle for a larger version with more info), and so on. However, my next focus is going to be something far more important: combat!

Hellmouth: Day One

7DRL 2012 has been intense for me this time around. I can hardly believe that it’s only been a day! Here’s my progress so far on Hellmouth:

Admittedly, this isn’t very impressive to look at. The player can move around, but there are no monsters, items, or terrain features to interact with. The fanciest visible features are the hex distance calculator (but that’s just using a formula stolen from the internet) and the option selector (which can be controlled separately with the arrow keys).

Perhaps I’ve understated the coolness of the latter. It can’t be seen in the screenshot, but I’ve been making use of curses subwindows for a MVC-ish internal design. Since each view updates independently, there’s no reason for a menu that uses the arrow keys to lock you out of moving with the numpad. The goal is that you’ll be able to play Hellmouth more like a modern game by cycling through other portions of the UI even while sending commands to the main screen. Additionally, since drawing to a subwindow uses coordinates relative to its placing rather than to the terminal, I hope to add in the ability to configure subwindow positioning for a kind of customizable UI (but that might have to be a post-7DRL enhancement).

I’m immensely pleased with my choice to use Python this time around. I’m still not particularly familiar with it, but coding in it is a breeze compared to last year when I chose Java. (Then again, perhaps my choice indicates that I’ve become a better programmer…)

Using Python has also helped me to produce test scripts using this common Pythonism:

File: lifepath.py

if __name__ == "__main__":

This means that running a test only requires a simple “python lifepath.py” rather than a special flag to the main executable, and helps to segregate the test code without exiling it to another file altogether. It’s a great setup! You can see the output from one such test here.

Lifepaths are the other feature I’ve worked on over the past day. They’re similar to the character ‘questionnaire’ system in ADOM, but with more profound effects on your character (and a much better UI). Perhaps the most important difference is that your lifepath choices will affect which choices you’re offered in the future (with characters making ~7 choices total). For example, being born under a dark omen can happen to anyone, but only characters kidnapped by changelings as infants will have the opportunity to learn faerie magic. There are currently stubs for 51 lifepath events, but there will be at least 70 before I’m done, and possibly over 100.

That about wraps up my first day (and with 30 minutes to spare, too!). I’ll be losing most of tonight to an unexpected visit from a friend, and I’ll be working for three days out of the challenge week. However, I’ll try to get at least something done each day regardless.