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 

BDCFF - RandSeed and RandomFill

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


Joined: 25 Jan 2009
Posts: 251

PostPosted: Sun Jan 25, 2009 5:34 pm    Post subject: BDCFF - RandSeed and RandomFill Reply with quote

Hi,

I have got a question about the bdcff file format. I don't understand how to use RandSeed and RandomFill. It would be nice if anybody could give me an example. I use Delphi but an example in C would help me too.

Thanks
subotai
Back to top
View user's profile Send private message
LogicDeLuxe
Member


Joined: 15 Jul 2007
Posts: 598

PostPosted: Sun Jan 25, 2009 6:41 pm    Post subject: Reply with quote

A C implementation (commented with the original assembler code) can be found in Peter Broadribb's document: http://www.elmerproductions.com/sp/peterb/insideBoulderdash.html#Random%20numbers (It's only the number generator, though, not the actual placement)
I also put a link to this on my site: http://www.gratissaugen.de/erbsen/bdcff.html

A Pascal (which is the language Delphi uses) version can be found in my old text version of my Dash-FAQ: http://www.gratissaugen.de/erbsen/BDFAQ.ZIP

The algorithm predates BDCFF of course, and therefore those are simply reimplementation of the old Atari/C64 code. If you want code which actually reads a BDCFF file and places all the random objects in the cave, your best bet would be the GDash source code, I think.
Back to top
View user's profile Send private message Visit poster's website
subotai
Member


Joined: 25 Jan 2009
Posts: 251

PostPosted: Sun Jan 25, 2009 7:48 pm    Post subject: Reply with quote

Thanks for your reply LogicDeLuxe Very Happy

I'm writing my own bd clone in delphi and maybe (if not too complicated and too much work) I'd like to support the bdcff. Finally I only have to read the bdcff files and convert them to my own levelmap format.

Quote:

The algorithm predates BDCFF of course, and therefore those are simply reimplementation of the old Atari/C64 code. If you want code which actually reads a BDCFF file and places all the random objects in the cave, your best bet would be the GDash source code, I think.

I think this could help me.
Back to top
View user's profile Send private message
subotai
Member


Joined: 25 Jan 2009
Posts: 251

PostPosted: Thu Feb 05, 2009 5:16 pm    Post subject: Reply with quote

I got it Very Happy

Your pascal implementation works perfect. Finally I understood how to use it. I'm sure that I gave up without your help.

Thanks again!
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