Forum Topic: On the Subject of Spring Emulation

(128 views • 7 replies)

This topic is 1 page long.

<< < > >>
Goofy

Randomini

Reply To Post Reply & Quote

Posted at: 3/14/09 09:37 PM

Randomini EVIL LEVEL 13

Sign-Up: 07/07/06

Posts: 476

Ever wanted to make a true-to-life spring in flash? So did I. So I did.

You can see my first attempt here (use the mouse). If you have a look at it, it's kind of obvious that it's not acting too realistically. When you approach the object on the spring, the speed it moves away from you doesn't increase much - it's going very slowly, in fact. Also, it is prone to stretch a lot when you move your mouse away.
That got me thinking - how do springs work in real life? The more they are compressed or stretched, the harder it gets to compress or stretch them. As such, I made the force applied proportional to the distance from the mouse that the object is. I then chucked the whole thing in a class, and *tah dah*, you've got a fancy and Realistic Spring Effect.
So after 2 days of experimenting I've finally gotten what I wanted.

Randomini

BBS Signature

KnightInShiningArmor DARK LEVEL 04

Sign-Up: 02/22/09

Posts: 26

Nice. Do you have any ideas of what you could do with it?

People who say CS4 is bad just don't understand it.

BBS Signature

None

Alexman159

Reply To Post Reply & Quote

Posted at: 3/14/09 10:47 PM

Alexman159 DARK LEVEL 15

Sign-Up: 09/19/07

Posts: 1,094

you could make a defense game with a spiked paddle ball as the weapon. =3

BBS Signature

None

LeechmasterB

Reply To Post Reply & Quote

Posted at: 3/14/09 11:03 PM

LeechmasterB EVIL LEVEL 16

Sign-Up: 04/01/05

Posts: 919

Its buggy somehow, you might want to look into verlet integration.


None

Randomini

Reply To Post Reply & Quote

Posted at: 3/14/09 11:50 PM

Randomini EVIL LEVEL 13

Sign-Up: 07/07/06

Posts: 476

At 3/14/09 10:41 PM, KnightInShiningArmor wrote: Nice. Do you have any ideas of what you could do with it?

Oh, I dunno... a little something like THIS!!!
(arrow keys to move)
(i know it sucks right now)

BBS Signature

None

Randomini

Reply To Post Reply & Quote

Posted at: 3/15/09 12:04 AM

Randomini EVIL LEVEL 13

Sign-Up: 07/07/06

Posts: 476

At 3/14/09 11:56 PM, KevnSevn wrote: You should try to add a gravity effect to it.

Yeah, gravity's the obvious next step.

Try making 5 or 6 of them all in a line, to get like a rope effect.

I did that, but it wobbles like crazy. A spring on a spring on a spring on a spring isn't the most stable of constructions :D

BBS Signature

Resigned

Ansel

Reply To Post Reply & Quote

Posted at: 3/15/09 12:47 AM

Ansel LIGHT LEVEL 22

Sign-Up: 09/02/06

Posts: 4,073

Make a virtual paddle ball.

On the Subject of Spring Emulation

BBS Signature

None

Randomini

Reply To Post Reply & Quote

Posted at: 3/15/09 01:54 AM

Randomini EVIL LEVEL 13

Sign-Up: 07/07/06

Posts: 476

At 3/14/09 11:50 PM, Randomini wrote: (i know it sucks right now)

BETTER.

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 02:59 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!