random fill elements

Everything about the modern clones and remakes.

Moderator: Admin

Post Reply
Sarr.
Member
Posts: 16
Joined: Tue Oct 27, 2009 10:22 am
Location: The Netherlands
Contact:

random fill elements

Post by Sarr. »

BD random fill elements are specified in a small array size of 4. in bdcff, these are represented for instance like that:
RandomFill=SPACE 60 BOULDER 50 DIAMOND 9
[BD1, Cave A]
in most cases, probabilities are specified from the biggest one to the lowest one. considering algorithm used in gdash, it should be always like that. however, there are some sets, where that isn't so:
RandomFill=DIRT 254 SPACE 64 BOULDER 64 DIAMOND 37
[BD3, Cave A]
in that case, SPACE will never appear, or:
RandomFill=DIRT 16 SPACE 32 BOULDER 32 SPACE 0
[BD3, Cave B]
in that case, SPACE will never appear, but also BOLUDER will always overwrite DIRT.
my questions concerning that would be:
- are these cases plainly bugs in the cave parameters?
- is it safe to assume the random elements need to be in a proper [descending] order probability-wise? [so always sort them, just in case]

cheers,
Sarr.
User avatar
cirix
Member
Posts: 284
Joined: Fri Feb 01, 2008 11:00 pm
Contact:

Post by cirix »

I think these are simply bugs. If there is a lower number in the front, it is overwritten. The original engine needed that the numbers were in descending order; GDash also needs it, as the original C64 code is line-by-line replicated in C.
cirix
Post Reply