Photon blank server setup vs Unity SDK Lite Lobby

Mercnet
edited June 2011 in DotNet
I completed the blank server step finally, and now have a server that excepts simple messages. I know it is not a lot to start with, but after going over it so many times, the code I wrote (even though it was just copying from a video) is familiar to me.

So going into Unity SDK I thought it would be a cinch. What and understatement that was. It is so complex that I am not totally lost again, and have no clue what does what, even after spending an hour just reading the code.

Is it possible to import the class library I made in VS2010 for the server into Unity and just build from there and just add code as I learn it and need it? I have googled some on the subject of tutorials explaining the Lite Lobby in the unity SDK to no avail. Where should I go from here?

Comments

  • Ok after looking over the code more and more I start to see things a bit clearer....

    I have a few nagging question that maybe you guys can help me with

    1) Lite Lobby application for the server. What exactly does it do?
    2) Should I migrate my project assets to to the same directory tree as my server files so I have all my libs in one spot?
    3) More from 2, but what is the best structure for my file directory?
    4) What is included in the PhotonUnity3d.dll file?

    This are the nagging questions I have. I have noticed that the interfaces for IPeer differ form PhotonUnity3D then from what the interface was in the blank server setup tutorial. This is one of the things that slowed me down... relearning the key interfaces.

    Thanks for any help.
  • It seems the most confusing part is the distinction between client and server lib?
    Follow these two rules and it should resolve a bit of that confusion:
    1) Don't use photon.socketserver.dll on the client.
    2) Don't use photonUnity3d.dll on the server.

    About your questions:
    1) LiteLobby is a Lite extension. Lite has just room that you can join if you know the name of the game. LiteLobby displays these names in a list. Our Bootcamp demo modification uses LiteLobby.
    2) NO. Client and Server are separate. You are not supposed to use ANY of the server libs on the client (the client is mono, and we don't test them under mono).
    3) Separate directories / projects for client and server.
    4) A library you need for unity to connect to photon.
  • Thanks Boris, I did a lot of reading, playing around with files and locations, and I a much better understanding. Once I realized the unity IPeer interface is the same from the blank server setup tutorial with different phasing I was able to see the connections.

    I just have one more big topic. What is the best structure for writing Codes? Am I right in assuming that everything said between client and server is used in Operation Codes and Events since it is sent as bytes?

    example: using a code to trigger an event that gets particular info such as PhotonPeer's chat handle, or get the local time and put it as a time stamp
  • I think I have the codes figured out.

    One thing about the LiteLobby demo... there are 2 clients, one called chatphotonclient and one just simply photonclient. I am confused by this. If the photonclient the actual server script or am I mistaken?
  • The photonclient script is the basic connection to the server - the chatphotonclient is build on top of it and handles chat only.