Tuesday, September 17, 2013

Recent progress

Still churning away, although admittedly slower than I like the past week and a half.  Most of that is working in the pizza mines, but it doesn't help that I'm in the part of the coding where I'm implementing the menu system.

One of the things I learned about doing over what I'm going to call the Hiatus Project is designing and coding state machines.  Most games these days are implemented so that they have to call a loop that draws the display every frame, and because this routine has to run regardless of what else in the program is doing, it means implementation of the main loop pretty much requires some sort of state machine, to do the displaying then continue working on whatever else the program has to be doing at that moment.  There are alternatives, but this seems to make the most sense here.  (Python has an alternative called co-routines that presented an alternate design strategy, but other than a generator used during map generation, I've avoided them, because they are a feature that Cython does not yet support, and I'm still aiming towards using that eventually.)

Well the menu system is part of that.  And another thing is ideally the menu should allow for being recursive -- if you've got the inventory open, for example, it'd be nice if there were submenus for determining what you can do with a specific item.  And what's more -- and this is where it gets a little weird -- it'd be nice if this happened while the sim is going on in the background.  That is, I am strongly considering having the inventory window open not pausing the game.

Why?  Well the thing is, while I'm not trying to develop an action game, it is still what I'm going to call a tension game.  Not about performing a sequence of controller or keyboard inputs as fast or accurately as possible, but more about, sometimes, having to decide what to do and get it out of your virtual pack in an expeditious period of time.

There will still be game pausing, of course.  And encounters with NPCs will necessarily pause the simulation portion of the game because it could be a subtle form of cheating if it didn't.  But the inventory window being open, I am considering, might not pause the simulation.

I'm still thinking through the ramifications of this.  What if something important happens while the window is open?  I'm considering popping up an alert message, or if it's particularly serious auto-closing the window.  Well, I admit it's a weird idea.  I might just forget about it.  But I figured I should say something about it.

No comments:

Post a Comment