Search Unity

What kind of dedicated networking solution do you need?

Discussion in 'Assets and Asset Store' started by jedy, Jan 19, 2012.

  1. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    Hello,

    Here in Land of Strife we're interested what kind of dedicated networking server do you need?

    After a lot of work we've created a dedicated server for our game that Unity works great with Unity.
    We have currently implemented
    -TCP and TSL socket connection between the server and unity
    -Ping
    -Reliable and Fast structure
    -Opcodes sending and handling
    -Chat
    -Movement
    -Player State Updates
    -Spellcasting
    -Targeting
    -NPCs
    -Respawn
    -Stat System

    Benchmarks:
    Whit Wi-Fi the speed ( in the same country ) gets as fast as 5 millisecond pings.
    With cable Internet the speed ( in the same country ) could get up to 4 millisecond pings.
    It takes roughly THREE-HUNDREDTH of a SECOND ( even less ) to send a packet both way between the server and client!

    Note that the server the benchmarks were tried on didn't have top connection speed. With Local Area Network the speed gets even faster - 1 to 2 milliseconds per ping.

    We're considering of exporting the core of our networking, so people what kind of features would YOU like in a dedicated server?

    How much would you pay for the server itself or for both the server and hosting it on our machine?
     
    Last edited: Jan 19, 2012
  2. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Just some thoughts on this: A lot would depend on how well designed the product was...the code, and documentation. How generic is it, and how easily it could adapt to my project. Would it still be a lot of work to fit my design, that sort of thing. Which probably has to be answered on a case by case basis.

    You mentioned 4 and 5 millisecond pings...isn't that more of a function of the network itself, rather than your server? I'm not a networking guru by any means, can you clarify?
     
  3. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    The pings depend both on the server and the network.

    The network speed of users is variable. You cannot control that.
    However you could do couple of things to reduce ping time:
    -Get faster Internet connection from your side
    -Optimize server performance
    -Improve server hardware

    Servers should be able to process many requests simultaneously with great speed and without taking too much bandwidth to communicate with the client. In our case that's what we did to make the most of it:
    -An adaptive server - the server reacts to the current amount of connections and pumps it's performance up when needed for it to be able to process all of them
    -Multi-Threaded database connection, thus the server doesn't pause while a database query is being executed.
    -Smart packets sending - the server sends player updates bunched up, instead of sending them one by one, this way the whole thing gets just one network packet overhead ( Packets traveling through the Internet have a certain amount of overhead - for senders IP, receivers IP, subnet masks etc etc ). With reduced amount of packets the overhead is minimized, that way the socket has to transfer less data.
    -Clustering embedded in the server technology, making adding additional machines to help the server an fairly easy task
    -C++ core to make the server code run as fast as possible
    -The hosting machine is using a Linux without a visual environment - all the system resources are available for the server
    -Packet archivation will be implemented soon to reduce packet size even further

    Using those we've made the server to run as fast as possible, enabling it to host hundreds of players on a fairly regular machine, without experiencing neither network nor local delay.

    To top that we've implemented TSL technology to transfer encrypted data, which is currently on of the highest possible levels of safety of information.

    If there are enough people interested in this, we will release the core of the server including a great deal of documentation and sample methods to help expanding the server.
     
  4. siliwangi

    siliwangi

    Joined:
    Sep 25, 2009
    Posts:
    303
    + for fast obfuscated encrypted of packets opcodes :), custom extensible opcodes, affordable pricing, full source(if possible, as networking is the hardest i will pay for 200-500$ depends on features) reliability. Why?, you should remember this is indie market afterall, some of us only having a standalone game that wanted to upgrade into prototyping it as multiplayer too lazy to touch the network code, some successfully lift it off as commercial, some just archived, i think you could define 2 different use case (indie commercial).
     
    Last edited: Jan 19, 2012
  5. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    Encrypted packets are currently supported by a TSL connection.
    The opcode structure is easy to extend and customize. Would be even easier when we get some documentation for it.

    By all means we intend to release a cheap indie version on the asset store, as a one time payment - it of course would have a player limit ( no less than a 100 players ) and limited source code, but it would be cheap and perfect for prototyping.

    For more players there would be small monthly fees. Still source access would be still limited. Optionally we could host servers, but that would add 20% to the monthly tax.

    No matter what version of the server anyone bought he will have support and updates included.
    Full source could also be sold on arrangement.
     
  6. siliwangi

    siliwangi

    Joined:
    Sep 25, 2009
    Posts:
    303
    I also coming from *nix background so installing and maintaining would not much a trouble for me, anyway that's seems great but really hoping there is an affordable option for full source indie license, there was another dev who going to provide affordable full source access to his networking solutions but seems to be no more news about it. Yes affordable wording is always in my indie mind :).
     
  7. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    Providing full source at indie price would pretty much render anything more expensive than that pointless.
     
  8. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Isn't tcp frowned upon when being used for an MMORPG as tcp allows a 100% transfer of a packet rather than giving the user the choice of having reliable and unreliable packets thus increasing bandwith usage?

    I would call this an update block rather than updates bunched up :)
     
  9. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    With well enough written code, TCP and UDP ( the protocol used to send unreliable packets ) speed wouldn't differ that much for most cases.

    Anyway with our solution all the packets are reliable. But this allows us to use a single channel on the socket which works either in an encrypted state - as a TSL channel ( really secure ), or in an unencrypted state - as a FTP channel. We're considering a couple of different approaches to add support for UDP ( unreliable packets ).
     
  10. artis

    artis

    Joined:
    Oct 8, 2010
    Posts:
    1
    Hi all. I am the lead server developer. I noticed there were some questions so I decided to clarify some things.

    @Stellar
    * Obfuscated packets. I have an idea for opcode obfuscation + random padding for the packets, so they wont be able to be mapped by casual sniffing packets.
    * Our encryption is achieved with TLS. Every socket connection between the client and the server has 2 streams available. 1 Encrypted and 1 Plain text. This way you can decide what kind of transmission to use for this packet. Currently to trigger the encryption a packet flag is set but I could add an setEncryption() function to simplify this.
    * Full source. At this time do not plan to release the whole source. We are thinking of providing libraries you can link to and header files. The networking framework will be flexible enough to allow you setting a lot of features, without the need of full source. You will be able to implement any game functionality even with the closed source .

    @jc_lvngstn
    * Ping. The ping jedybg is talking about is a data packet sent by the client and sent to the server and then sent back to the client. This feature implements ping which will test the network connectivity + the network layer delay of the server.

    @Efraser2007
    * TCP/UDP. Currently we are using TCP sockets. My idea is to use UDP as an option which the server developer can set as configuration. UDP can be reliable too, the only requirement is that you implement the safety checks on your own and assemble the packets on your own. Im thinking about implementing this in our networkng framework, which will do this automatically for you. In reliable environment in which the connection is stable enough to consider using UDP this could increase the performance considerably.


    If you have any more questions - ask them here or better - send me an email to dimitar.krastev@ymail.com