Pushing rocks

Everything about the various Boulder Dash tools, and other stuff created by the fans.

Moderator: Admin

Post Reply
Tom
Member
Posts: 2
Joined: Thu Dec 06, 2012 4:11 pm

Pushing rocks

Post by Tom »

I have searched both this forum and sifted through all the nice information available, but haven't been able to find an answer to this:

What exactly is the algorithm used when Rockford pushes a Boulder (in the C64 version I of BoulderDash)?
I suspect it has something to do with the random routine used to grow amoeba, but can't seem to get satisfactory results.
subotai
Member
Posts: 251
Joined: Sun Jan 25, 2009 4:19 pm

Post by subotai »

  • - check if the boulder is in falling state (falling boulders can't be pushed)
    - check if there is empty space to push the boulder
    - a random number determines if the boulder is pushed or not
I'm not 100% sure, but I think that the probability for pushing boulders is 1/8. Finally it doesn't really matter which random generator you are using, because the random numbers are not predictable for pushing boulders.

Code: Select all

r:=random(8); //random number in range 0..7
if r=0 then pushboulder;
For the slime permeability, predictable random numbers are used. There's a thread about this in the forum.
Tom
Member
Posts: 2
Joined: Thu Dec 06, 2012 4:11 pm

Post by Tom »

Excellent - thank you very much :!:

Tom
Post Reply