Room instances

I am toying a bit with a feature that hardly anyone has requested . But yet I want it! Why? Primarily to make it possible to create a tutorial start-area where you are alone in your own instance of the train compartment(s) , free to try out commands together with a helpful tutorial bot.
However, I imagine it being useful for a lot of other situations too.

But how should room instances work?

Just for the sake of terminology, lets first define:

  • room - An ordinary room, like we have now. Anyone in that room can see and talk with each other.
  • instance room - A room that can be instantiated. Only characters belonging to the same instance can see and talk with each other.

My thoughts so far:

  1. Rooms are configured by the room owner/builder to instantiate (boolean setting)
  2. A character entering an instance room from an ordinary room will create a new instance
  3. If leading/following, all characters will enter the same instance
  4. A character can only be in one instance at a time.
  5. Summoning characters will make them enter the same instance as the summoner.
  6. Within an instance room, only other characters inside the same instance will be seen/heard
  7. Moving from an instance room into another instance room will not create a new instance, but you will remain in your current instance albeit in a different room.
  8. Rooms that can be set as home cannot be instance rooms (or configured for it)
  9. Rooms set as teleport nodes cannot be instance rooms (or configured for it)
  10. Setting a room to be an instance room will evict anyone having the room set as home or as a teleport node
  11. Setting an instance room to be an ordinary room, will automatically send home anyone in an instance within that room
  12. Moving from an instance room to an ordinary room will make you leave the instance.

ā€¦ and some more.
But that is at least the gist.

I guess I mainly write this post to try to straighten out my own thoughts on how I imagine it will work. Though, as usual - any feedback is appreciated!

5 Likes

Sounds like something that would be super useful with that scripting thingy?

1 Like

Edit 2: Removed my previous comments. Think I didnā€™t read/understand that rooms are just this way or not. Is a neat idea to play with.

1 Like

I like it, I can already see it as being a replacement to all of the hotel/private room-like areas that have 4 or 6 or 8 or whatever identical copies of the same room, letting a virtually limitless number of private rooms be available without needing any extra setup or copy-pasting apart from the initial creating and setting the ā€˜template roomā€™ as it were.

Branching off of number 7, maybe also instance subareas? Would manage set up and tear down a bit more neatly, and make the instance room to instance room a bit more apparent.

I could also see this being a good replacement for public homes. I know you already mentioned not allowing instance rooms to be set as homes, but it potentially could still be useful. A more simple apartment complex thatā€™s not as customizable as the Prism could allow individuals their own room or pod of cookie cutter rooms that they can set as home, not have to do the building like a public hostel, and still retain the ability to host guests and RPs as if they owned and built the area.

Then some questions to just send out into the void and see what returns: How would actively building in an instance room work, not just digging new rooms but modifications to the instance room itself. Would description changes propagate to all active instances, or only to instances created from then on? Or would editing a room while itā€™s instance enable just be disabled until the instancing is disabled? What about room profiles? Could be neat to have room profiles set up by the room owner and have the instance lead (who Iā€™d imagine to be the character that causes the instance to be instantiated) be able to ā€œset the moodā€ as it were. What control do instance leads have? Could be neat to be able to allow local instance editing by the lead, but that could also lead to some changed out of theme with the template of the instanced room, which may or may not be desirable. Then thereā€™s also the matter of sleeping and sweeping, I would imagine that no matter what the auto-sweep is set to, it will run the moment all characters in a given instance are no longer awake.

Well, thatā€™s my thoughts for now, you know Iā€™m always down for more new features to sink my teeth into. :stuck_out_tongue_winking_eye:

2 Likes

Here are some other things to consider:

  • If the owner edits an instanced room prototype, do the existing instances change or remain the same?
  • Perhaps instance an area and not just a room? Then you donā€™t have to worry about all the internal exits and things like teleport nodes can still function, they would just check to see if it should create a new instance of the area or add them to an existing instance. Also, this would alleviate the possibility of forgetting to mark a room in a chain as instanced and cause havoc among groups who get separated and split into different instance as they traverse the chain.
  • If a room has a teleport node and the teleport is removed but the room still exists then anyone who learned that teleport previously can still teleport there. (Or it did 5 months ago when I tested to see if I could create a temporary node.) Not sure if this is intended or a bug, but it would still affect the instances.
  • For instances, either the population needs to be hidden or the room in the directory needs to somehow show itā€™s instanced or else folks will enter instanced rooms expecting to see people and then wonder why nobody shows up.
    [Seems Xetem had some of my same thoughts while I was typing, but Iā€™m going to bed now and not changing my post. :P]
