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.

3 thoughts on “Hellmouth: Day One”

Leave a Reply