Development Structure

I’m developing a new project using Inform 7 that seems considerably more complex than what I’ve attempted up to this point. Before I delve too far into it, I want to make sure that I have a solid plan for how I’m going to implement things.

The game will take place over the course of five days and nights (a la Anchorhead). My plan thus far is to use recurring scenes to represent each phase of the game. A specific action will be used to voluntarily progress the game from one scene to the next. When the player fails, I want to be able to revert back to a previous scene so they can try again. This will obviously involve resetting certain aspects of the game state.

The nighttime scenes will mostly take place in dreams while the daytime scenes will take place in the waking world. I’m planning on creating separate locations for the dream world that are similar but slightly different than their real world counterparts, such that the player may or may not even be immediately aware of the differences.

The prologue will be a scene in which the player is seeing through the eyes of an NPC. I want the game to accept commands as it normally would, but to ignore them, and instead carry out a scripted series of actions for the NPC. This will be made apparent to the player after only a handful of turns. I’m not even sure how to begin to go about making this happen, although I’m sure there’s a way.

If anyone has any advice or suggestions for better ways to structure and develop this game design, I’d love to hear them! Also, if anyone could point me toward some open source games that show these types of implementations, that would be really helpful too.

You could do this a number of ways. If you’re using scenes I think you could do this:

[code]the player has a number that varies called p-count. p-count is 1.

Instead of doing anything when prologue is happening:
say “Actually…you know what you should do…”;
if p-count is 1:
try going north;
if p-count is 2:
try taking the mysterious vase;
if p-count is 3:
try examining the mysterious vase;
increment p-count.[/code]
That’s code out of my head so it may or may not compile.

Thanks! I’ll give it a try and let you know how it goes :slight_smile: