[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
Chipmunk Physics • View topic - Some General Pointers needed

Some General Pointers needed

Official forum for the .

Some General Pointers needed

Postby instinct-vfx » Tue May 06, 2008 3:03 am

Hi everyone,

i just started playing with chipmunk and must say that so far i like what i see. I am rather new to
physics implementation (tho i got a not too bad background) and hence i got some general questions
as well as some rather specific questions when comparing chipmunk to other engines.

As a bit of info i am an absolute Ski Stunt Simulator lover and that is the main "Force" driving me :P
I got a bunch of conceptual ideas that will follow a similar path. So basically i am looking to implement
a control scheme similar to Ski Stunt Sim or Diver. This involves a very basic Ragdoll that is controlled
by the user's mouse (up/down = stand/crouch and left/right = lean).

I have taken a look at the Farseer Engine (wich was used by its creator to implement Diver) and it seemed
pretty straight forward for what i plan, but i dont really want to use XNA or Silverlight so i started looking
at other engines.

First of all regarding the general Joint Setup. If i am to create a Ragdoll to be controlled by the mouse, how
would i best create it ? Farseer has a rotational Spring together with a revolute joint that has limits. The
rotational Spring also has a dynamic targetangle. That seems pretty straight forward to me, but how would
i create a similar setup in Chipmunk?

Also if i was to create a bike game for example how can i apply torque ? I only found linear force in the Docs.
And was looking for something like a "motor" force.

And generally how would the Graphics and the Physics Stepping best be synced ? If i go the recommended route
of a fixed time step what is a good way to sync it with the GFX ? I assume best would be having a Physics Loop
that also has the drawing code after updating ?

Thanks a lot in advance and sorry if i missed something obvious in the docs,
Thorsten
Thorsten
instinct-vfx
 
Posts: 1
Joined: Tue May 06, 2008 2:48 am

Re: Some General Pointers needed

Postby maximile » Thu May 08, 2008 3:26 pm

Hey,

I can't help much but until someone else replies:

For a well-documented example of applying torque, have a look at the Moon Buggy tutorial: http://files.slembcke.net/chipmunk/tuto ... ial.tar.gz
That also shows how to create a motor with a maximum speed.

For time timestep issue, updating the graphics once after every physics step is often perfectly good, but you might want to go with something a bit better to make it run more smoothly on all computers. I'd usually recommend looking here: http://www.gaffer.org/game-physics/fix-your-timestep
But it's currently not available, so here's Google's ugly cache: http://66.102.9.104/search?q=cache:bK3o ... =clnk&cd=1

Rotational springs aren't implemented in Chipmunk, but I imagine you could achieve the same effect either by applying torque each step or by using the damped spring functions. The moon buggy tutorial has an example of that too.

Hope that helps a bit.
maximile
 
Posts: 157
Joined: Mon Aug 20, 2007 12:53 pm
Location: London, UK

Re: Some General Pointers needed

Postby slembcke » Mon May 12, 2008 1:28 am

Somebody asked a similar question about the rotational spring recently.

viewtopic.php?f=1&t=120&p=575&hilit=#p575

That should probably help.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm


Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 3 guests