#Connection Lifecycle and Scene Loading with Fade Out

6 messages · Page 1 of 1 (latest)

hollow patrol
#

Hello! I am now diving into FishNet's Scene Manager and I have some questions.

I am making a VR FPS game. Initially the player is in a main menu scene, with FishNet unused. I want the player to connect to a FishNet dedicater server and when the connection is established, fade-out to a black screen, then load the server's scene (with a delay allowing the fade-out to finish prior to loading the server's scene). Then fade-in once the scene is loaded. Fading in seems easy, but how can a fade-out be done prior to loading the server scene(s)?

Also I am wondering how to properly do this fade-out while connected to the server. For example, if the server is switching to a different gameplay level I want to facilitate a smooth visual transition with a nice fade out before the scene load begins.

Additionally, is there a FishNet example somewhere that demonstrates an actual game loop from an offline main menu, connection to a server, loading a gameplay scene, gameplay, then disconnecting and returning to an offline main menu scene? I looked at the FPS land demo but it starts in the gameplay scene which is not how a real FPS game would work.

Thanks!

late shell
#

Hi there, so one way to do it is to load the scenes using the Unity scene manager and the use the FishNet SceneManager.AddConnectionToScene method afterwards to tell FishNet that the client is loaded into it. Another way would be to send a message to the server to load the scene only after the fade out

hollow patrol
#

So would that rely on manual broadcasts for the server to tell the client which scene to load upon a client connection, then the client would send a broadcast indicating they have finished fading out and finished loading the scene via Unity's scene manager?

#

Or alternatively, could the client send a broadcast when the fade-out is complete and the main menu scene unloaded, then the server could call LoadConnectionScenes on that client to load the scene via the FN scene manager?

late shell
#

Yeah, I think I both ways could work actually

hollow patrol
#

Okay, I will try it out and see what may work best. Thanks @late shell!