Page 1 of 1
BDCFF - RandSeed and RandomFill
Posted: Sun Jan 25, 2009 5:34 pm
by subotai
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
Posted: Sun Jan 25, 2009 6:41 pm
by LogicDeLuxe
A C implementation (commented with the original assembler code) can be found in Peter Broadribb's document:
http://www.elmerproductions.com/sp/pete ... %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.
Posted: Sun Jan 25, 2009 7:48 pm
by subotai
Thanks for your reply LogicDeLuxe
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.
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.
Posted: Thu Feb 05, 2009 5:16 pm
by subotai
I got it
Your pascal implementation works perfect. Finally I understood how to use it. I'm sure that I gave up without your help.
Thanks again!