Code center > Suggestions
Fixing Ties
PurpleYouko:
It worked OK in V2.3. I made a point of fixing it up so that it would.
We have come a long way haven't we?
V2.1 was the point where I took over the main programming.
:D PY :D
Numsgil:
Okay, here's what I've brain stormed so far:
Ties aren't rubber bands, but more like shocks on a car.
Really good shocks anyway.
Each tie has a resting length, and a spring coefficient (for those familar with physics). When you change the length of a tie you have to pay energy based on the potential energy of a spring equation (which I don't remember at the moment. So sue me).
Changing the springiness of a tie costs some energy too. Or maybe you have to set it when you fire it.
Pretty standard so far. Nothing too new. However, as a stretched spring applies force to its connected bots, it has another force that slows it as it approaches its length.
Like this:
|\..........
|.\.........
|..\........
|...\____
----------
0....5....1
Where y axis is velocity of a connected bot and the x axis is the length of the stretched tie. Assume its natural length is about 1.
That should stop the ties from oscillating while still allowing them to stretch and apply forces to bots.
Also solves the problem of translating forces along a MB. Bots that move stretch or shrink the tie, causing the tie to create forces on both the moving bot and the connected bot, which is itself translated along the MB.
Bones would just be a tie with a inhumanly large spring coefficient.
I've gone over the math for damped oscillation once before, so I'm somwehat familiar with the math.
PurpleYouko:
Sounds like you have a good plan there.
I had a brief go at stopping ties oscilating but it wasn't that successful.
I think we also need to remove any length fixing on temporary ties (or set the length to be whatever distance it starts at). Right now (in 3.0 beta) when a bot shoots a tie at a really close veggie they both spring violently apart. That is messed up and needs fixing.
:D PY :D
Navigation
[0] Message Index
[*] Previous page
Go to full version