Elasticity DEMO

firemaplegamesfiremaplegames Member Posts: 3,211
edited November -1 in Announce Your Game!
Hey,

Here is a quick little demo showing how to constrain an Actor to a target using elasticity:

http://gamesalad.com/game/play/38647

The physics formula being used is Hooke's law. Play with the values in the ball actor to get different results!

Feel free to use this for whatever you want!

Joe

Fire Maple Games

Comments

  • rebumprebump Member Posts: 1,058
    Nice demo, Mr. Demo Man!
  • JoshKahaneJoshKahane Member Posts: 470
    You never fail to impress me Joe! Nice work! :)
  • firemaplegamesfiremaplegames Member Posts: 3,211
    thanks, guys!
    yeah, when i'm trying to figure something out in gamesalad, it helps if i make these little tests. I figured if it helps me, maybe it will help others as well.
  • ORBZORBZ Member Posts: 1,304
    nice :) I was just about to do that exact thing. Thanks!
  • SlowboySlowboy Member, PRO Posts: 329
    That's very impressive Joe, you really know your maths don't you? Actually, do you? Would you consider yourself a good mathematician, or do you just manage to 'get by'?
    I bought SS as well, you know! Very nice, but I'm going to finish DC before I really get stuck into it.

    Anyway, back to the subject - how do you approach a problem like this? i.e. pushing the maths functions of GS...do you just think,

    'ah well, if I do this and this, it might just do THIS...here goes nothing!...'

    or are you more like,

    'ah, I see, the hypotenuse divided by Pi relative to the tangent of actor X must be the square root of the velocity, as it relates to it's subject's gravitational awareness...EUREKA!!'

    So what are you? A or B
    :D
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    I cant figure out how to get the the second level :P
  • firemaplegamesfiremaplegames Member Posts: 3,211
    well obviouly you didn't pull the ball far enough!

    @slowboy: i am a mediocre mathematician at best! I just noodle around until I like something. Most of these demos are just some of my old flash demos that i translate over to gamesalad. The logic for these little demos is pretty universal. I find that the math and physics stuff inspire new and interesting game mechanics.
  • ORBZORBZ Member Posts: 1,304
    Slowboy, check out Khan Academy on youtube.
  • rdcuberdcube Member Posts: 361
    THIS IS FREAKING AWESOME!!!!
    I'll definitely will use this.

    Thanks man!
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    very cool....Now I find myself thinking over what cool game ideas could be made using this.

    Another great helpful project...cheers
  • SlowboySlowboy Member, PRO Posts: 329
    Thanks for that Orbz - looks amazing - I'll definitely be using it, but more than that, I'll be forcing my daughter to watch them! She's going to be a genius!!
  • ctceismcctceismc PRO Posts: 36
    Can someone please explain where the Hooke's Law parameters are used to create the elastic effect? I found the attributes but I can't seem to figure out how they are used to create teh elastic effect.
  • ctceismcctceismc PRO Posts: 36
    ctceismc said:
    Can someone please explain where the Hooke's Law parameters are used to create the elastic effect? I found the attributes but I can't seem to figure out how they are used to create the elastic effect.

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    ctceismc said:
    Can someone please explain where the Hooke's Law parameters are used to create the elastic effect? I found the attributes but I can't seem to figure out how they are used to create teh elastic effect.

    In the beam actor Rules, I think.
    firemaplegames said:
    Hey,

    Here is a quick little demo showing how to constrain an Actor to a target using elasticity:

    http://gamesalad.com/game/play/38647

    Fire Maple Games

    Excellent, Joe! (As always!) :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • ctceismcctceismc PRO Posts: 36
    I don't see anything using the elasticity attributes in the beam actor rules. The attributes are defined in the ball actor but I never see them used. ax, ay, vx, vy, k, damp.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    I see what you mean...very odd! :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • firemaplegamesfiremaplegames Member Posts: 3,211
    This is an oldie, I had to reopen it to remember what I did... :o)

    In the Library, double-click on the Ball Actor.
    On the left-hand side, scroll down to see its Attributes.

    The ones you can play with that will affect the motion are:

    k
    damp

    k is the "strength" of the spring.
    damp is how quickly the objects will slow to a stop.

    I would keep k between 0 and 3
    and I would keep damp between 0 and 1.

    These Attributes get applied in the Dragging/Release Rule (in the Otherwise section) on the right-hand side in the Behaviors pane.

    Let me know if that is not clear.

    Hope this helps!
    Joe
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    firemaplegames said:

    These Attributes get applied in the Dragging/Release Rule (in the Otherwise section) on the right-hand side in the Behaviors pane.

    Drat and double drat; I should have thought of looking there!!

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • ctceismcctceismc PRO Posts: 36
    Thank you!! I simply forgot that something could be hiding in collapsed Otherwise portion of the rule. I looked everywhere - knew it had to be in there somewhere ;-)
  • cowdarcowdar Member Posts: 14
    Hi
    How can I download this demo to gamesalad
    (could be a silly question)
    thanks :)
  • cowdarcowdar Member Posts: 14
    cowdar said:
    Edit
    Sorted

Sign In or Register to comment.