Authoritative Unity3D Server

SirManGuy
edited October 2010 in Photon Server
I'm trying to figure out whether or not I should use Photon in my project. I do really enjoy the the application you guys have created however I'm not sure if it makes sense to build an authoritative server for Unity3d with it. I'd rather not redevelop all the physics logic in Photon and with how Unity3D cannot be added as a DLL to the Photon server the only option is to create a Unity3D Server as a client. Meaning all packets get forwarded to the server, the server authenticates the information and sends it back to the clients.

I know Dreamora has experience with this but since I'm creating a twich style game I'm not sure if this system makes sense in its current form. Any suggestions or comments?

Comments

  • So far it's relatively complicated to build a physics based game in Unity and use Photon as authoritative server.
    Of course, this is true for any external networking which would not communicate with a Unity server. It's just about the data missing and the Physics simulation setting and accuracy.

    From what I heard, CMune uses bounding box information on the Paradise Paintball server to check positions but there is not even a way to get this from Unity without programming an export (and import).

    If you only want to check positions, their approach is fine and saves performance as well. A complex physics model might eat up your server's performance, as you spend a lot of extra cycles per player.
  • This weekend I've gone over all the documentation and have decided to attempt and see how this model works using Photon. Basically I'm going to create an Unity client that is a server to handle all user input. This Unity Server will connect to Photon using an extended Lite class becoming an "owner" of a room. All communication from other clients will go to the room then to the server. The server will then broadcast an event of what movement happens. Hopefully there isn't a huge delay and I can interpolate everything together and still make it smooth.

    The problem is going to come down to firing and getting that to time out right since its a space shooter and firing displays objects on the screen. All weapons so far are easy to predict and only need a launch point (just have to get that right with the delay). If anyone has suggestions let me know. Thanks again Tobias!
  • the 100ms delay and client side prediction as it is used in the unity networking example should help very well.

    in short if you do anything its applied against a state from the past instead of "gainst now", and what you see is what technically happened a fixed timeframe ago. that way it will look consistent on all users ends and with a timeframe of 0.1s its for example invisible