Author Topic: Some Questions  (Read 1873 times)

stanchion

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Some Questions
« on: February 29, 2016, 12:26:17 AM »
1) If I understand correctly, TNET server runs outside of Unity, so how are physics and other Unity specific things handled?
2) What is the range of players you can expect running a single server instance, assuming you're running on a dedicated server
3) Is this networking ideal for MMO?

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Some Questions
« Reply #1 on: February 29, 2016, 10:36:16 AM »
1. Grossly simplifying, TNet is basically a relay server (think like a radio tower relaying a signal). All physics / logic is handled on the client, and the results are sent to the other players through the server.

2. Depends. Aren has shared some stats from hosting his Windward servers, "I had 316 players connected to my home PC using 200 MB RAM and 4.5% CPU [with a 20 Mbit upstream connection]"
(http://www.tasharen.com/forum/index.php?topic=13077.msg59083#msg59083 && http://www.tasharen.com/forum/index.php?topic=13482.msg60517#msg60517).
I think resource usage could be reduced even further with the changes to DataNode in TNet 3, though I haven't done any testing myself.

3. If you have to ask, unequivocally no. TNet isn't authoritative. You don't want clients handling physics or AI logic in an MMO, do you? You could make some easy modifications to make it so the "host" (has that been refactored to "operator" yet?) is the only one calculating important stuff, but that's still not truly authoritative. The server has no clue what's happening in the world: it's only blindly passing data. This isn't to say TNet is bad in any way. TNet is brilliant in many regards and I highly recommend it, but I believe an MMO - by the classic definition - requires its own specialized networking solution.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Some Questions
« Reply #2 on: March 01, 2016, 06:29:05 AM »
1. Client-side. TNet's server doesn't run Unity, nor does it know/care anything about what you're doing on the client side. Clients send messages to other clients through the server.

2. Thousands if you're smart about it. The most I've seen was when I launched Windward. I had over 300 players connected to my server that was running on my dev computer (same one I was using to develop) launched in debugging mode via Visual Studio on a regular household broadband connection and its memory usage was ~250 MB with bandwidth usage of about 1.8 megabytes per second (of course this will vary depending on your game and how much data you will send). CPU usage was about 2-4%.

3. I never advise making MMOs. It's like setting out to make the next Minecraft. While you could do it in theory, the chances of you actually succeeding are slim. MMOs require an absurd amount of security / anti-cheating / anti-hacking logic on the server side, especially when you consider having thousands of concurrent clients, let alone hundreds of thousands like in World of Warcraft. Could you do it using TNet? Sure. But to do it right you can expect to add quite a bit of additional security to the server itself if you plan on doing it right.

The word "MMO" in general is a very loose term these days. Some called Windward an MMO because of the hundreds of concurrent players I've had playing it on the same server -- but is it? I wouldn't call it that.