Determinism in League of Legends: Unified Clock
engineering.riotgames.com
engineering.riotgames.com
There is a test page up for it, so you can test it out in practice across multiple devices to see how precise (not accurate) it is: https://gunjs.herokuapp.com/game/nts.html
Turns out the math/algorithm isn't too hard! Less than 50LOC for full implementation: https://github.com/amark/gun/blob/master/nts.js
I recommend you have fun and challenge yourself to solve it first before looking at the code! It made me really understand General Relativity spacetime so much more, it clicked.
I find it believable but sad that there were apparently eight different implementations of this idea across the codebase. I am not surprised that the developer had to add an ascii skull and crossbones to his code to encourage others not to change it.
I further think that Riot often doesn't get credit for the things they do right. I remember back in the day they were rolling out patches weekly, with a 12 hour maintenance window a la WoW on Tuesdays. That fell to half that time, then a third, and has at this point been gone for years. Cheating is a major problem in any current multiplayer game (PUBG has been getting hit hard recently I hear), but it's never been big enough in League that I felt the effects.
Riot has managed to build the biggest gaming phenomena outside of Minecraft in the last decade, and I'd expect corners to be cut in doing that. Clean code doesn't win a startup race, and games are a cut-throat business (see: Epic's Fortnite rolling out a battle Royale mode in a span of months following the success of PUBG). It's a good thing, imo, that Riot can afford the time and energy to start cleaning their code, and are willing to share some parts of that process with the wider world.
Hm... Have you ever played in ARAM? ARAM is mode where you have only one line with 5vs5 players on it. Often it's much shorter than regular Dota, LOL matches but give same "experience points" to buy/open some in game items.
You can encounter farming bots there, they just do one thing : go to enemy and die. It isn't fun to play with them. Once there were 3 bots in one match. Servers were infested with them for weeks it was impossible to play ARAM back then.
Riot is infamous for this even among players. A lot of their dev decisions in the past were blatantly "fastest possible answer", including things like building solid terrain out of immortal, un-targetable units to save time.
That said, the criticism feels sort of dated, like they got a bad reputation and it stuck after they caught up to the normal amount of badness for a video game. There are kludges, but they don't show the way they used to.
lolwut? Back when I used to play LoL, there was almost -zero- bugs in the actual game.
Are you sure you're not confusing this with their shitty Adobe Air client (which does not run the actual game, which is a separate process).
I will append a disclaimer: Have not played LoL in years. So if it has changed, feel free to tell me so.
Mordekaiser at one point in history had over 50 known bugs. (apparently over 200 according to another commenter)
Some champs could walk through Jarvan's ultimate.
There were others but those are the cases that stand out in my memory. I know you'll probably say something like "three bugs? that's nothing!" but I played the game off and on for 6 years from 2009-2015 and there were plenty of examples of stuff like that.
The first was a reliance on kludges in new code (like that Lux ult) - it was the distinctive look of a team trying to put out new features faster than their dev time permitted.
The second was an inability to rely on invariants. Most games can say "X is always true, Y is always true except in case Z" and maintain that even across many and expansions. League (and other MOBAs) relied on putting out new characters with novel, interesting abilities. But that leaves game design and software design in conflict; a major source of novelty is breaking rules other characters share. And so everyone has some silly special case that makes all other development harder, and also reveals the kludges in problem one.
Mordekaiser can copy dead units, so every single unit has to be checked to not break when he does that. Lux ults are made of minions, so every character with a "dash to minion" ability has to be safeguarded against dashing to the ult. And so on, for characters^2 interactions.
Things are vastly better than they used to be, but it's not a surprise the thing got a reputation for bugginess.
My personal favorites are when that update to Skarner broke Lux's ult (how are those related at all?) and when they first added the smite damage to the HUD which broke flash because the UI wasn't designed to display that data (flash's cooldown would get set to smite's damage as it's cooldown, or about 500 seconds early game).
https://www.youtube.com/watch?v=xeFJvdSnB9o
One of their lead champion designers has even come out and said something along the lines that many champion's dashes are coded separately, even though a dash would be something pretty easy to reuse. I'm pretty sure the champion ability scripts are written by the champion designers and not formal engineers/programmer base on comments like this one and others I've seen on reddit from Riot's champion designers.
See [0] for the best example, but while now that those are documented it's clear that that's the worst case, a good number of champions contented for the Most Bugged crown over the years, even months after being released or still unfixed to date.
Other than that the new CEF client is still more buggy and unstable than the old one (same guy who made the above list also had one for the client although that hasn't been updated in months AFAIK) and at any time there has always been some sort of bug related to pathing, vision, or targeting.
Also I'm not 100% sure about the last year, but I think there as never been one since at least when I started playing in 2013 when some near-gamebreaking champion bug didn't make it to the "LTS" patch fixed for the LCS.
[0] https://boards.euw.leagueoflegends.com/en/c/bug-reports-eu/a...
1. The concept they're claiming to have spent so much time to arrive at here -- a unified game time clock -- is something that most game engines have always had. This shouldn't be a new concept.
2. Even after they identified that the use of floating-point types for time calculations could cause errors, what does their new API design use as its return types? Float and double. It's almost as though they forgot what the problem was.
Just look at how long it took them to implement replay and a sandbox mode. I'm not sure how much of that was design decisions or was simply because of all the old crap they had to get rid of.
They were pretty open about this being the issue with sandbox mode. Ostensibly-simple stuff like "set champion level to 7" was a nightmare because the game lacked any easy way to break invariants like "levels increase one at a time based on XP gain obtained in-world".