Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Location
    Bellevue, WA
    Posts
    803

    Photon-vs-RakNet?

    I am just curious as to why you guys decided to use Photon instead of RakNet which is a really well done networking API and works well with unity already. Not complaining, just curious what your thoughts are on Photon-vs-RakNet.
    " Imagination is the preview of life's coming attractions " - Albert Einstein
    " If you can't explain it simply, you don't understand it well enough." - Albert Einstein

    My Website: http://www.gamedevlounge.com/

    If any post is informative please provide positive feedback by clicking the star below.

  2. #2
    Join Date
    Aug 2008
    Location
    San Diego, CA
    Posts
    205
    One of the major reasons that I know of is so that everything can be in a single language, C#.
    "Choose a job you love and you'll never have to work a day in your life" - Confucius
    "I see and I forget, I hear and I remember, I do and I understand" - Confucius
    "My mom didn't see the irony in calling me a son-of-a-b**ch" -- Jack Nicholson
    "'Con' is the opposite of 'Pro',so that makes congress the opposite of progress"

  3. #3
    Join Date
    Nov 2001
    Location
    Dickson, TN
    Posts
    5,649
    Quote Originally Posted by Kwest View Post
    I am just curious as to why you guys decided to use Photon instead of RakNet which is a really well done networking API and works well with unity already. Not complaining, just curious what your thoughts are on Photon-vs-RakNet.
    Hey Kwest... Personally, I didn't have any issues with Photon and Unity working together. And as T-Gunn points out, the fact that we can stay in one unified language (C#) between client, server and tool development is something that I'm a big fan of.

    Cheers!

  4. #4
    Join Date
    Sep 2010
    Location
    New York
    Posts
    57
    Quote Originally Posted by busbyj View Post
    Hey Kwest... Personally, I didn't have any issues with Photon and Unity working together. And as T-Gunn points out, the fact that we can stay in one unified language (C#) between client, server and tool development is something that I'm a big fan of.

    Cheers!
    Just to be clear RakNet 4.0 also supports C# (through swig)

    If you want to see RakNet 3 in C# check out raknetdotnet

    Just like Photon RakNet's core is C++ with the added benefit that you have access to the source which, is well documented in source and doxygen. This means you can use either C++ or C# to run the server on Windows, Linux, Mac OS, etc. Photon doesn't offer the source code that's why it's sole binary release form is locked into windows.

    Unity 3.2 uses a modified RakNet 3.x build which I believe (correct me if I'm wrong) is free to download and use without restriction for Unity Licensed users. They have project files for xcode, ms visual studio, and linux make. They also note in the 1st link the key source files of interest in case you want to make on your own RakNet 4.0 plug into Unity's Buitin API. I highly doubt that will be an easy task, but at least the option's there.

    I don't work for RakNet, but I thought Kevin Jenkins was pretty cool and quick when answering my own questions. From what I can tell the Unity team implemented his server all on their own without his help. So I don't think he know's Unity but he can help with MMO questions relating to his server.

  5. #5
    Join Date
    Jul 2010
    Posts
    13
    Quote Originally Posted by tomo View Post
    Just to be clear RakNet 4.0 also supports C# (through swig)
    Because SWIG just generates a wrapper I'm not so certain of the utility of this. You'd have to be able to use plugins (so web deploys are out), and you'd pro.

    [QUOTE=tomo;1534797] Photon doesn't offer the source code that's why it's sole binary release form is locked into windows. </QUOTE]

    According to what I've read the photon guys say in the photon forums, the reason they don't make the server available on other platforms is because it is heavily optimized for windows. It has nothing to do with source availability. They've got the source, it just would mean engineering a totally new product, which isn't in their interests.

    I am curious how any "physics" might be handled in the mmo, since my understanding is that at scale authoritative computations would be overwhelming. I guess using photon allows you to write a master "client/server" in unity though, so I guess a physics agent could be spawned per unit-area, but that seems crazy, right? What do people do for authoritative large scale games?

  6. #6
    Join Date
    Nov 2009
    Location
    Dallas, Texas
    Posts
    170
    Quote Originally Posted by tomo View Post
    Just to be clear RakNet 4.0 also supports C# (through swig)

    If you want to see RakNet 3 in C# check out raknetdotnet

    Just like Photon RakNet's core is C++ with the added benefit that you have access to the source which, is well documented in source and doxygen. This means you can use either C++ or C# to run the server on Windows, Linux, Mac OS, etc. Photon doesn't offer the source code that's why it's sole binary release form is locked into windows.

    Unity 3.2 uses a modified RakNet 3.x build which I believe (correct me if I'm wrong) is free to download and use without restriction for Unity Licensed users. They have project files for xcode, ms visual studio, and linux make. They also note in the 1st link the key source files of interest in case you want to make on your own RakNet 4.0 plug into Unity's Buitin API. I highly doubt that will be an easy task, but at least the option's there.

    I don't work for RakNet, but I thought Kevin Jenkins was pretty cool and quick when answering my own questions. From what I can tell the Unity team implemented his server all on their own without his help. So I don't think he know's Unity but he can help with MMO questions relating to his server.
    That's really cool! The problem with RakNet, as I see it, is that it's more low level than something like Photon. What I mean by low level is that RakNet solves the same problem that something like WCF solves for .NET. It provides a way for you to create game objects on the server and then use RPC to call functions on them. Photon provides this ability and then gives you an interest management system on top of it. This interest management system is a huge win, in my opinion, because building this from scratch can be really complicated. RakNet is a multiplayer networking framework that you might be able to build some MMO features into but Photon already has some of this functionality out of the box. If i'm an indie game developer with a small team the more systems I can get out of the box, the better.

    There has been quite a bit of discusion about Unity and Terrain, etc. However, the dirty little secret is that this entire game is going to run on the server not the client. The only thing the client is going to do is prediction, smoothing algorithms for movement adjustments to compensate for lag, etc. For example, when you loot something the client may predict what loot you're going to get to make it look instant, however, it's the server where you actually are given the loot. That way if someone hacks the client to calculate loot differently it will only be reflected on the client while the server calculates the real loot and adds it to the player. Everything in the game will probably work this way.

    It took 8 years and 100+ people to create WoW where most non server games take around 3 years. If there's something I'm missing with RakNet please let me know, however, it seems like RakNet has some really nice MMO specific features out of the box.

  7. #7
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    7,272
    Other than the learning curve associated with figuring out how Photon works (which wasn't difficult), I remember the initial setup and getting Photon working in Unity to be extremely simple. The provided documentation wasn't exactly robust (Someone should really do something about that! ) so there was some experimentation to reverse engineer their example and put together something that worked better for our use case. Once you understand the way Photon works under the hood, modifying or extending it is really easy. Getting it working in Unity is pretty much just dropping in the needed files, making a connection, and then sending and receiving events.

  8. #8
    Join Date
    Oct 2008
    Location
    Holy Land
    Posts
    313
    C# as a unified language is something that will cut times seriously.
    If I have to, I'll buy photon with no hesitate..

  9. #9
    Join Date
    Sep 2005
    Location
    Montreal,Canada
    Posts
    1,858
    i believe its been stated in the unity forums that unity networking(they are using raknet) cannot handle mmo size concurrent users (i believe its because of how it was integrated).
    PSN : VenticalLamma (no ps3 at the moment) | Xbox live : Dj Whip It Out | Steam ID : undead_killa

    Sgt.Matt Baker: You really get to know a man if you get to watch him die, that moment right before he realizes its over, that moment his face reflects every decision he's ever made, what kind of life he led and if he regrets it

    (\__/)
    (='.'=) This is Bunny. Copy and paste bunny into
    (")_(") your signature to help him gain world domination.

  10. #10
    Join Date
    Jul 2006
    Location
    San Diego, CA, USA
    Posts
    897
    I've used RakNet but not Photon. For a commercial product the documentation isn't as good as I would have expected but you do get the source code. But sometimes its nice not to have to read source files just to figure out what's going on.

    I've heard that it doesn't fair so well with larger MMO type projects. Performance was an issue. That' second hand info, though. My project was not that big so I didn't experience any problems. RakNet isn't free for commercial projects either I might add.

    Steve

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •