What's new

What is Net-Code and how can we help fix it?

Wrubez

The Flow Instructor
do you feel that having a Ping in game could help us find a solution, or at lest the proof of problem! something to at least evade online lag issues
Sure it's a start. I think them patching in network statistics as a whole would be useful in being able to select your opponent. I forget what game it was that I played (was it Halo 3?) that actually booted folks with bad latency and you also had to have an open NAT type on order to even search for a server to play on.

But having things like network stats for dedicated servers and regions, individual players, network load, etc would be nice. Would at least help steer us to a semi playable match. Time of day is huge too remember. You'll experience the most lag during peak hours (usually between 4:30 pm and 10:30 pm) than off hours like early morning/afternoon and late night.

But at the end of the day, that's simply a reporting feature showing you a mere taste of what's what behind the scenes. The code is still buggy at best and needs to be reviewed, revised, and stress tested before patch. Testing is so incredibly important and it is staggering how many developers (not just NRS so not conducting a witch hunt here) skip that part before launch and then magically release a patch weeks later when they actually have time to sit and QT.

Perhaps they even set minumum connection requirements. No red or yellow pings for instance. That would at least ensure clean connections on the wire. Remember that even if you aren't playing someone with bad ping, those with bad ping still connect into NRS servers in general. When someone's connection isn't very good, they require more resources to compensate. More resource consumption then impacts overall performance for everyone.

Multiply that by however thousand less than optimal connections are on at once and that's one bottleneck that could be addressed right there. That would be my first step from a networking standpoint. Apologies if you have a bad connection but you would hate online anyway as I'm sure it's laggy as hell.

Next steps are out of my arena. But I've always had the best results when working with a clean canvas. Weed out the connections that only make it harder to troubleshoot and go from there. And then provide realtime statistics for disclosure.
 

StealthyMuffin

Earth's Mightiest Knucklehead
I think the solution is for everyone to have a good connection and be wired. That's it. I've played in those conditions and the online is pretty good, I think most people are connecting to people with shitty internet.
-Disconnect ethernet cord
-Put router in microwave
-Connect to Wi-Fi
-Play a random ranked match of Skull Girls
-See how much better a good game runs, regardless of variable issues
-Tell me with a straight face that MKX's online play is "pretty good"
No clue where their servers are, not allowed to know.

All I do know, is that from my location with my 60 Up 30 Down Wired internet... MKX Online is totally unplayable for me [8+ to 30+ frames of input delay always]. No matter what the bars say, no matter what my opponents connection quality is, it is always unplayable.
 

Mr. Mileena

Champion
I make this thread in hopes that all of us can bond together to help devise a plan to rid MKX of lag between Clients and Servers if at all possible!

lets start with the Basics...







Netcode is a blanket term for anything that somehow relates to networking in online games; netcode is a term most commonly used by gamers when discussing synchronization issues between clients and servers. The actual elements of a game engine that can cause so-called "netcode issues" include, among other things, latency, lag compensation or the lack thereof, simulation errors, and network issues between the client and server that are completely out of the game's hands.

