Squishy objects

RDRD Member Posts: 88
edited January 2012 in Working with GS (Mac)
Is it possible to make an actor that accurately senses compression, and squishes or deforms accordingly? Or at least any way to sense tension and compression? I know the physics engine itself probably can't do this natively, but using rules and fancy maths - I'm almost sure it is possible.
«1

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Im usually against posting links for paid templates when someone asks a question in the forum, but seeing as this is only like a dollar, its probably worth it for you

    http://www.deepblueapps.com/Deep_Blue_Ideas_Ltd./bar_SoftPhysics.html

    cheers

  • RDRD Member Posts: 88
    The template linked is a great example of how you can mimic something being squished, but I'm looking for a way to have an actor act like the Gish character, not just interpolating the width or height when it touches an invisible actor. The objects will need to react with a random and unpredictable environment, so I think it would be impossible to use this method in larger scale, generated levels.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Never heard of gish before just looked it up. If you mean you want a liquid/fluid type actor that can react to everything and wrap around stuff thats not possible in gamesald.
  • CloudsClouds Member Posts: 1,599
    edited January 2012
    I think you could just about put together this kind of thing by making lots of separate animations outside of GS and triggering them when and where needed, it's would be a bit of a logistical nightmare (depending on the complexity of the game and the complexity of the character) but most probably achievable to some degree - but obvioulsy as John says not feasible using GameSalad alone.

    To be honest real soft body dynamics is not even that straightforward or easy to set up in a dedicated CG package, so it's not surprising GameSalad wouldn't concern itself with that kind of thing.
  • gamedivisiongamedivision Member Posts: 807
    edited January 2012
    Really easy,make an invisible actor place it on the screen where you want to get squashed,then in your player actor make a rule when actor collides with the invisible actor you made, interpolate self size height put here how much you want to squash it by and say 0.5secs and then add another interpolate self size width and change the size and the same 0.5 time then make a timer after 0.5 sec run to completion, 2 interpolated inside the timer self size height and width back to original height and width.
    You can alter the timing for you to turn back to your original size
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    @gamedivision

    thats not what hes after. Search for the game Gish and youll see what he wants.

    cheers
  • gamedivisiongamedivision Member Posts: 807
    Well it is what's he's after because that little ball of squishiness squeezes through gaps hence what I've posted,then all you need to do is make an animation of about 7 images of a ball of goo swishing around loop the animation then when you pass through the actor that squashes you to get through the hole it will look like it's part of the animation ,plus the same as Gish you could add a rotation on your actor when he collides with the invisible actor he'll rotate around
  • gamedivisiongamedivision Member Posts: 807
    edited January 2012
    Ok here's a game I started about 6 months ago and couldn't be bothered to carry on with it,demonstrating the squash effect to get through small gaps,
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited January 2012
    Sorry, Im not trying to argue with you but thats not it. In gish its not just squeezing threw gaps. Its a fluid actor, if you say hit a corner on a square it wraps around the sqaure, half goes to 1 side half goes to the other side and it forms around the square, like fluid physics do. What you posted is what i put in my first comment, and he responded saying thats not it.

    cheers
  • CloudsClouds Member Posts: 1,599
    @ gamedivision

    "Well it is what's he's after because that little ball of squishiness squeezes through gaps hence what I've posted"

    If you check earlier in this thread John posted a link to DBA's 'soft Physics' template which is pretty much what you describe, RD took a look at it and said that was not what he was after.
  • gamedivisiongamedivision Member Posts: 807
    Yeah I didn't really see how much it bends around objects my bad
  • MotherHooseMotherHoose Member Posts: 2,456
    edited January 2012
    briefly looking at Gish (and he is cute!)

    IMO: Gish is composed of 3 ball Actors: head, L eye & R eye, and mouth … backLayer: head and mouth frontLayer: eyes
    I want to say they are connected with joints … but don't know much about kinetics …
    the actual squish effect appears to be mostly changes in the Y of the head and mouth actors
    the head and ball actors have ability to adhere to walls
    (when colliding vertically their Y maintains an offset constraint to the wall surface … (horizontally, their X is constrained to wallCeiling)

    try making 3 red ball actors … 1 image of both eyes; 1 image for top & bottom;
    drag them into the sceneEditor
    place in proper layer: higher: the eye image; lower: a top and a bottom
    constrain the X of top to the X of bottom
    constrain the eyes X to bottom X with offset if needed
    establish a magnitude function between the top's and bottom's Ys
    (this is what you will change for the squish)
    constrain the eyes Y to half that magnitude you coded
    figure out how to get a slight rotation of the top and bottom when moving L and R
    for tight spots the head and bottom will not be visible and the eyes: changeAttribute; self.Size.Height To: smaller#

    good luck!

    MH

    PS know you can do this @RD … better than I can write it! Show us how it looks when it works!
  • joshuawildejoshuawilde Member Posts: 96
    I will have to show you an example but what i did is i constrained a few circular actors to an area around a 1x1 actor. That way the liquid can go through anything
  • MotherHooseMotherHoose Member Posts: 2,456
    Great thinking @joshuawilde!

    can hardly wait to see your example!

    @};- MH
  • joshuawildejoshuawilde Member Posts: 96
    bump
  • joshuawildejoshuawilde Member Posts: 96
    i have created a video but i don't know to share it with you guys. If you can tell me how that would be great (preferably without having to make an account to youtube or something like that).
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    youll have to upload the video somewhere on the net and post the link to it here. You might as well go ahead and make a youtube account, if your gonna be developing games its gonna come in handy to showcase trailers and such.

    Cheers
  • joshuawildejoshuawilde Member Posts: 96
    wow. fast response. thanks. I guess I will make a youtube account.
  • CloudsClouds Member Posts: 1,599
    . . . . or simply upload the Quicktime movie (assuming it is a Quicktime movie) to mediafire - fast free and no need to make an account.

    > http://www.mediafire.com/


    ...
  • joshuawildejoshuawilde Member Posts: 96
    ok cool
  • joshuawildejoshuawilde Member Posts: 96
    it is currently uploading. It is really short because mediafire would only let me upload 200mb
  • joshuawildejoshuawilde Member Posts: 96
    4 minutes remaining
  • joshuawildejoshuawilde Member Posts: 96
    uploading as a .mov, hope you guys can play it
  • joshuawildejoshuawilde Member Posts: 96
    here is the link. hope you guys like it. http://www.mediafire.com/?503ctnql4ejxy6c
  • joshuawildejoshuawilde Member Posts: 96
    has anyone seen it yet?
  • SparkyidrSparkyidr Member, PRO Posts: 2,033
    I cant get it to play :(
    Says the format is invalid
  • joshuawildejoshuawilde Member Posts: 96
    are you on a mac?
  • joshuawildejoshuawilde Member Posts: 96
    edited January 2012
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    the reason i said to make an account is cause thats the only way to actual embed the video in the forum. Yes you can upload to mediafire or a filehosting site, but some people wont bother downloading just to look at screenshots or watch a clip. And like i said about making trailers for your games and stuff, app websites need a youtube link or something like that to embed the video on there site, they wont post a mediafire link and have people download the video. But yeah the video wont play for me either, and yes im on a mac.

    cheers
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited January 2012
    the second link worked. I hate to sound liek the grinch here, and i hate telling people somethigns not possible. But to make a true fluid actor like the op described in his first post is not possible in gamesalad. Your video gives a nice illusion, but i can cleary see what its doing. You have the circle actors constrained aroudn the main actor, and when it passes threw stuff the constrain actors are behind the obstacle actors, giving the illusion its passing threw the shape and conforming.All of them might not but some of them due. Its a nice effect, and theres different work arounds and illusions you can do, but that wont work for some true physics game where the actor truely has to conform to the object,or be one actor. That is not possible in gamesalad currently.

    Nice video and effect though

    cheers
Sign In or Register to comment.