Bad lag is the biggest complaint almost every multiplayer service receive, from powerful public WoW servers down to a private Minecraft server hosting 2 players. I will be concentrating on Minecraft lag, explain what lag is, what causes Minecraft lag and how to reduce lag to an acceptable level.
What is Minecraft Lag?
Lag is a delay between a player performing an action and the action being observed. In Minecraft there are three types of lag:
- Client lag
- Latency
- TPS lag
Client Lag
Many players get easily confused with lag, blaming the servers when it is very likely the culprit is their own PC. Client lag is when your computer is struggling to calculate how to display the virtual world. One cause of client lag is too many entities. Entities (e.g. dropped blocks, animals, mobs, item frames, projectiles) require additional calculations which can add up when your client needs to handle thousands of them. Another cause is lighting. Your client calculates the light value of every exposed surface within the render distance. If a light source is changed new calculations are required. A running redstone clock will cause the surrounding blocks light levels to be recalculated each tick of the clock. If the clock is attached to a large redstone build then each repeater, comparator and redstone torch will cause additional calculations.
Latency
Latency lag is the delay between data being transmitted between client and server over the internet. Most fast action first person shooter multiplayer servers are regionalised, players from Europe play against other Europeans, Americans against Americans and Asians against Asians. This is done to help reduce latency lag. We have all sprayed full clips into an opponent only for them to run by with zero damage. This is because of latency lag. In Minecraft you will notice latency lag in other players when they move erratically. They will suddenly stop then a few seconds later ‘warp’ 20 blocks forward. That players client will not show the sudden jump but appear to be walking along at a constant speed.
TPS Lag
Minecraft performs cycles through it’s calculations several times a second. Each of the cycles is called a tick. Within each tick there is a lot of calculations, from spawning mobs and their movement through to generating new terrain. Ideally these ticks should be completed in under 1/20th of a second allowing Minecraft to run at a consistent 20 ticks per second (TPS). However sometimes there are too many calculations needed to be performed that cause each tick to take longer than 1/20th of a second to complete resulting in less than 20 TPS. Once this gets to about 15 TPS it becomes noticeable as actions take a little longer to occur (e.g. a mined block doesn’t instantly drop). This lag will be the same for everyone on the server. Major causes for this TPS based Minecraft lag is having lots of mobs each needing their movement calculated (e.g. mob grinders that gather mobs while AFK), another is generating new terrain and is particularly noticeable when a world has been reset and players are exploring several new areas at once.
How do I reduce my lag?
Knowing which lag is causing you issue will help in reducing it.
Fixing Latency
Latency is easily fixed just move home closer to the server. If that is not feasible, sadly, there is not much else you can do.
Fixing TPS Minecraft Lag
Fixing TPS lag might appear to be the responsibility of your server admin but as a player you too can help reduce TPS lag. Do you really need 100 sheep of each colour in your farm? Do you need to go AFK for hours at your mob grinder? Supporting your server will also allow them to invest in better hardware. If TPS Minecraft Lag is still an issue your server admin may need to add restrictions to combat the lag. Adding systems to kick AFK players, pre-generating newly reset worlds and adding limits to the number of mobs might be unpopular with some but they are for the good of your whole server community.
Finally fixing client Minecraft Lag.
Getting a better computer is one way to reduce client lag but there is a cheaper solution. Installing OptiFine mod is by far the best way to reduce client lag. It does a better job at rendering the virtual world than the standard Minecraft rendering engine and it adds more control over what to show. To help reduce everyone’s client lag you can adapt your builds. Placing torches next to your redstone circuits provide a constant light level and reduces the need for clients to recalculate light levels each tick.
Leave a Reply