Potential causes of netcode issues:
  • Latency is an unavoidable fact of online games, caused by not only network latency, which is largely out of a game's control, but also latency inherent in the way game simulations are run. There are several lag compensation methods used to disguise, reduce, or cope with latency, however their feasibility varies by application.
  • Tickrate: A single update of a game simulation is known as a tick. The rate at which the simulation is run on a server is referred often to as the server's tickrate; this is essentially the server equivalent of a client's frame rate, absent any rendering system. Tickrate is limited by the length of time it takes to run the simulation, and is often intentionally limited further to reduce instability introduced by a fluctuating tickrate, and to reduce CPU and data transmission costs. A lower tickrate increases latency in the synchronization of the game simulation between the server and clients. Tickrate can vary from 60 ticks per seconds, to 30 ticks per seconds. A lower tickrate also naturally reduces the precision of the simulation, which itself might cause problems if taken too far, or if the client and server simulations are running at significantly different rates. Games may limit the number of times per second that updates are sent to a particular client, and/or are sent about particular objects in the game's world. Because of limitations in the amount of bandwidth available, and the CPU time that's taken by network communication, some games prioritize certain critical communication while limiting the frequency and priority of less important information. As with the tickrate, this effectively increases the synchronization latency. Game engines may also reduce the precision of some values sent over the network to help with bandwidth use; this lack of precision may in some instances be noticeable. Various simulation synchronization errors between machines can also fall under the "netcode issues" blanket. These may include bugs which cause the simulation to proceed differently on one machine than on another, or which cause some things to not be communicated when the user perceives that they ought to be. Traditionally, real-time strategy games have used lock-step peer-to-peer networking models where it is assumed the simulation will run exactly the same on all clients; if, however, one client falls out of step for any reason, the desynchronization may compound and be unrecoverable.
  • Transport layer protocol and communication code: A game's choice of transport layer protocol can also affect perceived networking issues. Should the game use TCP, networking will have a high overhead cost and increased latency. Should it use UDP, the game engine may need to implement its own networking code to handle error conditions and other things that are handled by TCP; this increases the engine's complexity and might itself lead to issues.
Solutions and lag compensation:
There are various methods for reducing or disguising delays, though many of these have their drawbacks and may not be applicable in all cases. If synchronization is not possible by the game itself, the clients themselves may be able to choose to play on servers in geographical proximity to themselves in order to reduce latencies, or the servers may simply opt to drop clients with high latencies in order to avoid having to deal with the resulting problems. However, these are hardly optimal solutions. Instead, games will often be designed with lag compensation in mind.



Many problems can be solved simply by allowing the clients to keep track of their own state and send absolute states to the server or directly to other clients. For example, the client can state exactly at what position it is or who they shot. This solution works and will all but eliminate most problems related to lag. Unfortunately, it also relies on the assumption that the client is honest. There is nothing that prevents a player from modifying the data they send, directly at the client or indirectly via a proxy, in order to ensure they will always hit their targets. In online games, the risk of cheating may make this solution unfeasible, and clients will be limited to sending relative states (i.e. which vector it moved or shot in).
Client-side:
As clients are normally not allowed to define the main game state, but rather receive it from the server, the main task of the client-side compensation is to render the virtual world as accurately as possible. As updates come with a delay and may even be dropped, it is sometimes necessary for the client to predict the flow of the game. Since the state is updated in discrete steps, the client must be able to estimate a movement based on available samples. Two basic methods can be used to accomplish this; extrapolation and interpolation.

Extrapolation is an attempt to estimate a future game state. As soon as a packet from the server is received, the position of an object is updated to the new position. Awaiting the next update, the next position is extrapolated based on the current position and the movement at the time of the update. Essentially, the client will assume that a moving object will continue in the same direction. When a new packet is received, the position may be corrected slightly.

Interpolation works by essentially buffering a game state and rendering the game state to the player with a slight, constant delay. When a packet from the server arrives, instead of updating the position of an object immediately, the client will start to interpolate the position, starting from the last known position. Over an interpolation interval, the object will be rendered moving smoothly between the two positions. Ideally this interval should exactly match the delay between packets, but due to loss and variable delay, this is rarely the case.

Both methods have advantages and drawbacks.

  • Interpolation ensures that objects will move between valid positions only and will produce good results with constant delay and no loss. Should dropped or out-of-order packets overflow the interpolation buffer the client will have to either freeze the object in position until a new packet arrives, or fall back on extrapolation instead. The downside of interpolation is that it causes the world to be rendered with additional latency, increasing the need for some form of lag compensation to be implemented.
  • The problem with extrapolating positions is fairly obvious: it is impossible to accurately predict the future. It will render movement correctly only if the movement is constant, but this will not always be the case. Players may change both speed and direction at random. This may result in a small amount of "warping" as new updates arrive and the estimated positions are corrected, and also cause problems for hit detection as players may be rendered in positions they are not actually in.
