[Solved]1.9.7 airFrictionMult Bug

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

[Solved]1.9.7 airFrictionMult Bug

Postby Someone Else » Fri Jul 08, 2011 12:43 am

Edit: (by tatt61880 on 2011.07.09 21:34)
I think this is not a bug, cause of your issue seems to be just a lack of semi-colon (i.e. ";" ) after "airFrictionMult := 1.0000000000000000".
(You'll see error message about it, in console.)

Please PM me if you still consider this is a bug. ;)
Regards,
-Tatt
----


So I was trying to make a realistic-looking smoke spawner.

All well and good until I tried to spawn the circles with low airFrictionMult, so they would move some direction other than up. They float, and a laser decreases density over time.

As soon as I put in the airFrictionMult code, it was as if it was -inf and the circled failed to exist as soon as they began to exist.

Code: Select all
    scene.addCircle({
        color := [0, 0, 0, 0.30000000000000004];
        texture := "radial-white-transp.png";
        drawBorder := false;
        drawCake := false;
        density := 0.00010000000000000000;
        onHitByLaser := (e)=>{e.geom.density = e.geom.density + 0.00010000000000000000};
        textureMatrix := [0.50000000000000000, 0.00000000000000000, 0.50000000000000000, 0.00000000000000000, 0.50000000000000000, 0.50000000000000000, 0.00000000000000000, 0.00000000000000000, 1.0000000000000000];
        collideSet := 32;
        heteroCollide := true;
        geomID := 1;
        pos := [0, 5];
        vel := [(((scene.addCircle({
            collideSet := 0;
            airFrictionMult = -inf;
            pos := [+inf, +inf]
        })).color(0)) - 0.50000000000000000) * 20, (((scene.addCircle({
            collideSet := 0;
            airFrictionMult = -inf;
            pos := [+inf, +inf]
        })).color(0)) - 0.50000000000000000) * 20]
    });
    scene.addLaserPen({
        color := [1, 1, 1, 0.010000000000000000];
        geom := 1;
        relPoint := [0, 0];
        maxRays := 1
    })
Works.

Code: Select all
    scene.addCircle({
        airFrictionMult := 1.0000000000000000
        color := [0, 0, 0, 0.30000000000000004];
        texture := "radial-white-transp.png";
        drawBorder := false;
        drawCake := false;
        density := 0.00010000000000000000;
        onHitByLaser := (e)=>{e.geom.density = e.geom.density + 0.00010000000000000000};
        textureMatrix := [0.50000000000000000, 0.00000000000000000, 0.50000000000000000, 0.00000000000000000, 0.50000000000000000, 0.50000000000000000, 0.00000000000000000, 0.00000000000000000, 1.0000000000000000];
        collideSet := 32;
        heteroCollide := true;
        geomID := 1;
        pos := [0, 5];
        vel := [(((scene.addCircle({
            collideSet := 0;
            airFrictionMult = -inf;
            pos := [+inf, +inf]
        })).color(0)) - 0.50000000000000000) * 20, (((scene.addCircle({
            collideSet := 0;
            airFrictionMult = -inf;
            pos := [+inf, +inf]
        })).color(0)) - 0.50000000000000000) * 20]
    });
    scene.addLaserPen({
        color := [1, 1, 1, 0.010000000000000000];
        geom := 1;
        relPoint := [0, 0];
        maxRays := 1
    })
Fails.

The only difference is airFrictionMult.

I then tried spawning a default circle and a slightly modified default circle.

Code: Select all
scene.addCircle({})

scene.addCircle({airFrictionMult := 1.0})

Both work.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: 1.9.7 airFrictionMult Bug

Postby Kilinich » Fri Jul 08, 2011 7:45 am

not bug. negative airFrictionMult cause unrealistic flying, -inf makes circles instantly fly off sim zone.
just use zero airFrictionMult for your case.
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: 1.9.7 airFrictionMult Bug

Postby Someone Else » Sat Jul 09, 2011 5:48 am

No, it is a bug. In the second script, you'll notice this:
airFrictionMult := 1.000000000000
That shouldn't make it behave like it was -inf.

I wanted it to be somewhere between 1 and 0, like 0.0010000000000000000.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: 1.9.7 airFrictionMult Bug

Postby tatt61880 » Sat Jul 09, 2011 8:58 am

Hi.
I think this bug report show complex example (i.e. this example is not simple case).
For example, is next line needed for reproducing this bug?
texture := "radial-white-transp.png";

Edit: (by tatt61880 on 2011.07.09 16:14)
Anyway, I think this is not a bug, just a lack of semi-colon (i.e.
";" ) after 2nd line. ;)
-Tatt
----
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
User avatar
tatt61880
[Most Helpful Person 2010]
 
Posts: 1150
Joined: Mon Aug 31, 2009 5:45 pm
Location: Tokyo, Japan

Re: 1.9.7 airFrictionMult Bug

Postby Kilinich » Sat Jul 09, 2011 9:13 am

in posted code you forget ";" after multiplier string.
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 2 guests