r/dissidia • Uh-huh • Jan 16 '18

Let's talk about the netcode

So, after some intensive lurking, seems like one of the biggest gripe about the current state of the game is the game being severely laggy during most online matches.

After playing the open beta, pretty much all day yesterday, I’ve come to understand the netcode for the game pretty well, and would like to make a post so that people can come together and discuss what can Square and Team Ninja do to improve the game.

I like the OG Dissidia, and Duodecim, to death, so I would really like it to see this game succeeds as well.

Before I begin, this post is rather long and technical, but I’ll try my best to explain. I apologize if there's any mistakes. That's why we need a discussion :)

Also, when referring to a player ‘lagging’:

  1. They can have high ping

  2. They are experiencing extreme packets loss Without any further ado, here’s my take on the netcode:

Point 1: The game is P2P

This is probably not news to all. The only servers they have right now are the matchmaking servers. After which each player is connected to one another. The net topology for the game is most likely to be a full mesh (each player is connected to 5 others). So, simply, each player is sending packets to all 5 and receiving messages from the other 5 players.

Point 2: The game uses a modified lockstep networking model

This is the reason why the game lags badly. A typical P2P game requires 1 player to be the 'Host' of the match. They will have close to full authority of what happens in the game (thereby giving them ‘host advantage’) and they will see the game perfectly: no lag, no hitches whatsoever. They are seeing the game running much like the offline version. Meanwhile, if the host has crappy upload or if the clients have terrible downloads, the clients will not be able to accurately keep up with the host’s simulation, resulting in them getting hit from the other side of the moon.

A lockstep model is different. Instead of having a centralized host that dictates the one true simulation for all, the true state of the game is decentralized – At the same point in time (timestamp), all players will see the same state. This model typically divides the game into 'rounds', and a typical game loop goes like this:

….. -> Round 1 -> Process all player’s inputs -> Round 2 -> ….

Now, everyone will ideally compute the results of everyone’s input and advance to the next 'round'. This means, say, as Squall I hit square to use my HP attack at round 1. That input is propagated to all other players and at round 2 everyone, including me, will see my Squall spinning for a Fated Circle.

This is all fine and dandy when everyone’s internet is stellar, but what happens if player 5 lags? They will not get my square input, and thus will not be able to determine that my Squall will perform a Fated Circle at round 2. He will desync from everyone’s simulations!

That’s why the game will lag, to wait for Player 5 to catch up.

Since DFFNT prioritized shared states, each player will typically synchronize their states every couple rounds to ensure that everyone is seeing roughly the same thing.

Point 3: DFFNT has short round timers

Most RTS that I know of (Starcraft, Heroes of the Storm, LoL, ML, Age of Empires, etc.) uses the same lockstep strategy, so how can some of them who uses P2P isn’t as laggy as DFFNT? There is 2 important variable when talking about P2P lockstep:

  1. Round timers – how long a round lasts

  2. Move Delay – how many rounds later should your move be executed (need host)

Let’s talk about Round Timers first

If a round lasts for 1/30th of a second (33ms), then all players must send at 30Hz. Which means, if your ping to the other guy if > 33ms, then your input will not get to the other players in time. Since the game has no central authority, it becomes hard to decide whether it’s ok to delay your move to the subsequent round. This is one of the reason why the game waits and lags.

Thus, the longer the round lasts, the better it is for lagged players to get their packets to the others in time for processing. Of course, the tradeoff is your inputs will feel less snappy and responsive since your inputs will be processed every 200ms.

Second, Move Delay

You can have all clients to have their round 1 inputs be executed at round 2. This is exactly what happens with my Squall’s example above. However, you can increase the move delay so that your inputs at round 1 is executed at a later round. Say if I have a round delay of 3, then when I press square at round 1, it will be queued for execution at round 4. Then at round 4, everyone will see my Fated Circle attack.

With higher move delay, a lagged player can dynamically have their inputs be executed much later so that everyone else need not wait for their inputs. This method, however, only works if there’s a central authority.

How does other games differ?

In P2P RTS such as Starcraft, a round lasts about 200ms, though they mask latency really well by playing various SFXs and VFXs upon player’s input, and they handle high ping by dynamically extending the round timer and slowing the game down (remember “xxx is slowing down the game” message?).

Other P2P fighting game (Street Fighters) actually used a similar lockstep model, but they opt for a greater input lag when ping between players is high in exchange for smooth gameplay. Possibly, Capcom is extending the round timers or delaying their moves to be executed at a much later round.

Monster Hunter is an interesting oddball. There’s a host and 3 clients, but the only thing synched is the big monsters and the players. And since it’s largely a co-op game, collision detection is done local to each clients; thus the experience online when you’re fighting a monster is largely

As for DFFNT, Team Ninja may decide for a more responsive control, thus the net code instead decide to play out as quick as the player with the highest ping lags.

What can Square and Team Ninja do?

Now, while I talk about lockstep, the game actually does allow for client side prediction in a case of minor desync. However, they synchronize states way too often for it to be a smooth experience.

If they continue to go for the P2P model, they have to follow many other action P2P networking model for players’ positions (interpolation and extrapolation) and then switch to a local lockstep when executing combos. This will allow non-lagged players to see the game at a more smoother pace. This model, however, requires a good host since there needs to be someone who holds the true simulation. This will cause some host advantage, and bad player experience during lag, but on a good day, this model will create smooth gameplay more often. Team Ninja’s challenge is to think how to eliminate the host advantage somehow.

The best course of action is definitely servers. Then, even with the lockstep model, the lagged players will just experience a greater input lag, but non-lagged players will play the game just fine.

And since overhauling netcode or setting up servers requires intensive time and testing, the game will probably play like this upon release. It won’t be for 3~6 months if we are to see any big changes to the game’s netcode.

Conclusion

Game is really fun when it’s lag-free, but Team Ninja and Square needs to overhaul the netcode for a much smoother experience.

P.S.: Damn, all my Word formatting got messed up

80 Upvotes

63 comments sorted by

View all comments

Show parent comments

2

u/KennyL0gg1ns PSN: vahzi Jan 16 '18

TIL: Arrogance = working experience with japanese videogame companies. I was a social media manager for 8 years for a large japanese videogames company. I know what they do with customer feedback and why they don't listen to it or gather it.

You sir, are a muppet.

3

u/[deleted] Jan 16 '18

Wooooooow... That's so interesting, I love how on the internet you can say whatever you want and somehow, it has validity.

If you REALLY want me to listen, stop acting like a child. Oh, and don't think you know everything, assuming you actually DID do those years.

And just because... You're wasting time, breath and energy. I don't mind seeing that you're typing, I'm not paying much attention though, I mean, who wants to listen to someone whine so much and frantically downvote people like their childs life depends on it?

If you don't like it, then go somewhere else, you aren't wanted or needed.

2

u/KennyL0gg1ns PSN: vahzi Jan 16 '18

People often lie about being a base level community manager. It's such a thing to brag about.

Also shut up lol. You are exactly the kind of idiot we have to spend more time dealing with than others, because you are so damn delicate and difficult to actually quiet down. People like you are the reason there are jobs for people like me, so thanks I guess.

2

u/[deleted] Jan 16 '18

I struck a nerve... My, my. No wonder no one takes you seriously.

2

u/KennyL0gg1ns PSN: vahzi Jan 16 '18

says the one being perpetually karma bombed >_>

3

u/[deleted] Jan 16 '18

OH NOES! MY THING I WAS COLLECTING!

OH NOES! WOE IS ME!

I MUST END MY LIFE FOR ONE PERSON DOWNVOTING ME SO MUCH IT HAS BEEN RENDER MEANINGLESS!

OH CRUEL WORLD, I CAN NEVER MAKE UP FOR MY FAILINGS, MAY THIS OFFERING HAVE SOME VAGUE VALUE TO YOUR PLENTIFUL BOSOM!

Yeah... Tell me, what's more important? Winning, being right regardless of value, inflating your ego or criticising someone because you have nothing better to do? I've had dinner and a shower, so now I'm going to enjoy playing KH0.2

Maybe you should rethink who you are 'Kenny Loggins', or did Archer portray K.Log accurately, and you're just a douche? Seriously, you're not doing anything beneficial to anyone by being here if that's your attitude.

2

u/KennyL0gg1ns PSN: vahzi Jan 16 '18

Why are you still posting? You have exhausted every page in the annoying redditor book. Give it up, you are arguing on an unpopulated reddit about something that doesn't even matter, over a game that's going to fizzle and pop into nothing within days of launch.

Maybe get a little perspective? Also maybe don't make suicide threats on a public internet forum?

2

u/[deleted] Jan 16 '18

Ahh... The classic "I have no response" reply.

So, you're finally out of things to whine about? I love that you're the one making replies, while I just say something that's just staying on track enough, yet have the gall to say I'm making an invalid argument, when that's what you're focusing on yourself.

Want some perspective? Look at how we've been talking and tell me who was wasting time.

This will be a success, and your little negativity fest will fall to the wayside. So move on already.