Has anyone figured out the pattern to Rain of Destruction?

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.

9 Likes

As far as I can tell, it is just randomly generated within an AoE, so I don’t think that there is a pattern…

3 Likes

It’s not, I can guarantee that.

This game’s engine is 100% deterministic. It cannot and does not use pseudorandom number generators for any spells.

1 Like

How can you guarantee that? It does not seem difficult to program to me and I don’t see why this engine wouldn’t be capable of doing it.

Edit: actually, I think that it would be a lot easier to program it to be random than to use any kind of set pattern.

15 Likes

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!

brb gonna do it.
its random. :wink:

21 Likes

I can guarantee it, the engine is deterministic.

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.

1 Like

It’s not random, I guarantee it’s not random. It has to be based on a seed from the match clock or something.

1 Like

unless a dev comes in here and says it not random. or u can proves with a really dam good vid evidence. it will still be rain of rng

14 Likes

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.

3 Likes

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.

3 Likes

That would make it random, as there is no way of controlling the seed.

11 Likes

The match clock is constant for every player in the match, allowing a seed to actually be deterministic.

Match clock you can control, system clock you cannot.

2 Likes

Not really, as you cannot control when you will hit level 10.

I’m talking about time, not XP.

The match clock in the top center is exactly the same for every player in the match.

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.

3 Likes

Well you responded already, so I’ll repost here;

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.

2 Likes

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.

7 Likes

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.

1 Like