Boulder Dash Forum Forum Index Boulder Dash Forum
The only Boulder Dash discussion board in English language!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Random seeds in classic BD games
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    Boulder Dash Forum Forum Index -> Tools, Fanstuff
View previous topic :: View next topic  
Author Message
Dustin
Member


Joined: 23 Sep 2007
Posts: 553
Location: Erlangen, Germany

PostPosted: Mon Dec 14, 2020 9:50 pm    Post subject: Reply with quote

BD2-E and the RNG

In BD2-E, there's an interesting effect concerning the slime: If Rockford gets crushed in a way that the explosion destroys 3 slimes, then some boulders/diamonds will never fall through the slime afterwards! Most probably everyone failed this way at least one in their BD career, and perhaps you also wondered why this is happening! However, if Rockford gets crushed at the left border, so that only 2 slimes explode, such an effect does not occur. Now, based on Arno's RNG analysis, I think I've found the reason!

Arno, perhaps we can make a puzzle out of it? I'm absolutely sure you'll love the solution, especially if you figure it out for yourself! Just check the map carefully, perhaps counting something is not a bad idea, and then I'm sure you'll be as stunned as I was today! Very Happy
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Dustin
Member


Joined: 23 Sep 2007
Posts: 553
Location: Erlangen, Germany

PostPosted: Fri Dec 18, 2020 10:08 am    Post subject: Reply with quote

At Krissz's site, we've already discussed the solution, so here it is, and it could be an idea for very interesting slime caves as well:

In BD2-E, there are 4*19=76 slimes at the start. If 3 get destroyed, then 73 remain, which exactly matches Arno's 73-cycle of the RNG discussed above! Funny coincidence! Very Happy

Every time the cavescanner scans a piece of slime, it calculates a new random number (more precisely: a set of 2 numbers) to decide whether the slime is active for this frame. This is done even if the slime can't swallow anything currently! This means that with exactly 73 slimes in the cave, each slime always gets the same seed2 value (in the long run). Also the seed1 value (which decides about the slime being active or not) then isn't completely random anymore (as deeply analyzed by Arno above). So each slime only gets a few different ssed1 values, and if none of them make the slime active, then it will never be!

As the exact cycle length of the C64 RNG (for the whole seed1/seed2 pair) is 949=73*13 (source: Nesdori), similar effects should also be possible with exactly 13 slimes in the cave.

Do caves using this effect already exist? I don't remember any, but I also don't know every fangame by far. If someone knows/ has made such a cave, it would be very interesting to see it! Very Happy
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Arno
Site Admin


Joined: 17 Mar 2007
Posts: 2721
Location: netherlands

PostPosted: Fri Dec 18, 2020 8:02 pm    Post subject: Reply with quote

Dustin wrote:
... So each slime only gets a few different ssed1 values, and if none of them make the slime active, then it will never be!

Excellent research again! Very Happy
I remember I have seen such effect before, but not in BD2 cave E, but just when I designed a cave in the CKit that some pieces of slime refused to let a boulder/diamond through, while all other slimes did that very fast.
Very cool that we now know the explanation, and indeed a nice source for new cave ideas! Very Happy
_________________
---- Boulder Dash Fansite ----
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dustin
Member


Joined: 23 Sep 2007
Posts: 553
Location: Erlangen, Germany

PostPosted: Mon Jul 25, 2022 9:07 pm    Post subject: Reply with quote

There's another funny thing which might fit into this topic, namely that 12 is the "low diamond seed" and 14 is the "high diamond seed"!

What I mean by this is that in any BD1/2 caves where seed 12 is used, there are remarkably few diamonds, and many diamonds with seed 14.

Let's go through all the caves where seeds 12 and/or 14 occur:

Boulder Dash 1, cave A
Random Seeds: 10 11 12 13 14
Diamonds available: 18 20 15 23 26

Boulder Dash 2, cave A
Random Seeds: 11 12 13 14 15
Diamonds available: 6 5 6 12 7

Boulder Dash 2, cave F
Random Seeds: 10 11 12 13 14
Diamonds available: 35 47 39 39 49

Boulder Dash 2, cave G
Random Seeds: 10 11 15 13 14
Diamonds available: 12 18 15 18 19

Boulder Dash 2, cave K
Random Seeds: 10 11 12 13 15
Diamonds available: 26 28 22 25 28

Boulder Dash 2, cave L
Random Seeds: 12 8 7 9 11
Diamonds available: 35 36 33 37 34

Boulder Dash 2, cave P
Random Seeds: 10 11 12 13 14
Diamonds available: 41 45 38 34 42

We can see that in the caves with low diamond densities (<30 diamonds), the orange values are always smallest and the green values biggest!

Of course, a BD scientist also has to consider the counter-examples, and in the caves with high diamond density (>30 diamonds), both seeds, 12 and 14, can lose their top/flop positions! Very Happy

Also when I create 5-level caves for the Dustin's BD series, I sometimes get confronted with that phanomen. If I intend to use seed 12 with a low diamond density, I automatically have in my head that there're not a lot of diamonds to await! Very Happy

One more interesting note: In BD2-G, we clearly see that seed 12, which "belonged" into level 3, was replaced by 15. I'm pretty sure the reason is this very topic! If you change the seed of this cave to 12, there're only 6(!) diamonds available, which is only half the amount of level 1, which has the least diamonds of all levels! I guess the creators didn't like the cave with so few diamonds so they just skipped the seed! Very Happy
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Arno
Site Admin


Joined: 17 Mar 2007
Posts: 2721
Location: netherlands

PostPosted: Tue Jul 26, 2022 10:17 pm    Post subject: Reply with quote

Dustin wrote:
There's another funny thing which might fit into this topic, namely that 12 is the "low diamond seed" and 14 is the "high diamond seed"!

Very well spotted! Very Happy
Probably related to that within the Fill schema, diamonds are usually placed for the lower random numbers. Apparently, for seed 12, low numbers occur less frequently than high numbers...
_________________
---- Boulder Dash Fansite ----
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dustin
Member


Joined: 23 Sep 2007
Posts: 553
Location: Erlangen, Germany

PostPosted: Sun Jul 31, 2022 6:58 pm    Post subject: Reply with quote

Thx Arno! It kept striking me during 20 episodes of Dustin's BD 5-level cave designing! Very Happy

Yes indeed, random diamonds in BD1/2 are always related to low random numbers. The densities used for the caves mentioned above are:

BD1-A: SPACE 60 BOULDER 50 DIAMOND 9
BD2-A: BOULDER 50 DIAMOND 5
BD2-F: BOULDER 220 DIAMOND 80
BD2-G: SPACE 120 BOULDER 50 FIREFLY 15 DIAMOND 9
BD2-K: DIAMOND 15
BD2-L: BOULDER 90 DIAMOND 20
BD2-P: SPACE 189 BOULDER 179 DIAMOND 19

We see that diamonds are always placed at the lowest random values. This means that, as you said already, with seed 12 the RNG produces few low random numbers, and with seed 14 many of them!
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Boulder Dash Forum Forum Index -> Tools, Fanstuff All times are GMT + 1 Hour
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group