it works awesome!

Tonight I just played 2 rounds of my dominos game on Photon Cloud. It's plenty quick enough for a turn based game like this! It took me less than 1 week. mostly of refactoring my singleplayer game code, and yanking out other failed attempts at hacking in multiplayer support to my game.

Photon has good support, easy to understand API, I couldn't be happier.

By the way if anyone wants a really sweet & fast serialization library for C#, you might want to check out http://code.google.com/p/protobuf-net/

Lemme know if you want to know how to use it in Unity!

And now building the lobby, handling disconnections, gui gui, polish polish. bleh. time for a beer though :D

Comments

  • Using protobuf if you work with photon sounds like an absolute overkill as photon will serialize the stuff for you already. Its not like you have to do the serialization to string or alike to push it to photon (unlike unity networking RPCs which serialize about nothing)
  • dreamora wrote:
    Using protobuf if you work with photon sounds like an absolute overkill as photon will serialize the stuff for you already. Its not like you have to do the serialization to string or alike to push it to photon (unlike unity networking RPCs which serialize about nothing)
    Yes I'm aware of that, thanks Dreamora. Since you asked... (admonished more like) I will clarify usage

    1. I had already used Protobuf-net in my game for saving game state to playerprefs. So the plumbing was there. My full game state model is about 5 classes with nested data structures , generic collections, etc. Not something that can be easily represented as an array of parameters to RPC. It serializes down to about ~200-500 bytes with protobuf and very quickly. And Photon very nicely supports byte[] array in RPCs. So it's easy to stuff it in there, why not use it?

    2. HOWEVER I'm only using I'm only using the Protobuf serialization rarely and for certain situations. Like when a client is completely off base or needs to reconnect.

    Mostly I'm just sending the minimal amount of RPC parameters needed- a byte or two, a string or two here and there. Which represents the delta in the game state that the clients need to know about.
  • Ah if you have it in use anyway and serialize the stuff anyway then it naturally makes fully sense to be used, agreed :)
  • But to future readers: granted, what Dreamora says it is true, it is overkill to use protobuf-net (thats just how I roll :D ) But I've found Photon's RPC are very flexible and can serialize quite a lot of stuff just out of the box.
Sign In or Register to comment.