What does Photon do for me?

I’d like to get a feel for what exactly Photon does for me. I’m interested not just in the one or two sentence technical description, but the scope and scale of work it frees me from.

I am new to Unity but have a good deal of experience with software development in general (think more big business logistics, SOA, and that sort of thing; but I still have a long line to haul to get comfy with game development).

The networking portion has been the most difficult to consume thus far. I have not started any test networking projects yet, though I will soon.

Therein lies the problem. I’d like to be able to do a little preliminary planning (setting aside resources for tools such as Photon or even third party assets). However, I’m having trouble grasping what a tool like Photon really does for me.

For example, if I were to make a MMORPG type game:

  1. What kind of networking tasks am I freed from?
  2. Is it a considerable quantity of code? How much does it take to write a wrapper for UDP?
  3. Does using Photon help me avoid a lot of the networking problems I keep reading about in Unity (connection drops, Object ID confusion, and so on).
  4. Does this tool simplify things such as extrapolation or even interpolation more than the built in Unity tools?
  5. Does Photon simplify the process of connecting Unity to my own C# application that drives the game logic?
  6. I recently purchased the early adopter license for Unity 3.x. How does the new Engine play into this argument?

I’d love to hear from folks who have tried both paths (Do it yourself VS Photon, or even some other 3rd party network software).

Thanks!!
Maulkye

  1. Networking primarily sending and serialization, potentially packaing small sends into larger packets. But what it frees you from is the countless hours to develop a solid, expandable, flexible and performant server backend.

  2. 0s, Photon is has UDP support and its the default in all examples actually

  3. object id etc: definitely yes. Because it will then be your code you are going to blame as you decide over the management. Photon does the communication part for you.
    connection drops: if the connection is crap it will drop, independent of the networking. Have never seen drops on either end unless the host had a that inacceptable connection that he should not have started hosting a game. Thats a problem that does not exist in photon as you will run it on a dedicated machine as photon is a central server architecture, nothing distributed to the users (they are just clients)

  4. If you implement it. As mentioned above, it just sends the data you tell it to

  5. yupp definitely, cause you can just drop the C# code in. You will have to write the communication part in relation to photon but otherwise its all up to you

  6. fine, on the webplayer actually even better now that unity 3 on mac finally got a new mono and no longer suffers the timer issues that mono 1.2.5 (as in unity 2.x) had

Thanks for your responses dreamora.

I have read about this, but what I was attempting to determine was how much work it would take to wrap this myself. In other words, how much work it would take in general coding volume and time.

Although, I think you already answered that to some degree in your first item. I’ll have to download it and experiment with it.

Thanks,
Maulkye

Questions of this kind are always hard to answer, as each project has distinct requirements.

Our UDP handling is based on more than four years of high-performance Windows IO/socket handling. On top of this, we optimize the reliable udp protocol for about two years now and it’s an ongoing process.

You could have a running protocol in less time of course but most likely you are not going for the best performance possible.

Photon is simplifying the communication by providing a clear API which lets you send a mix of reliable and unreliable data.
Also, it establishes a framework for your own RPC implementations, which you can modify, extend or ignore.
The provided applications Lite and LiteLobby are available as source code and implement rooms, lobbies for rooms and properties and the relevant operations (RPC methods). We concentrated on basic logic which prepares everything for you to implement your in-game logic.

So far, Photon does not provide in-game solutions like interpolation or networking for animations. In most cases the real game developers (you) know better what is needed and how it should work. Photon just makes sure it’s easy to get your data and states across to other players.

Did you check out Photon already? Does this match your impressions?

I have not installed Photon yet, but I do intend to give it a try. It may be a while before I get to the networking portion of my project, but I’m definitely looking to simplify that element while retaining as much flexibility as possible.

I’ll be writing all my server side (Authorative) logic in C# .Net, so I’ll need to be able to feed that with input from Unity clients easily. I think Photon is going to be the fastest way to do that reliably (frankly I’d rather focus on game logic and avoid network coding as much as I can, but cookie cutter solutions rarely meet my needs).

Thanks :slight_smile:
Maulkye