Forgive me if this is spelled out elsewhere. I have been prototyping a game concept using my own tools, but I would like to see if I can use Inform 7 to realize the completed game.
Practically speaking, if I needed to model a location (and its objects) in various time periods, how can I do that in Inform? For example, a place (e.g., London) at different times (medieval, WW1, WW2, today). The most obvious approach is defining rooms for each era, but wouldn’t I need to replicate any objects present it the eras. It seems that this could really get massive in a hurry. I’m having difficulty wrapping my head around how to model a scope with place and time. I’d like to have players move between eras and have game objects scoped to the era.
It will probably be easiest to define rooms for each era. Many objects won’t be shared between eras – the buildings will be different, the room exits may be different (underground station appears, etc). Even for a building (such as a cathedral) that lasts between eras, the description will change, and it’s easiest to do this by defining separate objects.
The tricky bit is if you pick up an object in an earlier era and carry it with you into the same room in a later era. If you don’t pick it up, will it be in the room in the later era? Because if it is, then when it’s picked up in an earlier era, you need to remove it (in code) from the later era. And vice-versa. If the player drops something in a room in an earlier era, might it still be there (hidden behind the bookcase, say) 20 years later?
If this is not a cause for concern, then yes, just make them entirely separate locations.
Yes, if portable objects are going to persist between eras, that will require additional code. But that code has to check about removing objects whenever you move back in time. It’s probably still easier to use separate locations, and have the same code check about moving objects in when you move forwards in time.
I presume that when you mean additional code, that refers to “lower level” Inform 6 extensions that hook into the hooks, so to speak. That is doable for me, but I will also need to familiarize myself with the C-like 6.0. Easier than having to flesh out the rest of my experimental prototype engine and I could still express the game using Inform 7.
To make things even more challenging, imagine not only eras but time slices within an era. For instance arriving just before or after a key event in that era and having the world in the appropriate state. The complexity spins up dramatically. How I addressed this in my prototype was by the introduction of attributes that can be temporal (i.e., an attribute that exists and has a value between a set of dates/time periods). That makes the filtering rules a bit easier. However, I don’t know if this is practical with Inform and I suspect that it may not due to the limitations of the number of attributes supported by the z-code interpreters.
I’m also thinking that perhaps I could effectively achieve this behavior using Thing instances with the appropriate attributes and a set of rules that apply to those Things (i.e., define Thing instances for each time period that attach and detach them to the room as needed). The concept seems complicated, but it is worth exploring for me if I could leverage Inform 7 as it currently exists.
Thanks for your replies zarf and Jim. I’ve got some more studying to do.
Offhand, I’d say that shouldn’t be necessary. Putting objects in or out of a location depending on other factors is totally doable.
This is becoming an I7 thread … but to address one other point you raised:
I7 should handle this very nicely (as, for that matter, would T3/adv3Lite) using the Scenes mechanism. In I7 you would write, unless I’m mistaken, a rule along the lines of “When April 18th begins…” That rule could manipulate the model world as needed. (Caveat: My I7 is very rusty. I may have the syntax wrong.)
I’m going to attempt to model a portion of my story in I7 using your suggestion about Scenes and see how it goes. This is all very helpful to me. Sorry for being so Inform focused. I now realize that this is the General forum and I should have posted this one level under under I6/I7 development. My apologies. If desired, a mod can move this topic to the proper place.
It looks like using Scenes works just fine for what I want to do. I threw together a small demo and things worked as expected. Now, I’m going to try doing a more significant section of the game and see how it looks and works. Thank you everyone for your help and suggestions.