Monday, July 30, 2012

Tangled Web

Got a good chunk of time this evening and decided to rip out and replace more guts; in this case, the dependency structure of the goal system.  The prototype involved a verbose and redundant system of class factories, and they're simply not carrying their weight.  Much better, it seems, will be to implement the dependency structure with the Boost Graph Library, which I'm already using for levels.  I had wanted this originally, so now that I'm more familiar with the tools seems a good time.

Naturally, it's a huge mess.  I think this will cut out a lot of friction for me, though, with the ongoing plot work.  For now, there's a lot of old code commented out, and some half-written graph code awaiting further brain cycles.

Sunday, July 29, 2012

On the Questing Path

My work to integrate the quest generation prototype into the game proper has come along a good way, and afforded me the opportunity to tighten up some bolts and introduce useful infrastructure.  I unified and rearranged the UI, and re-routed all the text output through the event system (so now I'm not passing output stream handles around everywhere, which is nice).  The event system has also provided a nicely succinct way to handle quest goal satisfaction, since different goals are satisfied by different sorts of occurrences; the trigger sites can simply fire an event like "picked up item" and move on, without needing direct plumbing to the goal that cares about it.

Right now I've got basic (trivial, really) rescue and fetch quests working, along with a "unite the 6 pieces of the broken fooble" variant.  Each one I do sheds clear light on areas where the infrastructure needs to grow, so I plan to continue on into a number of these until they start to feel less useful.  Hopefully by that time the system will have enough working combinatorial pieces to make some emergent magic happen.  In any case, that should still keep me busy for a while.

I'd like to extend a nod to Lenna's Inception, a project I came across this week that has a lot in common with SnargleQuest; both are roguelike games (though LI is not turn-based, but a realtime action RPG strongly derived from Zelda) with gameplay based on procedurally generated lock-and-key puzzles.  I'm excited to see another developer exploring this space, and hope to see great things from that project.  I encourage you to check out the demo, released in June.

Sunday, July 8, 2012

Goings On

Not much to post about of late, but the adventure gradually continues.  I'm trying out a new health system; a prototype health bar GUI is visible in the screenshot.  Most of my current work, though, is about reviving my proof-of-concept code for narrative generation, untouched for some months, and using the generated plots to drive environment creation.  Everything is still incredibly basic at this point, but the plumbing is beginning to come together.  Here we see our hero entering the (unelaborated) lair of a spiked mummy (Z) who has kidnapped Princess Damsel (p):


Right now I'm finishing up the actual rescue portion of this scenario, after which I'll go to work on the other simple plots I've got so far, taking advantage of commonalities wherever I can.  Reuse of functionality for similar story elements is fundamental to my approach for narrative generation, so I'm eager to generate enough working content to let the concept prove itself out a bit.

Behind the scenes, I've used the quest stuff as an opportunity to start introducing a much-needed event system that will untangle my data flow appreciably.  Since quest goals could be anything, I needed something sufficiently general to handle event notifications without passing listeners around everywhere, so a central registry is an obvious choice.  In a similar way, implementing NPC behavior is providing tools that will also be needed for monster AI.

I'm playing with some fun possibilities for the medium term.  I think I may delve a bit into pixel shaders to try and get more of a neon glow look than the current flat line graphics.  I want to keep things simple and avoid spending a lot of time in a graphics hole, but I'd like to achieve the look I've got in my head.  In terms of game mechanics, I've come up with a fun idea where you change color by picking up a power-up, and different colors give you different abilities.  I'm still pondering ideas for what abilities would be good, how they could be used for puzzles, etc., but I like the number of gameplay possibilities that could arise out of this scheme.  Also, the color-change thing goes along with a general emphasis on color that I want to keep working for.