Often, in order to allow smooth gameplay, the client is allowed to do soft changes to the game state. While the server may ultimately keep track of ammunition, health, position etc., the client may be allowed to predict the new server-side game state based on the player's actions, such as allowing a player to start moving before the server has responded to the command. These changes will generally be accepted under normal conditions and make delay mostly transparent. Problems will arise only in the case of high delays or losses, when the clients predictions are very noticeably undone by the server. Sometimes, in the case of minor differences, the server may even allow "incorrect" changes to the state based on updates from the client.

Server-side:
Unlike clients, the server knows the exact current game state, and as such prediction is unnecessary. The main purpose of server-side lag compensation is instead to provide accurate effects of client actions. This is important because by the time a player's command has arrived time will have moved on, and the world will no longer be in the state that the player saw when issuing their command. A very explicit example of this is hit detection for weapons fired in first-person shooters, where margins are small and can potentially cause significant problems if not properly handled.


Design:

It is possible to reduce the perception of lag through game design. Techniques include playing client-side animations as if the action took place immediately, reducing/removing built-in timers on the host machine, and using camera transitions to hide warping.




now with all this said, What can we all do or suggest to NRS/WB to get this Netcode issue solved?

i say we should try an open beta environment or something along those lines, could work but may not solve all problems, maybe in time, i would really like MKX or MK11 to benefit from this before it's to late.


post your solution/idea below!


@WidowPuppy

@Temjiin
@KHAOTIC True Grave
@kabelfritz
@Bombardier777
@sub_on_dubs
@The Slaj Jazz
@Wetdoba
@LaidbackOne
@Houndovhell
@Marbledecker
@Eldriken
@Afk Skinny
@beepboop
@Death
@I GOT HANDS

tag anyone i forgot!
Your opening post reminds me of something L would come up with. Your avatar suits you XD
 

Skkra

PSN: Skkra
-Disconnect ethernet cord
-Put router in microwave
-Connect to Wi-Fi
-Play a random ranked match of Skull Girls
-See how much better a good game runs, regardless of variable issues
-Tell me with a straight face that MKX's online play is "pretty good"
I wish I could like this ten thousand times.

I've said this in multiple threads, but Skullgirls is probably the #1 implementation of great fighting game netcode that I've seen. I play MKX with my friend across town and it's so laggy that it's not even fun. I play Skullgirls with my friend across the country (Philly to LA) and it's like we're sitting in the same frigging room.

Killer Instinct and Tekken Tag 2 have similarly awesome netcode. SF4 is now 6 years old and the netcode is still way better than MK9/Injustice/MKX. I honestly don't give a shit what the issue is at this point. Scale your servers, learn to write real netcode, etc etc. It's 2015. This level of netplay is straight up unacceptable.

TL;DR
The performance of MKX online is literally worse than playing Doom over a 14.4 modem in middle school. Sadly, all I can do is stop buying characters, costumes, and really any NRS product going forward. Which sucks, because I love MKX, and would like to keep getting those things. But the only thing a company understands is a bottom line, so if I want to make my voice heard, all I can do is vote with my wallet.
 

buyacushun

Normalize grab immunity.
Damn I get no love in a netcode post?

Thanks for the info Jagged. I have a couple questions that you or maybe someone else can answer for me.
Aren't most, if not all fighters P2P? Would that mean some of this server - or client-side stuff doesn't pertain to them? I think it was tickrate and a few other things that seem to be if someone is communicating with a neutral server part for connection. But if it's just two "clients" than isn't it a different situation?
Does GGPO and/or other rollback netcodes use extrapolation as the main way of handling connection and inputs?

I saw someone link the tekken article on Ehubs. They have a good netcode but I'm wary about changing the game to accommodate online. It changes how some things play just to make it closer to offline. When T7 comes out I'd be curious to see what someone has to say from playing online to playing offline.

I think GGxrd uses a sort of variable input delay system. While playing online the amount of delay will display in the corner. I'm supposedly getting 4f of delay when I play a friend in a different state. In Skullgirls the recommended delay setting will be anywhere from 0-2f (as if it was one of the best possible connections) to 3-5f (which is for yellow ping and average playing settings). Could anyone tell me what kind of "tricks" these 2 games are using in regards to the different things listed in the OP?

In MK sometimes it works and sometimes I cant block or wakeup properly. It really feels like a mixed bag in the same conditions, usually on the laggy side. MK at it's best is still the worst imo.
Does anyone have any answers or maybe resources to help me with these questions?

LOL @StealthyMuffin post. I should probably try that and just see how it is. Everyone should go try KI, TTT2 and SG online. Then for perspective try SF4 and MK9.

Whatever NRS is doing needs a complete overhaul in all aspects. Better netcode with rollback. Maybe No more a manual frame delay setting. ping bars, give us numbers. Online beta. Tone down graphics during online play if you have to. No one is going to care how nice rolling waves look in the long run. The amount of modes is good, Just would like an all play lobby mode (Skullgirls, Tekken, Blazblue spoiled me) and maybe a tournament or team battle mode. Really they got most parts of the game right. Just failed on the on the one part that keeps people playing and makes them want to come back for sequels.
 

WakeUp DP

GT MK OshTekk.
oh look

thread number 3 about the horribly designed, uplayable netcode.

hopefully this will perpetuate ANOTHER massive money toss at some tournament!!!

I approve of this tactic and am surprised the offline guys aren't on here doing MORE bitching to raise the pots!!!
lol you're crazy. People don't usually shit where they eat.
 

MadeOfMetal

Kenshi Srubtastic,Cyrax, Special Forces Mains
-Disconnect ethernet cord
-Put router in microwave
-Connect to Wi-Fi
-Play a random ranked match of Skull Girls
-See how much better a good game runs, regardless of variable issues
-Tell me with a straight face that MKX's online play is "pretty good"
yes Upload/download has nothing to do with it... wired is better, but its not the issue, simply plugging it in will not cure a 300ms ping connection... ping is the answer to our prayers.

is what some of the lucky few need to understand is that they may be close to a good Hop route and thus may have a good connection as a host, or be connecting to a good host because of their location, has nothing to do with their internet connection via Ethernet cat cables... honestly Electro magnetic interference is a poor at best explanation to many people with many internet providers at many locations having the obvious netcode issues!
 

roosTakk

Chode Juggler
People need to understand, this game has 3D hitboxes.

Someone do a mockup JSON doc of the game state of a 2D hitboxes Fighter, then try the same with 3D hitboxes. You are going to easily end up with well over 5 times the size.
Rising thunder uses ggpo and is 2.5 d fighter just like mkx.
 

mercureXI

Punching bag that throws fans !
"how can we help fix it ?"

IS this a FUCKING JOKE ?

WB has more than enough money to solve that crap.

They could have done a beta test before launching that pile of garbage too.

They just rushed the game out (and MEGA OVER GIGA rushed the PC port), so that they could be getting all the money while SFV is still being developped (yeah these guys WILL do a beta test, they seem to care about QUALITY ... shocker !).

We don't need to HELP fix it ...

What we need to do ... is stop buying Tremor shit and NRS products as long as MKX online isn't fixed.

Meaning no Injustice 2, nothing else.

Either they step up and fix a product that we already give them money for, or no need to advertise any more of the same crap : we don't care, we won't pay anymore ... it's been more than 3 games now ... stop the BS guys ! ! ! ! !

THIS
ENDS
HERE
 

MadeOfMetal

Kenshi Srubtastic,Cyrax, Special Forces Mains
Damn I get no love in a netcode post?

Thanks for the info Jagged. I have a couple questions that you or maybe someone else can answer for me.
Aren't most, if not all fighters P2P? Would that mean some of this server - or client-side stuff doesn't pertain to them? I think it was tickrate and a few other things that seem to be if someone is communicating with a neutral server part for connection. But if it's just two "clients" than isn't it a different situation?
Does GGPO and/or other rollback netcodes use extrapolation as the main way of handling connection and inputs?
good question... yes mkx is P2P but the process still involves servers... one thing to note would be the update to refresh the screen with the new data that has already been calculated and flagged. Updates come from the server. even though most of the communication is from player to player we know that the server is used in the process and someone is the host giving the info to the server to make the decision. what comes to mind is KOTH many players in one room. one of them is in contact with the server, if they have loss of packets or a d sync then everyone else will suffer from this.

does that answer your question? or did i do what i always do and not explain it properly?
 

roosTakk

Chode Juggler
Release Cyrax DLC for $10 (must have bomb resets).

Use profit to redesign the netcode

My jizz would blot out the sun


But seriously: I don't have an offline scene so im forced to play online...and it is complete shit. NRS will not fix it, they have thier money already

As a former NRS/MK fan...fuck them. Im going back to CSGO
 

MadeOfMetal

Kenshi Srubtastic,Cyrax, Special Forces Mains
Release Cyrax DLC for $10 (must have bomb resets).

Use profit to redesign the netcode

My jizz would blot out the sun


But seriously: I don't have an offline scene so im forced to play the absolute garbage online...and it is complete shit. NRS will not fix it, they have thier money already

Fuck them..going back to CSGO
lets not jump off a bridge here... id rather be the force that tries to help them then a negative factor explaining why they should't help... no hate ... just stating we can try to help throw somthing there way that might be close to a solution or something that could help us bear it as it is! like Ping indicators aka your opponent has 120ms ping: that would tell you not to play them, and hopefully an in game ping indicator of your connection to each other and connection to NRS servers
 

theotherguy

Kombatant
People need to understand, this game has 3D hitboxes.
Three questions, not sure if you or someone else knows the answers.

1. Why does a 2D based game need 3D hitboxes?
2. Wasn't there a comment made by Boon (or someone else from NRS) saying that they screwed up using 3D hitboxes for MK9, and they should've used 2D and would in future games?
3. Not directly related, but does GGPO support 3D hitboxes?
 

roosTakk

Chode Juggler
lets not jump off a bridge here... id rather be the force that tries to help them then a negative factor explaining why they should't help... no hate ... just stating we can try to help throw somthing there way that might be close to a solution or something that could help us bear it as it is! like Ping indicators aka your opponent has 120ms ping: that would tell you not to play them, and hopefully an in game ping indicator of your connection to each other and connection to NRS servers
Im not jumping off a bridge...Im just not holding my breath that NRS will fix or improve anything. I Also feel like iv been 'had' that their 'improved online' is debatably worse than mk9. Fuck them.

Maybe they will get it right with Injustice 2 (lol)
 

ColdBoreMK23

Noob Saibot
I've come to the realization that it will never get better and I just try to have fun.

Even with 105down and 50 up in lagging whether it is wired or not. It's all the same. This game should run smooth with 10 down/5up. No excuses.

Edit: Also like to add that if BF4 can have 64 man battles with tanks, planes, buildings crashing, and shit blowing up all over the place and the lag isn't this bad, there shouldn't be any excuses.
 

MadeOfMetal

Kenshi Srubtastic,Cyrax, Special Forces Mains
Rising thunder uses ggpo and is 2.5 d fighter just like mkx.
  • Final Fight: Double Impact (2010)
  • Dragon Ball: Zenkai Battle Royale (2011)
  • Street Fighter III: 3rd Strike Online Edition (2011)
  • Skullgirls (2012)
  • Marvel vs. Capcom Origins (2012)
  • Darkstalkers Resurrection (2013)
  • Dungeons & Dragons: Chronicles of Mystara (2013)
  • Divekick (2013)
  • Lethal League (2014)
  • Yatagarasu (Legend of Raven) (TBA)
  • Yatagarasu: Attack on Cataclysm (2015)
  • Rising Thunder (2015)
  • Killer Instinct (2013 video game)
all these use GGPO,




