So, if you may or may not be aware, this game is 100% deterministic. It operates on input only, so there’s only one way to reconstruct a game using only inputs, that is to make the entire engine deterministic.
This is why you don’t see anything that uses a pseudorandom number generator, like critical hits.
Anyway, I just started thinking, if the game is entirely deterministic, that means the pattern to Rain of Chaos is entirely deterministic, which means if you figure it out, you can actually aim the spell.
So, any ideas on how the pattern is determined? Is it static? Is it algorithmic based on something like a clock? There has to be a method to this madness.
easy way to test, go to try mode and disable cooldowns,
stand by the dummies and selfcast it,
see which dummies get hit in the first few seconds,
repeat several times!
Ever wonder why scrubbing through a replay is so slow? It’s because the game has to be reconstructed from inputs alone.
At no point is the game state ever saved or transmitted, the only state the game knows is the initial state, and inputs. To reconstruct the match, and synchronize all players in the match using only inputs, the engine must be deterministic.
I hadn’t actually thought of that, that’s a good idea.
No, it is NOT random… It CANNOT be random as the engine is deterministic and psuedorandom number generation is NOT deterministic, not unless it uses the same seed every single time.
That doesn’t necessarily follow, the game also records AI controlled heroes which don’t have any inputs from an external source like a player.
Therefore, it’s entirely possible that the game can record code as well, like for example randomly generated outputs and save those outputs for a replay.
Edit: Let’s put it this way, rain of chaos has a few rules; there’s an AoE that it has to stay in and an amount of time it has to cast. So you program it to generate numbers x & y = where a bolt hits and that those randomly determined numbers have be with a certain range like say 1-100 and it will loop for 5 seconds.
So during those 5 seconds it will spit out random numbers x and y and a replay records the randomly generated x and y outputs.
They’re given inputs from an AI script… The bot running on the server observes the state of the game and determines the input that is sent to each client.
Again, no, it doesn’t.
This game uses what is known as deterministic lockstep. During packet transmission, only the input from each player is sent, and input MUST be collected from each player or the client locks until it is. From those inputs, the game deterministically executes the consequences of that input, be it moving your character, your character getting hit with a spell, et cetera.
At no point is random number generation involved, because once it is, there’s no possible way to reconstruct a match using only input.
The game “ticks” every 1/16 of a second to parse input. The input need not come from a player, it can also come from an AI script.
I am aware of that, but there is no real match where a Gul’dan will be basing his RoD cast on the game clock, rather than a bunch of factors which are random, making the seed random, and the pattern random.
Let’s put it this way, rain of chaos has a few rules; there’s an AoE that it has to stay in and an amount of time it has to cast. So you program it to generate numbers x & y = where a bolt hits and that those randomly determined numbers have be with a certain range like say 1-100 and it will loop for 5 seconds.
So during those 5 seconds it will spit out random numbers x and y and a replay records the randomly generated x and y outputs.
I don’t see why you think that the engine isn’t capable of doing that, it is more than feasible that it can and from my own experience in programming, it wouldn’t be very difficult to accomplish.
Even if it’s not based on the clock, and based on circumstances outside of the game’s control such as Gul’dan’s position, level, current health, mana, et cetera, it’s still deterministic.
There’s no such thing as random when it comes to a computer. Either it does, or it doesn’t. All pseudorandom number generation is based on some sort of algorithm, most are based on something such as XOR Shift (Which is the fastest RNG that a computer can handle and it’s operated on bit by bit) and will ALWAYS produce the same output given the same input, or initial seed. When you think of PRNG in a video game, most of the time that is derived either from the system clock, or a server clock (As is the case with Diablo 3). However, HOTS can do neither of these things since it must produce the same locations every time a replay is watched.
There is no possible way that the game is using PRNG, I can guarantee that. It can be algorithmically generated, such as most PRNG is when given the same initial seed, but then it isn’t pseudorandom anymore, it’s deterministic.
Not really. Basic chaos theory suggests that you can have non-random algorithms create random results. Although individual pieces of the program may be deterministic, the output does not need to be. I believe you are overthinking this.
No, it HAS to be or replays wouldn’t work correctly. If this one spell wasn’t deterministic, the game would have to save and transmit state which it does not do.
When equipment fails, yes, it can produce random results, but this is abnormal and will result in program crashes.