Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Third Party Exit Game Photon

Discussion in 'Multiplayer' started by Bugfoot, Mar 20, 2009.

  1. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    You can request a trial access from them
     
  3. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    Was just curious of the benefits are over what Unity is already providing with NetworkViews and RPCs, which work just fine.
     
  4. Timmer

    Timmer

    Joined:
    Jul 28, 2008
    Posts:
    330
    Interesting, indeed. Thanks for the link though as this could help me on my project. If anyone has any information/opinions/etc about them, would be helpful.
     
  5. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    I can see a few things that possibly make it superior to the networking built into Unity.

    - iPhone support (if you are into that kind of thing)
    - Ability to host in the Amazon Cloud (but I think Unity could do this too...)
    - "Tens of Thousands of Concurrent Users" - This one sounds suspicious to me. Maybe for a turn based game, but can you imagine how long you would need to wait between turns :eek:

    I guess it must have something special though, cmune seems to like it. And Paradise Paintball runs very nicely. I couldn't find anything on their website or blog describing why they chose this product though.
     
  6. AngryAnt

    AngryAnt

    Keyboard Operator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    Thats just sales talk. If you can upload a server build of your game and run a unity master server as a service, you've got "Ability to host in the Amazon Cloud". Did that on a previous project.
     
  7. shaun

    shaun

    Joined:
    Mar 23, 2007
    Posts:
    728
    That's because we've been working like crazy getting ready for GDC :)

    Photon was our choice for a number of reasons, a few of which are:

    1. It fits really well with Unity, as in, we wrote a C# class to handle server logic for P2P on the client, and just plug in into the server. This means we can abstract away from P2P/Server networking and our networked physics and game sync code. i.e. P2P fails, so you pause the simulation, have a player transfer the world-state to the server, connect everyone to the server, and just keep on playing. (btw. we wrote the network layer to support fallback, it's not natively built into Photon)

    2. It supports UDP and RUDP and TCP, and is totally abstracted, we just flick a switch. This was one of the main reasons we dropped SFS as an option, as it was too high level (although Thomas tells me this is changing). Photon is made for hardcore real-time solutions, and SFS is more for flash games.

    3. It's got great potential to scale, and we're working with Exit Games to support clustering and utilize the "cloud" for dynamic node allocation. Can't say too much on this right now, as it's early days.

    4. The guys at Exit Games are really cool. This counted for a lot, and was the reason we went with Unity even when it wasn't the best product at that time.

    Regarding Emils point about hosting in the Cloud, he's quite right in saying that it's not super difficult. Paradise Paintballs P2P implementation is being played "in the cloud" right now - I just built an EC2 server running CentOS and that's it (actually it's a bit more complicated than that, but not too much).

    The 'cloud' concept is more about the ability to dynamically scale according to load. We use Amazon S3 and CloudFront for geocaching the Paradise Paintball client - at some point we were having 10-20k downloads a day, and didn't feel a thing, it was completely seemless. We did find a lot of MasterServer bugs and leaks though. EC2 is great because we just turn servers on and off as required, and now with the Reserved Instance option, it's something like US$500 a year for a small linux instance.
    EDIT: Small EC2 Linux Instance 24h * 365d * US$0.03ph = US$262.80 + 1Yr Reserved Instance US$325 = TOTAL US$587.80 per year.

    Anyway, if you're at GDC you can pop over and take a look at our game running on Photon. The booth 5428/11 in the German Pavilion.

    Best regards
    Shaun
     
  8. Kaiserludi

    Kaiserludi

    Joined:
    Jan 21, 2009
    Posts:
    94
    Hi all,

    please have a look at http://blog.exitgames.com for news and at http://www.exitgames.com/product/neutron and http://www.exitgames.com/product/photon for a general overview of our managed network solution neutron and our realtime networking solution photon, both avaiable for Unity and Unity iPhone among a lot of other platforms.

    You can see our realtime demo powered by Photon for Unity and Unity IPhone among other platforms as well as Cmune's Paradise Paintball using Photon in action this week at the GDC in the German pavillion.

    For further questions don't hesitate to contact me via PM, write a mail at photon[at]exitgames.com or just ask in this thread.


    Kind Regards.

    Stefan Ludewig
    Native and Unity Client Engineer
    (Brew, iMac, iPhone, Win32, winMobile)
    Exitgames GmbH
     
  9. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    no longer valid
     
  10. Kaiserludi

    Kaiserludi

    Joined:
    Jan 21, 2009
    Posts:
    94
    We also offer native client libraries in C, C++ and objC as alternative on iPhone and other platforms for developers, who prefer native code over Unity, but our Unity client for iPhone is pure C# (.NET 1.1) and this way completely accesible via C# Script in Unity. You do not need to code any line of objC at all to use it's full functionality.

    But best is of course, to request a trial version and see for yourself.
     
  11. bertelmonster2k

    bertelmonster2k

    Joined:
    Apr 3, 2009
    Posts:
    78
  12. JohnVanVliet

    JohnVanVliet

    Joined:
    Mar 19, 2009
    Posts:
    15
    I am curious about Photon, but I'm not sure where it fits in the spectrum of networking options:

    1) Raw Sockets
    2) Low-level library like Lidgren
    3) Raknet
    4) SmartFox Server / Neutron

    My guess is that on this scale, Photon is around 2.5 or 3. Is that about right?
     
  13. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
    It would be more accurate like this:

    SmartFox Basic = Neutron
    SmartFox Pro = Neutron + Photon


    SmartFox Basic and Neutron are ideal for turn-based games which support a lot of non-game stuff (chats, player profiles, etc).

    Photon works on top of Neutron, and that is comparable to SmartFox Pro which is ideal for Real Time games (RTS, FPS, etc).
     
  14. Kaiserludi

    Kaiserludi

    Joined:
    Jan 21, 2009
    Posts:
    94
    @Tempest:
    On the one hand you can perfectly use Neutron and Photon together in one game like for example Neutron for Matchmaking, Highscores, etc. and Photon for realtime communication like ingame movement data of the player, but on the other hand neither is Photon is a addon to Neutron nor the other way round. Its just fine to use only Neutron or only Photon, if you just need one of them and not both.

    @JohnVanVliet:
    On the client side you could compare Photon with Lidgren, it is more low level than raknet, to give you more flexibility. But while Lidgren is only for .NET, Photon is (like Neutron) multi-plattform and multi-language:
    iPhone, Android, Unity, Win32, .NET, J2ME, BREW and Flash for the plattforms as well as C, C++, objC, C#, Java and Flash for the language so you are not bound to a plattfrom or programming language, if you want to use Photon, but you can choose the plattform and language which suits your game best.
    And the best: All plattforms are fully compatible to each other, which means, that all your clients can play against each other.
    For example a Unity webplayer on Windows against a Unity Mac OS standalone against a Unity iPhone version against a Flash client against a J2ME mobile phone against a Brew mobile Phone against a native client on Windows against a Native client on iPhone against a .NET Windows Mobile client against an Android phone and so on all in the same match is no problem at all.
    Another main advantage over Lidgren is of course, that you get Photon server SDKs from us, too and while all you need for general realtime ingame communication is implemented, you can just easily expand it with your own server logic for specific features of your game.

    PS: Welcome onboard Chris, nice to see you here at the unity community :)
     
  15. JohnVanVliet

    JohnVanVliet

    Joined:
    Mar 19, 2009
    Posts:
    15
    Kaiserludi:
    Thanks for the reply.
    Can you elaborate on Photon's server-side SDK? I can't find much information on the Exit Games website.
     
  16. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    JohnVanVliet:

    On the server-side, we created a high performance C++ server application, which takes care about the nitty gritty protocol part for you. It takes care about the clients for you and hosts C# applications that take care of the game logic. This is where you can develop your game.

    The SDK offers the interfaces to build on top of that C++ Socket Server and a basic implementation to start your own development. The so called "Lite" application is basic: create or join games, send events to others in that game and leave a game at will. It also sends a complete list of players when someone is joining.

    Requests from clients (operations) are handed to the LiteGame-class by Messages. They are lightweight and are handled in-order and one-by-one, so you don't have to care about multi threading in there.

    You can send your own events (new meanings for your messages) with the existing API and could add more functionality as "custom operations" easily.


    It's meant to be simple and understandable, so you should be able to extend it easily.


    Best of all: you can check it out for free now. There is no obligation, aside from your contact data to get a trial license.


    I hope that gives you some idea about Photon.
    Tobias
     
  17. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    966
    What platform is the server running?
     
  18. JohnVanVliet

    JohnVanVliet

    Joined:
    Mar 19, 2009
    Posts:
    15
    TobiasS:
    Thanks for the extra info.
    Photon has made my short list.
    I will be checking it out in a few weeks.
     
  19. Kaiserludi

    Kaiserludi

    Joined:
    Jan 21, 2009
    Posts:
    94
    Hi.

    • Microsoft .NET Framework 3.5 + SP1
    • Microsoft Windows Server 2003 or Windows Server 2008
    • Recommended: 64 bit

    For development Windows Vista and/or Windows XP are fine, of course.


    As I can see, my colleague Tobias already fulfilled my wish and answered this one for me and I would not be able to do a better job than him on that question :)

    @Tobi:
    Welcome on board :)

    Kind regards, Stefan.
     
  20. Kaiserludi

    Kaiserludi

    Joined:
    Jan 21, 2009
    Posts:
    94
    Here is a short comparision between Neutron/Photon, Smart Fox Server and Electro Server:

    Link
     
  21. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Question: Datatypes mentions all. Does this mean that this was recently updated?
    I ask because the one we evaluated a few weeks ago actually was not capable to serialize floats (single), which forced us to use strings to send the floats
     
  22. Kaiserludi

    Kaiserludi

    Joined:
    Jan 21, 2009
    Posts:
    94
    Floating points are not supported on the client side at the moment. This is a relict from the time, Neutron was for mobile phones only, which often have does not have fast floating point units, but only slow floatin point emulation. As Neutron and Photon use the same common base classes for things like serialization, Photon inherited the missing floating point support from Neutron.

    As no customer ever explicitly asked for floating point support the last years, we never implemented it (it can easily be converted into an int64 before sending and backwards after receiving by the application via * and / to avoid the more bandwith-intensive strings).

    Of course, we can implement floating point support (or support for any other datatype, you need) immediatly. It is no big deal at all, as all affected code is easily extendable for additional types.

    datatypes, supported at the moment are:
    byte
    short
    int
    int64
    boolean
    string
    byte[]
    int[]
    string[]
    Vector (consisting of elements of any other supported type)
    Hashtable (consisting of elements of any other supported type)
    Even nested Vectors and Hashtables (or a mix of them) are supported as many levels deep as you want (only limited by hardware)
     
  23. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Strings are not more bandwidth intense actually at least if used right.
    Reason is that 4 byte are 4 byte, independent if they are sent as float or are sent as byte[4] and the later can be generated out of the float :)

    Thank you for the answer
     
  24. RabidSquirrelGames

    RabidSquirrelGames

    Joined:
    Mar 22, 2009
    Posts:
    32
    Is this chart based on SmartFox or SmartFox Pro?
    From what I can tell in the SFS Pro docs, it supports more than just XML strings with Actionscript 3.

    From their site:
    "Raw data protocols for better data compression in real time games"
    http://www.smartfoxserver.com/products/

    Also, what is meant by "HTTP" in the chart?
     
  25. Tazadar

    Tazadar

    Joined:
    Oct 1, 2011
    Posts:
    91
    Sorry to bump this thread up but is there a linux server version of Photon?
     
  26. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086