So, to try to revive some conversation on here, I thought I would ask this here first. One of my WIPs, has a relatively large map, currently about 40 rooms, mostly centered on a house (3 floors) and some outside areas surrounding the house. A compact map, but lots of rooms.
I also have, let’s say, an altered reality component to the game, where in this altered reality, there map layout is mostly the same (there may be some slight variations), but the descriptions will change. Also, some objects may be in both “realities” with altered descriptions and others will be in just one or the other. The few NPC’s don’t cross realities.
So I started off creating descriptions like such (in I7):
The description of entryway is "[if altered-reality is true]Entry way just inside the house.[otherwise]The entrance to your home contains little room for any...[end if]
There will be a lot of that, for most rooms and objects. For others, it will be moving stuff on and off stage as necessary. And of course actions, interactions and the resultant text may be different.
As I began working through this, I began wondering if there is a better way than having these if statements everywhere. If there were just a few rooms / items it probably wouldn’t be a big deal, but this is turning into something big and perhaps unwieldy. I’ve got some ideas on how else to handle this but was curious if anyone had any high-level design ideas on how to handle this?
I’m not necessarily looking for code, but some high-level design ideas or things you’ve done in the past that had something similar. Perhaps something that would simplify the code or simply something to spur ideas or discussion would be greatly appreciated.