Friday, September 27, 2013

Dev Log: Horror Text Adventure #21

World gen has begun.  Half the code for creating a year's worth of rooms was already in place, I had just forgotten I had already made it.  But I finished it up, and removed the previous manual room-by-room creating I had been doing and instead just made a vector of rooms quickly.  Of course, I only have two types of rooms right now, bedroom and hallway, so it's a bit of an oddly shaped house you've got with 365 bedrooms and/or hallways.  Also, currently, the rooms are like a snake rather than a maze, with room #1 connecting to room #2, and #2 connecting to room #3, with no dead ends or multiple paths.  I'll have to work on that at some point.

While I was in there I also fixed a potential bug (which I had not experienced but the code allowed it) where a room could be overridden in terms of the directional pointer, so a player might go north into a room, and then when they go south they end up in a third room, rather than the first.  That would open up great possibilities for labyrinths, but that might cause headaches for both the player and myself.  It's kind of a cruel joke that I want to discourage, actually.  I want the player to feel lost in a maze, but not lost in the game, if that makes sense.

Sometimes you call a bug a feature, but when it's easily fixable with a one-line do-while loop, there's no point.  One always has to be careful about accidents, and deciding whether they are happy or not.

It's kind of odd: setting up the world gen to allow for 365 rooms makes me feel like I can breathe.  Before, when I was just testing with two rooms, I kind of felt like I'd never get anything done.  Even though fixing up and starting world-gen was only a few lines of code, I guess the 'physical' space allows me to starting thinking of the objects and room types rather than feel cramped.  Psychology!

No comments:

Post a Comment