SynthMaker

Gravity, intertial movements? possible?

Archive · 2007 11 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

Dj-Grobe ·

Its possible make x-y pad and add intertial movement? Example:

if i drag faster ball on x-y pad, when leave drag the ball, the ball continue moving, and bouncing.....well this its the more complex scenario, due need inertial move + bounce + gravity If drag the ball at normal movemnt, no have inertial movemennt, i mean, only when have faster drags (fatser moevement) the ball continue movement due inertia.

More simple example: Horizontal slider, if i drag fatser to right and leave drag, the sldier continue moving ot the right and reach the maximum valu to right.

Something like add inertial to movements.

: )

Some idea?

micron ·

i have made something of similar with scope sdk. The inertial movement can be done by using envelopes and if we want to apply the inertial behavior just with faster movements, i think it can be done by using some math + logical circuit, for example a math module that calculates the difference value between before and after moving the fader and a logical module that if value > than x will connect the fader to the envelope by using a switch.

Cheers

Micron

angstrom ·

In short the way I would do this, take samples of the mouse x and y during drag - on release compare the current mouse coords with the ones from a moment ago during drag. This will give you some values such as xoffset = -0.234 , yoffset = +0.01.

on a loop apply these to the dragged object, subtracting a percentage of the value each loop.

EG xoffset = currentmouseX-dragmouseX;

loop { xoffset -= xoffset/10; // friction spritex += xoffset; // movement }

that is pseudo code btw, dont try putting it anywhere in SM!

Dj-Grobe ·

f somebody can make some working template, thatt can be very usefull : )

Im not are lazy, lol just broken my head and cant figure how do it.

Dj-Grobe ·

sombody ? cna? i trying lol and never i do work jajaa. Its really cmplex have boucning ball, and make interaction with gravitational + friction + intertial + mouse !! : )

unkargherth ·

Inertia shouldn't be too difficult ( dificult part isn't to calculate it, but to animate it), but bouncing could be very complex. We should take into account, speed, aceleration, edge absortion ( it's the absortion constant or position dependant?) and a big list of other quetions

Anyway way, calculate it it's always simpler than drawing it, provided the variables a clearly (and i mean clearly in mathematical sense) defined

angstrom ·

very, very, simple bounce

http://www.timeshard.com/dev/bounce.osm

no gravity, friction or materials. Just you plain old fashioned 'flash tutorial' bouncing ball.

It just bounces around the parent gui.

Dj-Grobe ·

Yes, thankyou i already make boucne, the troublke its when you want nteraction with mouse, for drag the ball bouncingm, and whens top drag ball continue bouncing, for change speed of bounce, add some like gravity etc etc

: ) make ball bounce its really easy

Anyway thanks for your example, if you figure how can intercact with mouse, tellme please : )

Or more ocmplex, have multiballs bouncing, and boouncing all, with the walls, of the pad, and boucne when touch other balls, etc et 🙂

really cmplex.........i know jajaja

angstrom ·

to interact with the mouse firstly I would do the translation in pixels rather than grid squares.

secondly from the mouse action take the drag(x,y) points and store them, now you drag and release, take those release points (x,y) subtract them from the previous dragged (x,y) like this:

x=20 (release point) - x=10 (previous point) = 10

thats a shift of 10 'x' pixels. That is the number that you want your X counter to be counting. Thats how you get your 'xspeed' variable.

after release start the counter incrementing in chunks of 10 pixels.

repeat this process for y to get 'yspeed' and you will have a ball that you can throw around the frame, it will go at the speed you throw it in 'zero gravity'.

hopefully this gives you the idea.

gravity is simply applied to the yspeed , EG: yspeed=yspeed+gravityconstant

inertia or friction is a subtraction from the 'xspeed' or 'yspeed' variables

Dj-Grobe ·

http://www.sumo.tv/video/1287504 Nice experimental things like this be possible : )

Well i try traduce your math to synthmaker. 😝 jijiji

Dj-Grobe ·

Ups yep that adress not work here some nice videos:

http://www.youtube.com/watch?v=18T8Oij3XlQ

http://www.youtube.com/watch?v=Gi46ZDY15gg

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.