Design
Using a netcode technique called "rollback," GGPO puts lag ahead of a player's move which partially hides latency and creates a lagless illusion. The effects examine which players performed the right actions and correct any possible inaccuracies. The program itself can allow players to adjust latency in case of high ping situations; either creating a possibly jerky yet accurate representation or a smoother game with input delay.

GGPO client
The downloadable GGPO client itself has a matchmaking system for every game provided. Players can request challenges while others are able to spectate and chat. Once a challenge initiates, the match runs a ROM from emulator FinalBurn Alpha.

and i feel this could be the open beta solution what does everyone else think?

this could be similar to BF4's fix or League of Legends PBE

i think this in time could fix before the tournament scene is over... maybe make mkx playable for years, im interested what others think about flipping this to NRS?
 

MadeOfMetal

Kenshi Srubtastic,Cyrax, Special Forces Mains
I've come to the realization that it will never get better and I just try to have fun.

Even with 105down and 50 up in lagging whether it is wired or not. It's all the same. This game should run smooth with 10 down/5up. No excuses.

Edit: Also like to add that if BF4 can have 64 man battles with tanks, planes, buildings crashing, and shit blowing up all over the place and the lag isn't this bad, there shouldn't be any excuses.
this game only requires 3mb down and even less up... ping is the only thing that matters...don't waist your money on 100mb internet it won't fix it
 

MadeOfMetal

Kenshi Srubtastic,Cyrax, Special Forces Mains
Three questions, not sure if you or someone else knows the answers.

1. Why does a 2D based game need 3D hitboxes?
2. Wasn't there a comment made by Boon (or someone else from NRS) saying that they screwed up using 3D hitboxes for MK9, and they should've used 2D and would in future games?
3. Not directly related, but does GGPO support 3D hitboxes?
it can be easily tweaked
 

ColdBoreMK23

Noob Saibot
this game only requires 3mb down and even less up... ping is the only thing that matters...don't waist your money on 100mb internet it won't fix it

Already have it. I need it because sometimes there are multiple devices running in my house downstairs that require Internet and are wireless.

I got an upgrade from my provider for free from bitching about the price so I won't complain.
 

mercureXI

Punching bag that throws fans !
  • Final Fight: Double Impact (2010)
  • Dragon Ball: Zenkai Battle Royale (2011)
  • Street Fighter III: 3rd Strike Online Edition (2011)
  • Skullgirls (2012)
  • Marvel vs. Capcom Origins (2012)
  • Darkstalkers Resurrection (2013)
  • Dungeons & Dragons: Chronicles of Mystara (2013)
  • Divekick (2013)
  • Lethal League (2014)
  • Yatagarasu (Legend of Raven) (TBA)
  • Yatagarasu: Attack on Cataclysm (2015)
  • Rising Thunder (2015)
  • Killer Instinct (2013 video game)
all these use GGPO,




Design
Using a netcode technique called "rollback," GGPO puts lag ahead of a player's move which partially hides latency and creates a lagless illusion. The effects examine which players performed the right actions and correct any possible inaccuracies. The program itself can allow players to adjust latency in case of high ping situations; either creating a possibly jerky yet accurate representation or a smoother game with input delay.

GGPO client
The downloadable GGPO client itself has a matchmaking system for every game provided. Players can request challenges while others are able to spectate and chat. Once a challenge initiates, the match runs a ROM from emulator FinalBurn Alpha.

and i feel this could be the open beta solution what does everyone else think?

this could be similar to BF4's fix or League of Legends PBE

i think this in time could fix before the tournament scene is over... maybe make mkx playable for years, im interested what others think about flipping this to NRS?

You really think NRS doesn't know about GGPO ?

We fucking talk about GGPO ever since MK9 or even before ...

They just use their own crappy netcode, less money spent, and they apply this shit onto every game they launch, swearing "it's awesome".

Don't be fooled : they want money, not quality.

Been there, done that. They evade shit as soon as you say "netcode" ...

It's like someone selling you a broken chair with feet missing, over and over and over and over and over . . .
 
Last edited: