Darwinbots Forum

Code center => Bugs and fixes => Topic started by: k0zm0 on January 31, 2008, 07:01:32 AM

Title: does .setboy work? OPEN
Post by: k0zm0 on January 31, 2008, 07:01:32 AM
Does .setboy work in the new versions?
I don't know...
Or I'm doing something wrong...

cond
*.robage 0 =
start
200 .setboy store
stop
Title: does .setboy work? OPEN
Post by: EricL on January 31, 2008, 10:27:09 AM
Don't know, but I'll take a look.  Your using pond mode, right?
Title: does .setboy work? OPEN
Post by: k0zm0 on February 04, 2008, 07:09:32 AM
Quote from: EricL
Don't know, but I'll take a look.  Your using pond mode, right?
Yes. I also changed the sun values...
Title: does .setboy work? OPEN
Post by: rsucoop on February 04, 2008, 07:45:07 AM
when you go to debug it, and open the consule and type ? .setbody does it display a number with > = to something? That would tell if you if it is working or not.
Title: does .setboy work? OPEN
Post by: k0zm0 on February 04, 2008, 10:44:22 AM
Quote from: rsucoop
when you go to debug it, and open the consule and type ? .setbody does it display a number with > = to something? That would tell if you if it is working or not.

I have earth gravity turend on. I'll attach the sim for you...

result of debug:

? .setboy
 314-> 2000

? .rdboy
 315-> 0

Isn't that strange?
Title: does .setboy work? OPEN
Post by: EricL on February 05, 2008, 12:23:52 PM
Okay, I've looked into this.   Bouyancy is broken in such a way that it leads me to beleive this has never worked in the 2.4 code fork.  The bouyancy code is effectivly disabled, being conditioned on a sim global boolean which no code sets.  The way things sit currently, .rdboy gets set to 0 every cycle. and .setboy effectivly does nothing.  I suspect this is one of those cases where the new physics in 2.4 allowed for the potential of obsoleting this older pre 2.4 concept, but the concept of bot density was never completed and the loose ends were never cleaned up.

Fixing this is beyond the scope of 2.43.1.  I would like to hear some discussion as to whether we maintain how the .setboy / .rdboy sysvars were intended to work or rather make bouyancy an implicit function of bot density which in turn would be an implicit function of mass and size which would require we give bots a way to specify their own density.  I prefer the latter and have a pretty good idea about how to make this work, but 2.43.1 is imminient, so it will be a post 2.43.1 work item.

I will leave this bug open for further disscussion.
Title: does .setboy work? OPEN
Post by: k0zm0 on February 05, 2008, 05:04:16 PM
Quote from: EricL
I will leave this bug open for further disscussion.

Thanx... I'll just make some vegs move to the top for the time being...