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 

Pushing rocks

 
Post new topic   Reply to topic    Boulder Dash Forum Forum Index -> Tools, Fanstuff
View previous topic :: View next topic  
Author Message
Tom
Member


Joined: 06 Dec 2012
Posts: 2

PostPosted: Thu Dec 06, 2012 4:18 pm    Post subject: Pushing rocks Reply with quote

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.
Back to top
View user's profile Send private message
subotai
Member


Joined: 25 Jan 2009
Posts: 251

PostPosted: Thu Dec 06, 2012 6:52 pm    Post subject: Reply with quote

    - 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:
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.
Back to top
View user's profile Send private message
Tom
Member


Joined: 06 Dec 2012
Posts: 2

PostPosted: Thu Dec 06, 2012 7:07 pm    Post subject: Reply with quote

Excellent - thank you very much Exclamation

Tom
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
Page 1 of 1

 
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