Migrating from BareBones to Lite

Options
Kreag
edited February 2012 in Photon Server
Hello All,
I set up a bare bones photon server. I have it working with my own opcodes/events etc. However, now I want to take advantage of Lites rooms/actors/property abilities. So a few questions:

1) Can I just change my classes to inherit from litepeer instead of just peer etc? I have done that and it still seems to work, is this all I have to do?
2) If part 1 is complete, how do I take advantage of the room joining capability on the server? It seems like there is a room property on the peer now, how do you set it and do I have to do anything special for the server to use it?
3) What about the client, I'm using Unity, so do I *have* to use pun or can I continue on with my client the way it is.. what should I change there?
4) How are properties passed around when someone joins a room? (I imagine I could figure this one out once I get 1-3 done)

Thanks!

Comments

  • dreamora
    Options
    3) PUN is not compatible with Lite at all (its for the cloud / loadbalancing instance only) so the answer is no. You would want to use the .NET Unity SDK instead, which is for Lite / LiteLobby

    4) the newly joining client gets the properties as part of the room / actor informations directly
    after that, changes are broadcasted into the room


    Question might be what kind of logic you have at the time. if you went with barebone that sounds like you didn't have some kind of room logic but a 'single environment', is this true? if so keep in mind that Lite automatically implies that the actor can be in one room only, the rooms are not just 'chat rooms' while you reside in a single continous world
  • Awesome Dreamora, I don't have to migrate my client since it is already using the regular sdk.

    Now to get answers to 1 and 2 and I'm off to the races :)
  • Oh, I didn't see the last section of your post. My "Rooms" will be a logical seperation. I understand the one room only restriction. It will actually work out just fine for my project. It is rather unique... Picture a space ship that is a Unity "scene" that folks move around in space. Think of a submarine that you only see outside of through pings and scanners.. People inside the ship can chat to each other, and can see each other moving about the ship (big ship). Communication outside the ships will be special and infrequent through some sort of alternate method that I will handle separately. Same thing for planets.. they will be rather small, folks will communicate with each other and see each other moving around the planet. When they "transport/beam" to a ship in orbit or planet or space station, unity will load a new scene and the server will move them to the coresponding "room".