sim.frequency = XXXXX

About advanced scenes, and the Thyme scripting language used in Algodoo.

sim.frequency = XXXXX

Postby Roast Beef » Fri Mar 12, 2010 10:25 pm

What is the phun edition equivalent to this
i need to know to make some of my scenes usable by people with the phun version
Last edited by Roast Beef on Sat Mar 13, 2010 4:39 am, edited 1 time in total.
Roast Beef
 
Posts: 28
Joined: Tue Sep 08, 2009 11:18 pm

Re: set.simspeed = XXXXX

Postby Mr_Stabby » Fri Mar 12, 2010 11:06 pm

cant help you with that one but i think you should add a warning or something if your gonna alter simspeed with a scene because algodoo keeps it until it either gets changed again or its setting get reset which means many people will have no clue why their simulations start stuttering at normal speeds all by the sudden
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am

Re: set.simspeed = XXXXX

Postby gradyfitz » Sat Mar 13, 2010 1:14 am

Roast Beef wrote:What is the phun edition equivalent to this
i need to know to make some of my scenes usable by people with the phun version

In Algodoo, Sim.frequency governs the simulation step (I assume you mean step, if not Sim.timeFactor is what you are looking for). In Phun, Sim.timeDelta governs the simulation step, the difference between Phun and Algodoo is that in Phun, it's a time step, the time from one physics step to the next, whereas in Algodoo, it's the time steps per second, so, SIm.timeDelta = (1.0/Sim.frequency); and Sim.frequency = (1.0/Sim.timeDelta);.

If this didn't answer your question, please refine it :).
Mechanisms: 18 Mechanisms.
Thyme: Tutorial - Variables/Commands List.
Thymechanic
gradyfitz
 
Posts: 174
Joined: Tue Sep 01, 2009 8:33 am
Location: Victoria, Australia

Re: set.simspeed = XXXXX

Postby Roast Beef » Sat Mar 13, 2010 4:45 am

gradyfitz wrote:
Roast Beef wrote:What is the phun edition equivalent to this
i need to know to make some of my scenes usable by people with the phun version

In Algodoo, Sim.frequency governs the simulation step (I assume you mean step, if not Sim.timeFactor is what you are looking for). In Phun, Sim.timeDelta governs the simulation step, the difference between Phun and Algodoo is that in Phun, it's a time step, the time from one physics step to the next, whereas in Algodoo, it's the time steps per second, so, SIm.timeDelta = (1.0/Sim.frequency); and Sim.frequency = (1.0/Sim.timeDelta);.

If this didn't answer your question, please refine it :).

Basically i need to know exactly what to type into a box that will make it set the sim speed to 1000 hertz on collision with another object
thanks in advance for the help
Attachments
phun.png
phun.png (24.31 KiB) Viewed 1445 times
Roast Beef
 
Posts: 28
Joined: Tue Sep 08, 2009 11:18 pm

Re: sim.frequency = XXXXX

Postby RA2lover » Sun Mar 14, 2010 12:18 am

in that case simtimedelta = 0.001. still due to phun's rounding errors it will not display/perform correctly, but close enough.
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil

Re: set.simspeed = XXXXX

Postby gradyfitz » Sun Mar 14, 2010 12:37 am

Roast Beef wrote:
gradyfitz wrote:
Roast Beef wrote:What is the phun edition equivalent to this
i need to know to make some of my scenes usable by people with the phun version

In Algodoo, Sim.frequency governs the simulation step (I assume you mean step, if not Sim.timeFactor is what you are looking for). In Phun, Sim.timeDelta governs the simulation step, the difference between Phun and Algodoo is that in Phun, it's a time step, the time from one physics step to the next, whereas in Algodoo, it's the time steps per second, so, SIm.timeDelta = (1.0/Sim.frequency); and Sim.frequency = (1.0/Sim.timeDelta);.

If this didn't answer your question, please refine it :).

Basically i need to know exactly what to type into a box that will make it set the sim speed to 1000 hertz on collision with another object
thanks in advance for the help

For Phun, Sim.timeDelta = (1.0/Sim.frequency),
For Algodoo, Sim.frequency = (1.0/Sim.timeDelta),
So, the codes you want are:

Phun
Code: Select all
Sim.timeDelta = 0.001


Algodoo
Code: Select all
Sim.frequency = 1000


You can substitute any values to get the frequency or timeDelta, for example, to get 653 Hz, you substitute 653 into the Sim.frequency equation, (Sim.frequency = 653) then you can just put the code into timeDelta and it will work it out, or you can work it out manually, (Sim.timeDelta = (1.0/Sim.frequency) or Sim.timeDelta = 0.00153139).

Good Luck, if you are going to upload this to algobox, make sure that you let people know that it does it and how to fix it (Sim.frequency = 100 for Algodoo and Sim.timeDelta = 0.01 for Phun).
Hopefully this helped :D .
Mechanisms: 18 Mechanisms.
Thyme: Tutorial - Variables/Commands List.
Thymechanic
gradyfitz
 
Posts: 174
Joined: Tue Sep 01, 2009 8:33 am
Location: Victoria, Australia

Re: sim.frequency = XXXXX

Postby Roast Beef » Sun Mar 14, 2010 11:59 pm

well it answered my question exactly so thank you for that
but it did not help
i guess the scene just isn't compatible with phun.
too bad
Roast Beef
 
Posts: 28
Joined: Tue Sep 08, 2009 11:18 pm


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 3 guests