Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TERA Networking - Let's dig into the combat style.

Discussion in 'Game Design' started by Christian-Tucker, Feb 3, 2015.

  1. Christian-Tucker

    Christian-Tucker

    Joined:
    Aug 18, 2013
    Posts:
    376
    Implementation of a basic hack/slash combat system isn't a very hard task, honestly with Unity it's exceptionally easy and the only daunting task is getting the animations correct, or getting the animations in general. I've created a few Hack/Slash prototypes, but with these slow-animated, single attack pattern models that I can obtain for free off the asset store, but none-the-less they were functional. I'm getting to the point where I would like to create a multiplayer world that was capable of holding a few hundred connections running around doing whatever they please with action-combat.

    This may seem like a child's dream to some people, but a few hundred connection in all reality isn't that much, and when you factor in things such as radial networking for data-transmission it becomes a very simple and scalable system, but what should we do?

    It's obvious that the TCP protocol for this kind of game is a horrible choice. We're not going to sit here and decode everything in order. It's action combat. That means the person with the most skill wins, or in some cases, the person with the faster Internet connection, now, why is that? It's common on a bunch of fighting games, that the host of the game has an unfair advantage, or the person with the lower latency has the unfair advantage, and that's because you can issue more commands to the server quicker. You can get that attack command to the server 40% faster than your enemy can get the dodge command there, therefor your hit connects. This is common, and not something that I personally believe should be accounted for. So UDP is the only way to go, but we're going to want to add a little bit of reliability to this project. This is commonly referred to as RUDP, and I can honestly state that I have zero experience with working with this type of networking. I'm sure that using a library it'd be simple sauce, but that's not what this thread is about.

    So I've already pretty much narrowed down the only logical form of networking for this type of game to be a combination between TCP and UDP, where TCP would hold the stable connection, and relay things such as Chat messages and handle all of the feature based requests, such as instance resets, trading, auction-house related content, turning in quests, and so forth, while UDP would be implemented for things such as handling movement, attacks and animation states across the network.

    TERA implements a completely authoritative action-combat system, which means the server is validating every single one of your 50 clicks per second and telling the client which one of those was valid. It can be argued that this check is done on the client side, and that is correct, but it's also done on the servers side, in-case the client check has been overridden.

    to follow this setup I would have to make use of the physics on the server, so here's where I'm stepping into a new field that I'm not used to, up until now all of my projects have used servers that I've hand-written in java, none of them have implemented physics, and the ones that did was more like Vector math than that of physics. This means that I'm going to have to move my server over to C# and utilize the Unity physics engine.

    It's only logical that when creating an authoritative world your server is going to have an instance of the game running inside of it at all times. We're not talking about just data for all of the players locations, we're talking about a full game simulation. Physics are not an option. They're being ran and checked on the server at every given moment. This could put an immense amount of strain on the server. Think about it, 250 players running around, with about 5,000 NPCs, and physics checks are ran numerous times per second. The server is going to have it's workload cut out for it.

    While I have an amazing idea for a game that I know would attract numerous people and have great potential, my lack of experience in this field is pushing me towards the corner of "Don't open that can of worms", and I'm not sure which direction to go.

    That's why I've turned to the forums, to get information on what you guys thing would be fun, while I would love to create this game, the idea of server-ran physics seems to drive my head straight through the wall in terms of required performance. I'm just a one-man Indie developer with too much time on my hands, and yes, I understand the rules. You can't just create a MMORPG over night, but I can definitely create something that me and my friends can enjoy, test, and play-around with before attempting to sell the idea off to a game company.

    I feel like my current idea for this game is so unique, and could be so enjoyable, even after talking it over with all of my friends in my circle, that it could seriously have some professional level potential, and I would love to see it come to life, but to do that, I'll have to put in the ridiculous amount of work and dedication that it will take to show that the game and the idea behind it has potential, and that it's not just another mindless grind with kill quests that everyone will expect it to be.


    tl;dr - Server sided physics? Best options?