Search Unity

Third Party Photon Question...

Discussion in 'Multiplayer' started by MTracerStudios, Aug 26, 2011.

  1. MTracerStudios

    MTracerStudios

    Joined:
    Aug 24, 2010
    Posts:
    118
    So, I decided to use photon to run my server, and I've run into what I think is a fairly basic problem: there doesn't seem to be any docs on accounts/logins/persistance. Are we expected to roll our own? If so, how do I override the connect function on the client and the connection received function on the server? Is it already in place? If so, where do I find out about it? And on persistance, do I need to get my own database libraries like SQL or some such service, or does Photon come with it's own?

    Thanks,

    MTracer.
     
  2. omgitsalexl

    omgitsalexl

    Joined:
    Jun 20, 2011
    Posts:
    70
    A short answer, is yes, you are going to have to write your own account management, user login, and persistance code. Photons main job is to handle incoming connections from the clients, redirect them to a lobby/room, and handle packet processing to and from clients.

    There is nothing to override on the client side, as you will be writing that from scratch, so simply place your login request code within say a menu scene for example; for the server side, you have the option of completely rewriting a server subsystem, or you could take and expand on one of those provided in the Photon package (Lite, LiteLobby, MMO, etc.)

    And finally no, Photon does not come with its own database system. You would need to use a binding, to one of the many options out there (MSSQL, MySQL, PostgreSQL), on the server side to process any queries to the many databases you will be needing for your project.

    I hope this helps, let us know if there is anything else that needs clarification.
     
  3. MTracerStudios

    MTracerStudios

    Joined:
    Aug 24, 2010
    Posts:
    118
    Yes, would you know of a .dll that I can just import into a project, instead of connecting to another application? If there isn't, where would you suggest I go for docs on integrating a db with photon?
     
  4. omgitsalexl

    omgitsalexl

    Joined:
    Jun 20, 2011
    Posts:
    70
    MTracer, that really depends on what your server setup looks like; have you decided on what database solution you are going to use? Because that would dictate where you would need to look for the documentation on integration.