Leave current game and join/host another. Does it work?

Options
chr
chr
edited December 2015 in Photon Bolt
What I've tried on iOS doesn't work, but I didn't use code from an official sample (is it covered anywhere?).

Should it be working on desktop?

Is it just BoltLauncher.Shutdown() and then load your menu level?

Best Answer

Answers

  • Yukichu
    Options
    Works like a charm for me, and yes, have to wait for Bolt shutdown. There is a callback you can use to check when it's ready.
  • chr
    Options
    dmg posted this on jabbr

    [BoltGlobalBehaviour] // Will run on all network modes (client/server/single etc.) public class GlobalCallbacks : Bolt.GlobalEventListener { public override void BoltShutdownBegin(Bolt.AddCallback cb) { // Begin cb(BoltShutdownCompleted); } public void BoltShutdownCompleted() { // Finished } }

    It works well
  • Solidust
    Options
    Is there a way to make it faster? That would rock...
  • Yukichu
    Options
    Faster? It takes about 1 second right now, or less. I just have a coroutine check for when BoltShutdownCompleted is done and then proceed.
  • Solidust
    Options
    Yukichu said:

    Faster? It takes about 1 second right now, or less. I just have a coroutine check for when BoltShutdownCompleted is done and then proceed.

    Yeah Yuki, but i would love it to be faster or have a way to speed it up. The way my game works is that i have 60 unity instances connected to each other via master server software (map zones) and when user changes a map it takes kinda long, about 4 seconds or so, and most of that time is used on bolt shutting down since i need to connect to new server.
  • Yukichu
    Options
    I see. Well... I read about this existing, but never used it since I don't recall seeing it in release notes:

    Bolt.GlobalEventListener PersistBetweenStartupAndShutdown() It might shave off a little time. I never used it, but... seems like a good thing?

    I have a vaguely similar setup, switching between different server instances using a client. My zones are instanced worlds / areas / etc. and have a loading screen. Not sure of a workaround to make it a seamless transfer...

    Well, don't destroy the client object, have stuff on the 'fringe' replicated between both zones, and... have the player able to move while he's connecting to a new zone. That just seems way too wonky though, because other players would stutter, you'd have to coordinate other creatures... but you could, I guess, make a 'buffer' area where no creatures are, you don't see other players, etc. as you shift between zones.

    uZone (part of uLink / Unity Park Suite) handles this though I believe they have their server instances talking to each other. I actually use uLink in conjunction with Bolt to have my server instances talk to each other, which actually works nicely. Could probably just use UNet for this perhaps and sync up other players on the buffer area, or something. Just an idea.