7 ms·
Determinism in League of Legends: Implementation (2017)
- sylware 2y agoI play dota2 because it has a well supported native elf/linux client. And that even if I live in a country where LOL is, by far, more popular.
- Woshiwuja 2y ago[dead]
- ryanmcbride 2y ago[flagged]
- double051 2y agoWhere can we learn more about this? The strike calls for players to boycott the game?
- ryanmcbride 2y agoHere's a few links. I don't believe the union officially calls for players to boycott or anything, just for union members to strike. Either way I haven't played since the strike became official, primarily because I always try to support striking unions when possible, and secondarily because it's pretty easy to just not play a game while they're negotiating. https://apnews.com/article/sagaftra-formosa-interactive-league-of-legends-49c2552fe96afaa04c59ddddcd9703b5 https://apnews.com/article/sagaftra-formosa-interactive-leag... https://en.wikipedia.org/wiki/2024_SAG-AFTRA_video_game_strike https://en.wikipedia.org/wiki/2024_SAG-AFTRA_video_game_stri...
- deleted 2y ago[deleted]
- tourist2d 2y ago> “League of Legends” is caught in the middle of a dispute between Hollywood’s actors union and an audio company that provides voiceover services How is that related to this engineering post? I wish HN took action against people commenting wildy unrelated topics.
- Nullabillity 2y agoHow is it not relevant to a post by Riot/LoL?
- bradley13 2y agoGood info, and fair enough for people to support the strike, if they want to. FWIW, my view is that the use of AI-generated figures, voices etc. in video games is inevitable. As a gamer, I genuinely don't care who is behind a particular voice. I cannot imagine that many gamers do. All the strike is going to do, is hasten the shift to AI.
- Nullabillity 2y agoThis kind of defeatism is the only thing that could make it "inevitable" in the first place.
- whatshisface 2y agoUnless you're excited to live in a world where creative personality and art history has been replaced by public or private utilities, the (maybe not) inevitable deserves at least a little resistance.
- phito 2y agoA lot of the mainstream "creative" media has been just that for a while now. It did not need AI to lose its soul.
- whatshisface 2y agoThe cost of acting as a percentage of budget or revenue is highest for indie studios because it's done at fixed union rates without the variability in the number of hours that can be spent on it you get for art and polish coding. It is likely to take over the stuff we actually like first, because, among other things, small studios are more willing to take risks and accept quality compromises in new technology acquisition.
- delusional 2y agoA lot of the non-mainstream stuff only exists because the creatives in the mainstream take the capital they earn there and shovel it into niche stuff. Excluding artists from the mainstream wont just hurt the mainstream. It will starve the niche too.
- repeekad 2y agoThey want to ban generative AI in video games? Why would a company ever agree to that? The writers strike eventually resolved, but with big layoffs and wiped $2B from the LA economy
- jayd16 2y agoThe fully organic push might just be a bargaining tactic. There's other big wins like ensuring your likeness won't be replicated, your work used to train AI without compensation, or your work replaced with an AI sound-alike when it's cheaper.
- cevn 2y agoI guess I'm unintentionally supporting them, because Riot removed Arena last week. That was the only game type I had the stomach to play, I'm tired of whacking minions.
- stonethrowaway 2y ago“Digital picket line”? Over “AI”? For heavens sake, grow up. What are you protesting, the use of technology and mankind’s advancement?
- delusional 2y agoTowards what? artist-less art? Higher returns?
- gcau 2y agoWhy do you think artist-less art is a bad thing? Do you think code written by A.I is bad too?
- Iridescent_ 2y agoExcept the strike is not really against LoL as a game, but as one of the largest clients of the actually targeted company. The strike is purely an industry strike and does not have much to do with players, as it originates in the VA company trying to pull a scummy move to bypass an union. The strike's goal was to force Riot to take position and disavow the company, which has been successful.
- SeanAnderson 2y ago"After consulting with several other Rioters, our team settled on developing a new PRNG implementation based on XOR-SHIFT." I wonder why?
- bob1029 2y agoLikely performance. You can do xor and shift operations essentially for free on a modern pipelined CPU. Other techniques, such as linear congruential generators, require multiplication and division.
- Joker_vD 2y ago"It’s simple, fast, and has a great distribution, which means it’s more than good enough for gameplay." Its distribution is not flawless, but I would agree that it's good enough for gameplay.
- DarthBatman 2y agoThis! We don't use it for mission-critical crypto or the like. It's there to figure out whether a bot goes left or right. Given the enormous complexity of the League game state and input surface area, it likely won't be a concern unless someone devises a way to exploit it for RNG manipulation (this seems unlikely.) The reason we didn't use crand was just code ergonomics. C-style rand has global state (by default) and we wanted our own interface to be explicit in the code so you knew when you were using a gameplay-impacting random number.
- underscoresunde 2y agounderscores
- o11c 2y agoThe xorshift family is one of the top two RNGs in the modern day (the other being PCG). Unfortunately, "choosing the ideal member of the family" is nontrivial if you're trying to eke out every bit of performance. The problem with the xorshift family is that it doesn't implement the nice auto-scaling (and thus auto-testing) that PCG has. Re-parameterizing it means inventing whole new numbers from scratch and hoping you plug them in correctly. Xorshift also has a rare-but-severe "stuck near zero" problem. The problem with the PCG family is that its trusted way of scaling (nobody likes the `_k` variants) relies on 128-bit multiplication (a modern member of the family at least reduces that to a mixed 128x64 multiply), which remains notably slow, unlike xorshift which only uses small integers. (But I must emphasize: all RNGs from other families either have worse variants of these problems, or give up on performance entirely. These concerns should be used only to select your preferred tradeoff between the two, there is no excuse for ever using any other RNG family unless you need cryptographic security)
- nightowl_games 2y ago> League of Legends does not use a fixed-step server clock, but rather a measured frame delta time which we throttle to a target frame rate. This makes the server more resilient to system-wide performance spikes, but this pattern definitely complicated determinism. This could use some elaboration. I don't even know how it's possible to have determinism without a fixed-step. I must misunderstand what this means. Every simulation tick in league of legends has gotta be the same duration, right? ie: 1.0 / 60.0?
- tylerhou 2y agoYou can still achieve determinism by treating the measured delta-time as an input, and resimulating the game with recorded delta-time. This may not be feasible on public servers, but is definitely feasible for professional play where determinism is important to rewind games due to bugs which affect competitive integrity.
- maest 2y agoThey have so many bugs that there's a procedure for rewinding the game during comp plays? Did I misunderstand?
- pohuing 2y agoThis is not unusual. Bugs happen and when there's a lot of money on the line you need a rollback system.
- maest 2y agoInteresting. I don't think I've seen this in any other competitive game, which is why I'm surprised. But maybe I'm just lacking information
- mackman 2y agoI implemented a debug replay system for an American Football game when I worked at Sony. The AI hierarchy and all animation and physics state was recorded and game could be rewound to figure out why an NPC made a poor decision. Only needed to track state for the duration of a single play. This was on PS2 which I think had 32MB of memory but the dev systems had an extra 96MB which we could use for this sort of thing.
- TacticalCoder 2y agoLoL was inspired by DotA (Defense of the Ancient). DotA was a Warcraft III mod. Warcraft III came out in 2002 and was fully deterministic. Save files for entire games with up to 8 players (IIRC?) and huge armies were... Tiny. For they only saved the inputs. It comes at a surprise to me not that LoL eventually became deterministic but that it wasn't in the first place. As a funny sidenote, around 1990 / 1991 I wrote a little 2D game and there was a bug I simply couldn't figure out. It'd happen very very rarely. And I realized, by myself, that if I rewrote the game's little physics engine to be 100% deterministic I could just record the inputs while playing and then replay it, hopefully reproducing the crash. It worked. I eventually ended up recording the bug and, sure enough, upon replaying the game would crash: at that point I knew the bug was a goner. It was a dangling pointer in a rare case where the hero had picked an extra allowing to shot two shots at once on screen instead of one and if the player would then finish the level with the first shot gone out of the screen but the second shot still on screen. I had never heard of anyone using a deterministic engine back in 1990/1991. Fun memories.