Decentralization of mob control
Posted: Sun Oct 15, 2017 7:42 pm
I have been thinking about this for a few days, and I may start working on this in the next few weeks. Before I create some monster that is going to be denied for bad implementation, I wanted to write down my theory for how this will work and bounce it off everyone. Here goes:
Theory
Players don't directly inhabit their mob, they inhabit a /mob/controller, simply to contain them, and that mob references the mind datum.
Movement procs of that are passed to the mind instead which passes it to mind.current, the key is also passed, because:
The mind can have multiple controllers, aka multiple players, and it has a list referencing all of them.
Controllers have some kind of state designating them as:
- full control
- view and speak
- view only, can't speak
- view only, can't think
- maybe other states
I say think, as controllers have a special (radio?) code where they can talk just to their mind, and only other controllers in the same mind can see this.
UI is not completely synced between the controllers, so each controller could move their action buttons around as they wish and have whatever skin they want, but it is synced where appropriate.
Minds would have procs to find out if any controllers are connected, or if there are any controllers connected with a specified state or states. These procs are used instead of checking for client because the clients are in the controllers.
Actions and speaking would be logged with the key of the controller that performed the action, as there is no central key you can reference per mob.
With all of this in place, multiple players could control the same mob at the same time.
Theory
Players don't directly inhabit their mob, they inhabit a /mob/controller, simply to contain them, and that mob references the mind datum.
Movement procs of that are passed to the mind instead which passes it to mind.current, the key is also passed, because:
The mind can have multiple controllers, aka multiple players, and it has a list referencing all of them.
Controllers have some kind of state designating them as:
- full control
- view and speak
- view only, can't speak
- view only, can't think
- maybe other states
I say think, as controllers have a special (radio?) code where they can talk just to their mind, and only other controllers in the same mind can see this.
UI is not completely synced between the controllers, so each controller could move their action buttons around as they wish and have whatever skin they want, but it is synced where appropriate.
Minds would have procs to find out if any controllers are connected, or if there are any controllers connected with a specified state or states. These procs are used instead of checking for client because the clients are in the controllers.
Actions and speaking would be logged with the key of the controller that performed the action, as there is no central key you can reference per mob.
With all of this in place, multiple players could control the same mob at the same time.