1 Like

This is something Iā€™d really like to have! Iā€™m currently working on The Plumā€™s 4th playroom, being an h-jail, and I think this works well as an officer/prisoner play.

1 Like

To answer these:

The first version will technically work like this:
A room instance would actually be nothing more than a instance ID stored on the character, to tell which instance they are currently in. Room data is in no way replicated.

This means, any change to the room will affect anyone in any instance of that room.
For the owner/builder to edit the room would simply be to edit it like usual.
Later (especially when we want to combine it with scripts as mentioned by @Shinyuu), we want room instances to be able to diverge from one another, with different room profiles, exits, etc.

But for starters, room instances wonā€™t copy any room data at all, but all point to the same room.

So, @Xetem, all your thoughts of ā€œsetting the moodā€ using room profiles, or having the lead be able to edit rooms, would be for later when we allow diverging room instances.

Yes, that is true. I am not sure either if it is a desired behavior or not.
The idea is - if a room is set as an instance room, you should not be able to be inside that room without being in an instance.

But now that I think about it; we should be able to do it like this:

  • If a global teleport goes to an instance room, it will behave the same as you used an exit to get there; you will create a new instance for your character and anyone following you.
  • If an instance room can be registered as a teleport node, the you will register both the room and your current instance ID. That means, when you use that teleport node, you will also return to that very same instance.

The second point would make it possible for multiple friends to register the same teleport in the same instance. So, when they later use that teleport node, they will arrive in the same instance.

However, my future plan for supporting different room profiles for different instances , also contained the idea that once all characters leave an instance, all data of the diverging rooms in that instance will be scrapped, to avoid the build up of unused data.
But since a registered teleport node would then allow you to return to that very same instance, I cannot purge that data as long as at least one character has a teleport node that points to that instance.

But maybe that is okay? That would make Xetemā€™s idea of instantiated apartments a possibility.

In any case - teleportation needs some additional consideration. I will probably start with the simplest implementation, and we can expand on that.

I am impressed how quickly you both grasp the idea and the potential issues! :grin:
Yes. This thought has also struck me.
Maybe we can have both the option of setting single rooms and areas to be instantiating?

  • If an area is set as an instance area, it will implicitly turn all rooms as instance rooms.
  • Subareas will not be affected, but must each be set as instance areas.
  • Later on, we can also have instance areas to diverge, changing the map and other area-level info.

Yes. I like it.
But I think I can do it in steps; first instance rooms - then extend to instance areas.

Yes. I didnā€™t mention population, as I havenā€™t exactly figured out how I want it to work. But this is what I think I want:

  • instance rooms are considered private, and population will be counted the same as private rooms.
  • characters inside an instance will see population count of other instance rooms in that area, counting only characters of the same instance.

The second point there is a slight pain to code. But doable.

I was imagine allow sleeping characters to remain inside that instance.
Especially initially, when the ā€œcostā€ of an instance is zero (just an ID value stored in the character), letting them sleep in an instance is a non-issue.

Phew.
Lovely feedback!!
Okay. Now I want to code on this! :smiley:

4 Likes

Another issue I just thought ofā€¦ Friend A invites you to an instance, and you leave. Then Friend B has a different instance. Do you get stuck out of B? Do you lose access to A? If one is closed and recycled then it is less of an issue, but if weā€™re keeping them permanent then this will become an issue. Perhaps an alias to each instanceID? So you can choose to go to Jonā€™s Room instance or Janeā€™s Room instance? If weā€™re talking about homes, then we may need to designate a ā€˜Primeā€™ for the instance and such or else you get a bunch of instance IDs to flip through and yours could get buried.

1 Like

When someone summons you, you will enter the same instance as they are in, leaving the room (and instance) you were in.

So, Letā€™s say we have:

  • Friend f1 in room r1 and instance i1
  • Friend f2 also in room r1 but instance i2

Because f1 and f2 are in different instances, they canā€™t see or hear each other.
If f1 summons you, you will enter r1 of instance i1.
If f2 then summons you, you will enter r1 of instance i2.

So, you can be summoned between instances; for now, the only ways to get into someone elseā€™s instance is by either 1) following them when they first entered it, or 2) get summoned into it.

Regarding homes/teleports, I think I will change my initial approach and simply let homes and teleports be possible in instance rooms, but that the teleport will always create you a new instance; multiple characters teleporting to the same place will enter unique instances.

1 Like