citizenfx / cfx-server-data

Data repository for CitizenFX servers.
358 stars 869 forks source link

Modify sessionmanager-rdr3 to perform ‘seamless’ transitions between sessions #117

Open Den5i opened 4 years ago

Den5i commented 4 years ago

In notes https://forum.cfx.re/t/cfx-re-roadmap-progress-update-january-2020/988184

This would help avoid continuous restart of RedM to switch between servers belonging to the same project.

OneSync on RedM won’t happen until RedM catches on more. Instead, one can probably tweak sessionmanager-rdr3 to perform ‘seamless’ transitions between sessions to simulate higher slot counts.

Disquse commented 4 years ago

This is not an issue actually. This is a kind of thing you can do by yourself. Session manager is just a router and in-game session related stuff are used and tied to natives. There was few experiments done on session manager to support seamless transitions between sessions. However I still don't have a time and motivation to finish it. Do note that "seamless" are actually not so seamless on player's side (at least when I did my experiments it wasn't). A better idea of "simulating" higher slots was given by the cfx.re developers (about using roaming bubbles) but research will take some time.

UPD: you can see how a transition looks like from player's side on this GIF https://gfycat.com/radiantspryichneumonfly

Den5i commented 4 years ago

@Disquse thanks, do you know how can I get ahold of those experiments source code? On the GIF that you've sent user is reconnecting to the same server, whereas I'd like to test if it's possible to pass a server id or IP to to connect to it. In case if a project has multiple servers separated by map locations, it would smooth the gameplay by just typing a command when moving to a new location.

Disquse commented 4 years ago

You can use 0x4019AE4956D4393 to trigger seamless session join/host. The latest argument is a struct. If you won't pass any data to it, the game will host a new session. If you pass session data the game will try to join it. Make sure you log every message in session manager just to be sure that something is happening. For leaving I was using game transition manager natives. Not sure if it's the right way to leave session.

whereas I'd like to test if it's possible to pass a server id or IP to to connect to it

No it's not possible. And won't likely to happen ever, too much core CFX stuff needs to be rewritten to achieve that, not worth it.

T-001v2r3 commented 2 years ago

This is not an issue actually. This is a kind of thing you can do by yourself. Session manager is just a router and in-game session related stuff are used and tied to natives. There was few experiments done on session manager to support seamless transitions between sessions. However I still don't have a time and motivation to finish it. Do note that "seamless" are actually not so seamless on player's side (at least when I did my experiments it wasn't). A better idea of "simulating" higher slots was given by the cfx.re developers (about using roaming bubbles) but research will take some time.

UPD: you can see how a transition looks like from player's side on this GIF https://gfycat.com/radiantspryichneumonfly

Can you share an example on how to use that native? i can't figure it out