Hell­mouth + 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 whirl­wind of activ­ity. Like I men­tioned in my pre­vi­ous post, I knew that my time con­straints would pre­vent me from bring­ing Hell­mouth to the level of detail that I would’ve liked. I tried to focus on fea­tures that would be appeal­ing in a min­i­mal game. Color seemed the most obvi­ous one, so I started my day off with that. Unfor­tu­nately, set­ting up col­ors in curses took way longer than I expected and I then had to scram­ble to make said min­i­mal game actu­ally playable. With about two hours left on the clock, and still miss­ing sev­eral major fea­tures, I decided on the new theme: MEAT ARENA. Con­tinue read­ing

Hell­mouth: Day Four & Five

Today I focused on get­ting Hell­mouth into a min­i­mally playable state. This means bor­ing fea­tures like an action queue, print­ing stats in the inter­face (still filler data, but at least it’s com­ing from the player object), and so on. How­ever, that’s all bor­ing bull­shit com­pared to the coolest fea­ture added in the past 48 hours:

That’s right – loca­tional damage! The cur­rent wound inter­face prints how many points of dam­age resulted in each wound on that loca­tion. This is mostly a debug tool: since 1 dam­age on a body part won’t nec­es­sar­ily cause 1 dam­age to you, the only time you’ll care about any­thing other than broad ‘fine/​hurt/​crippled’ brack­ets is when healing. Note that the val­ues won’t go that high in the game… unless you’re incred­i­bly unlucky.

From here it’s just a hop and a skip to grue­some dis­mem­ber­ment and decap­i­ta­tion for all. In fact, I’ll prob­a­bly scale my 7DRL down to mostly be a body part dam­age sim­u­la­tor. Work­ing three days out of my chal­lenge (with a five hour com­mute each day!) won’t make me fail the chal­lenge, but it will eat into my pol­ish­ing time dramatically.

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

Just look at those suck­ers go! :D  Cur­rently they just move ran­domly (and attack what­ever they try to move into), but I hope to add some basic AI tomor­row night to make invest­ment into the com­bat mechan­ics a bit more fruitful.

There’s more work to be done, of course. Even in writ­ing this post I found two bugs – sort­ing the wound list isn’t work­ing and the player glyph dis­ap­pears if you stand still. Back to the code mines!

Hell­mouth: Day Two & Three

Unfor­tu­nately, Day Two was a com­plete bust. I stopped cod­ing shortly before my Day One post and didn’t end up with any free time until sev­eral hours after Day Two was over.

Day Three has been some­what bet­ter. Right after con­vinc­ing myself that I was going to get noth­ing done today and whin­ing in IRC about it, I sat down for a bit to try to code some­thing. It worked, and I pro­ceeded to ham­mer out sev­eral new fea­tures in a few hours. It felt pretty good! It’s not much com­pared to my Day One sprint, but it’s at least more than I expected.

Here’s what Hell­mouth looks like right now:

Most impor­tantly, every­thing nec­es­sary for hex move­ment and ren­der­ing actu­ally works! The @ is the player (admit­tedly, it’s cur­rently ren­dered with a really ugly hack I added just for this post); the Xs are FOV cells beyond the map bound­ary (and thus inac­ces­si­ble); the other sym­bols are just ran­domly gen­er­ated glyphs to make test­ing move­ment easier.

After get­ting hexes work­ing, I turned my atten­tion to the inter­face. I don’t think there’s much spe­cial here, but I do like the way in which I’m ren­der­ing the stats. I’m also using that approach for the sta­tus lights, which will work sim­i­larly to those in Dun­geon Crawl (except show­ing up closer to the action due to the hexag­o­nal layout).

The com­bat log is a lit­tle short, but you’ll usu­ally be fight­ing sin­gle oppo­nents. Like the sta­tus lights, I intend to max­i­mize my use of space, so the tri­an­gle to the left of the log will con­tain an inter­face for scrolling through past entries with­out hav­ing to obscure the map.

I’m hop­ing to turn the reserved area into a paper­doll dis­play­ing your health sta­tus. The game will fea­ture hit loca­tions, and print­ing a list of them would take up a lot of space. Unfor­tu­nately, draw­ing a paper­doll with ASCII is quite dif­fi­cult and get­ting Uni­code to work con­sis­tently could be an uphill battle.

Even­tu­ally, I’d like to print some other infor­ma­tion: cur­rently wielded weapon, a min­imap, cur­rently viewed enemy stats (with tog­gle for a larger ver­sion with more info), and so on. How­ever, my next focus is going to be some­thing far more impor­tant: combat!

Hell­mouth: 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 Hell­mouth:

Admit­tedly, this isn’t very impres­sive to look at. The player can move around, but there are no mon­sters, items, or ter­rain fea­tures to inter­act with. The fan­ci­est vis­i­ble fea­tures are the hex dis­tance cal­cu­la­tor (but that’s just using a for­mula stolen from the inter­net) and the option selec­tor (which can be con­trolled sep­a­rately with the arrow keys).

Per­haps I’ve under­stated the cool­ness of the lat­ter. It can’t be seen in the screen­shot, but I’ve been mak­ing use of curses sub­win­dows for a MVC-​​ish inter­nal design. Since each view updates inde­pen­dently, there’s no rea­son for a menu that uses the arrow keys to lock you out of mov­ing with the numpad. The goal is that you’ll be able to play Hell­mouth more like a mod­ern game by cycling through other por­tions of the UI even while send­ing com­mands to the main screen. Addi­tion­ally, since draw­ing to a sub­win­dow uses coor­di­nates rel­a­tive to its plac­ing rather than to the ter­mi­nal, I hope to add in the abil­ity to con­fig­ure sub­win­dow posi­tion­ing for a kind of cus­tomiz­able 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 par­tic­u­larly famil­iar with it, but cod­ing in it is a breeze com­pared to last year when I chose Java. (Then again, per­haps my choice indi­cates that I’ve become a bet­ter programmer…)

Using Python has also helped me to pro­duce test scripts using this com­mon Pythonism:

File: lifepath.py

if __name__ == "__main__":
    lifepath_test()

This means that run­ning a test only requires a sim­ple “python lifepath​.py” rather than a spe­cial flag to the main exe­cutable, and helps to seg­re­gate the test code with­out exil­ing it to another file alto­gether. It’s a great setup! You can see the out­put from one such test here.

Lifepaths are the other fea­ture I’ve worked on over the past day. They’re sim­i­lar to the char­ac­ter ‘ques­tion­naire’ sys­tem in ADOM, but with more pro­found effects on your char­ac­ter (and a much bet­ter UI). Per­haps the most impor­tant dif­fer­ence is that your lifepath choices will affect which choices you’re offered in the future (with char­ac­ters mak­ing ~7 choices total). For exam­ple, being born under a dark omen can hap­pen to any­one, but only char­ac­ters kid­napped by changelings as infants will have the oppor­tu­nity to learn faerie magic. There are cur­rently stubs for 51 lifepath events, but there will be at least 70 before I’m done, and pos­si­bly over 100.

That about wraps up my first day (and with 30 min­utes to spare, too!). I’ll be los­ing most of tonight to an unex­pected visit from a friend, and I’ll be work­ing for three days out of the chal­lenge week. How­ever, I’ll try to get at least some­thing done each day regardless.