I would like to share something I’ve been working on recently. Dwarden was really excited about this, so I cannot just let him down after all. The idea was to be able to seamlessly transfer any client from one server to another, so that the very least one can do is to travel from one map to another without the need to restart the server or the mission. There is an engine solution to this, obviously, which is not publicly available. But it is still possible to “hack” the existing UI functionality, to make it good enough for something to start with.
The following code is for the function, which should be called via remote exec from server. The server has access to the database so it should be possible to sync the transfer of a client between the servers via the database. It will need some work before the framework is developed, if successful this could have huge impact on how Arma games are played. So here is fn_redirectClientToServer.sqf:
I have tested this on 2 local dedis and was able to transfer from one server to another and back. It even supports passworded servers. One thing that lets it down is the fact that you can see all the loading and UI screens flashing like on LSD trip. So if you want smooth transfer it has to be modded, there is no other way. Here what it looks like from my earlier experiments going from Altis to Stratis and hiding this with a mod:
A few words about technical side of things. This is possible because of using onEachFrame from within onEachFrame so that you run certain portion of code per 1 frame. onEachFrame also survives exiting procedure from the game but gets reset as soon as new mission is received. This is enough to handle server switching. I added 2 timeouts, one in case something is wrong with the server you are trying to connect and second if joining somehow failed (wrong password for example). You can also set duration of timeout, default is 30 seconds. Example of calling this function from the server:
This will instruct a client with owner id 7 to transfer from current server to 127.0.0.1:2312, and if it is passworded, use password “abc”. Feel free to modify or improve on it. If you make something cool out of it, I am sure Bohemia might consider giving you an engine solution.
That’s it folks,
P.S. Was asked what displays I modified in one way or another to hide transition. Here they are:
RscDisplayClient, RscDisplayNotFreeze, RscDisplayLoadMission, RscDisplayMultiplayerSetup, RscDisplayMultiplayer, RscDisplayIPAddress, RscDisplayPassword, RscChatListDefault, RscChatListBriefing