Virtual Worlds are basically spaces where players can only interact with other players who are in the same world. In SA-MP it worked by setting a vehicle/object/player’s virtual world to a number and you would only be able to interact with them if you were in the same world.
In FiveM I haven’t found anything similiar other than instances, but they aren’t the right solution. Footsteps, Explosions and Peds are still synced.
Though this is a nice idea, is it a big issue that explosions, peds ect are synced? Could you not use a god mode of sorts to ensure the separation if required?
The problem is explosions also carry shockwaves which could unsettle cars in a race for example and other types of game modes. Peds wouldn’t be a big issue to me personally since I don’t plan on using them in my current project, but it might be for someone else.
I haven’t checked how it works exactly, but I’ve seen this feature in another multiplayer client.
Maybe some of these natives could be made use of? https://runtime.fivem.net/doc/natives/#n_NETWORK
Possibly we can control the session and maybe find a way to bring a player in and out of them.
I could see someone making a resource to simulate player Virtual Worlds but it definately wouldnt be easy and some things would still be synced unfortunately.
Not going to happen for legacy networking, and not a high-priority feature for 1s. Intent is to implement this in a slightly different way from the traditional ‘just set a number hurr durr’, both to discourage people trying to use this for interiors, as well as to allow for added flexibility.
This doesn’t use a “dimension” system, but simply uses normal natives to hide other players/their related entities, along with some likely undocumented natives to disable some more stuff.
what do you propose such a feature be used for then, aside from interiors and instances where you need multiple players in the same spot to not see each other?
I feel like I speak for a majority of developers when I say we’re willing to sacrifice seeing jets and planes in windows for the ease of assigning players to different worlds with “just set a number hurr durr”.
GTAO already got this feature, try to get in the same house with your friends(they need to get in their own house of course) you won’t see/attack/hear them in the same interior
Start a loop, for every player in “instance” who’s not yours : SetPedConfigFlag 62 to true to disable collisions (Doors & Footsteps included since your game will make them pass through any object), SetEntityVisible to false to hide them, Rockstar disable weapons & melee when your inside appartments so you can do the same or make other players untargettable with SetPedCanBeTargetted, For voice, change on your system (Depends of the system), and there you go