Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: spook1 on Mon 23/02/2004 20:39:44

Title: simulating m movement
Post by: spook1 on Mon 23/02/2004 20:39:44
Since I am still involved in creating a physics learning game, I am looking into scripting simulated movement.
I have some questions before I start experimenting:

1. Does anyone know if there are scripts available of successfully implemented simulations?
2. Any suggestions on how to detect the start of a movement? E.g. a car is pushed, how do I porgram this action?
3. I think the simulation of movement could quite easily be simulated by something like:

while location <500{
timestep = 1;
location = x;
velocity = v;
acceleration = a;

v = v+ a* timestep;
location = x+ v*timestep
timestep ++

moveobject to location}

Am I right or this is a stupid approach?

4. can I use the finite state machine plugin in a really smart way in simulating this kind things?

Thanks in advance for sparring..

martijn
Title: Re:simulating m movement
Post by: Scorpiorus on Wed 25/02/2004 16:12:13
Do you mean making your own MoveCharacter command? Or you mean a physical movement depending on the force or acceleration parameter?

In that case you take the right approach. Also you probably need to tweak integer arithmetics. Or you can go with the float plugin.

~Cheers