amoeba & demo-playing

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

Moderator: Admin

Post Reply
Antonio
Member
Posts: 20
Joined: Fri Aug 06, 2010 2:12 pm

amoeba & demo-playing

Post by Antonio »

I have a question about Amoeba & demo-playing :

I was wondering, since Amoeba grows randomly,
doesn't that often interfere with playing the
[demo]-section of a cave?

After all, there is always a chance that a certain path
will be blocked that was not blocked during the recording
of the demo, right ?
Last edited by Antonio on Thu Aug 26, 2010 8:21 am, edited 1 time in total.
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

This depends in the first place on which platform you are playing.
When I record a video in WinVICE, the settings are stored with the snapshot, so that every time I play the recorded file in WinVICE the amoeba grows in the same way and timing. I guess in GDash such thing is done as well... (?)

Good question is whether these random-generator settings should be available in a bdcff file. This should be done at least if you want the replay always succeeds. (Although I'm not aware what the exact status of the bdcff format is now.)
subotai
Member
Posts: 251
Joined: Sun Jan 25, 2009 4:19 pm

Post by subotai »

Random numbers are pseudorandomly generated! If you take a look at the bdcff files, you will find the random seed that is stored in the "replay" section. When the replay starts, the random generator is set to this seed, and the amoeba growing is always absolutely the same.

As far as I know, it depends on the compiler, how the random generator works. If you use a different random generator, there will occure problems.

It would be interesting to me, if there exists an implementation of a generic random generator for the amoba growing. Or is it the same generator as for the slime permeablility?
Antonio
Member
Posts: 20
Joined: Fri Aug 06, 2010 2:12 pm

Post by Antonio »

If the Amoeba-random-generator would always use the same seed,
then the Amoeba would each time grow 'randomly' the exact same way,
that's correct.

But I don't think that is the case. The BDCFF-file does have a 'RandSeed'-
setting but according to the documentation, it is only used for random
placement of elements ;
RandSeed : Random generator seed values for corresponding pseudo-randomly placed elements.
Further more, it seems to me that GDash also does not use a
fixed seed for Amoeba, because it grows differently every time.

@Arno :
I think that a random-generator-seed setting in the BDCFF for this
type of elements (Amoeba, Slime, etc), would be a good idea.
It would make caves and replays consistent.

@cirix :
When you implemented Amoeba in GDash, have you considered
making it grow 'randomly' in a consistent way, with a hardcoded
seed or something ? I would like to know ; what were your reasons
to do or not do so ?
User avatar
LogicDeLuxe
Member
Posts: 637
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

Actually Slime does use the same random number generator as random placements do. At least when you use SlimePermeabilityC64. The other SlimePermeability has no predictable behavior.

The [demo] section in BDCFF was originally meant just to represent the moves stored in BD1. You can't even reproduce the pattern of pushing boulders with it.
In "The new Dash Dimension" I did the most reliable thing there is: I just recorded the outcome of random decisions. "t" and "f" represent this in current BDCFF.
Using a random seed instead should be considered indeed. This would produce smaller files, which sure is a good thing. On the other hand, any clone using that data would be restricted to use the exact same random number generator to stay compatible.

When I find the time working on it, I will define the 2 random number generators I use in XDC. Those work with little hardware requirements. Then you could define which one to use and a seed for demos.
subotai
Member
Posts: 251
Joined: Sun Jan 25, 2009 4:19 pm

Post by subotai »

Antonio wrote:If the Amoeba-random-generator would always use the same seed,
then the Amoeba would each time grow 'randomly' the exact same way,
that's correct.

But I don't think that is the case
But I think it is exactly as I wrote. Did you check this issue? I don't think so. Speculation is not very precise. :wink:

Forgive me my sarcasm, but I'm tired of people speculating what the answer could be instead of spending just a few minutes to check, what somebody wrote. Same way as in the other thread.

Shame on me if I'm wrong, for the moment I'm very confused :?
Antonio
Member
Posts: 20
Joined: Fri Aug 06, 2010 2:12 pm

Post by Antonio »

But I think it is exactly as I wrote. Did you check this issue? I don't think so. Speculation is not very precise.
Well, as I said in my post, I tried it in GDash. I created a cave
with an Amoeba and it grows differently after each start.
So yes, I did check the issue.
User avatar
LogicDeLuxe
Member
Posts: 637
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

Antonio wrote:I created a cave
with an Amoeba and it grows differently after each start.
That's the point. GDash uses a randomly chosen seed for this, which it records along with the demo, to ensure reproducible playback.
subotai
Member
Posts: 251
Joined: Sun Jan 25, 2009 4:19 pm

Post by subotai »

subotai wrote:you will find the random seed that is stored in the "replay" section. When the replay starts, the random generator is set to this seed, and the amoeba growing is always absolutely the same.
Antonio wrote:If the Amoeba-random-generator would always use the same seed,
then the Amoeba would each time grow 'randomly' the exact same way,
that's correct.
But I don't think that is the case. The BDCFF-file does have a 'RandSeed'-
setting but according to the documentation, it is only used for random
placement of elements ;
Change the following value in the bdcff and you will notice what will happen to the amoeba growing in the replay. Otherwise, it will always be exactly the same.
BDCFF wrote: [replay]
...
RandomSeed=452865194
..
[/replay]
Post Reply