GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to make a good car with wheels?

Benjamin_m5Benjamin_m5 Posts: 646Member
edited December 2011 in Working with GS (Mac)
Hey there everybody

I would ask, how can I make a good car with spring-loaded wheels?

Thanks to everyone :-)
---
Benjamin

Comments

  • jckmcgrawjckmcgraw Posts: 647Member
    Hahaha
  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,913Member
    It's all in how you set the restitution and density that affects how it collides with the ground.
  • Benjamin_m5Benjamin_m5 Posts: 646Member
    @FryingBaconStudios

    Yes, but i already known that. But I mean how can i make my car spring loaded between my car-body and my wheels, not between my car and my ground.
    ---
    Benjamin
  • Benjamin_m5Benjamin_m5 Posts: 646Member
    Thanks much RKS :)

    Here is a video from another problem. The red polygons are the wells from my car. But if i add an accelerate down behavior, the wheels are not working really good. They stop rotating after a lil second. Can anyone help with this problem?
    Video:

    ---
    Benjamin
  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,913Member
    You don't have enough forward velocity and reduce the drag.
  • LeonardDeveloperLeonardDeveloper Posts: 4,630Member
    Would you like me to make a tutorial for you? :)
    ---------------
    Posted by LeonardDeveloper, contact me on [email protected]
    Be sure to visit my WEBSITE
    Have a look at my GS Tutorials
    Image and video hosting by TinyPic
    ----------------------------------------------------
    Yours Sincerely,
    Jack Leonard

  • SlickZeroSlickZero Houston, TexasPosts: 2,870Member, Sous Chef
    edited December 2011
    Until we get joints, this will be a difficult effect to achieve. The wheels are bunching on top of one another once you hit the ramp, and the rotation is slowing down because of the force being applied. To fix the distance between the wheels, you're going to have to set up more constraints that are constantly checking the distance between the wheels, and when they start bunching together, you're going to need a rule that forces them to constrain and remain the same distance apart from one another, which could bog down performance. You could do the same thing with the rotation as well. That will be hard since it accelerates, and having it timed right with the speed of the actor will be almost impossible. You would be better off with a still image for the entire car without tire rotation, and then when it's moving, change actor to an image, or animation that resembles it having tire rotation.

    The spring action between the body of the car and the wheels is something i would't even know how to achieve without tons and tons of math and magnitudes. Unless you take advantage of a change attribute with a timer that constantly checks for vertical position, but with a slight delay, like a half second or something so that it will have that split second to move off position, and then be put back when the timer activates, telling it to constrain to a position. But then you would need to use a interpolate behavior so that it kind of slides, and doesn't "pop" back to its proper position. Lots of demands on the processor, and probably undesirable playback. But then again, you never know until you try it.

    I have no friends. I'm a loser that makes video games all day. Will you be my friend?

  • Benjamin_m5Benjamin_m5 Posts: 646Member
    @FryingBaconStudios

    Yeah, thanks..that helps much. I've forgotten velocity :)

    @LeonardDeveloper

    Yes that would be very kind of you :)
    ---
    Benjamin
  • LeonardDeveloperLeonardDeveloper Posts: 4,630Member
    @benjamin_m5
    It won't work very well..... because we don't have joints as @slickzero said but ill give it a shot anyway! :)
  • Benjamin_m5Benjamin_m5 Posts: 646Member
    @SlickZero Thanks much for your words :)

    Wow, that looks from tons of work. But is it really so hard to make spring loaded wheels, because lots of flash games have spring loaded wheels. Have they better programming software or tools?! I already thougt about that, that it is really difficult... Have nobody tried this yet? I think too, that the car with the spring-loaded wheels isn't possible until we have joints...this is a pity :(

    So... i have to work with only one actor?! But i think that didn't work very well...
    ---
    Benjamin
  • RThurmanRThurman Posts: 2,824Member, Sous Chef, PRO
    Fire Maple Games' Elasticity Demo will show you how to do this. I just checked on the dashboard in GS creator and couldn't find it. (Many of the great demos seem to be missing.) Here is a copy of it. I hope FMG does not mind.
    http://speedy.sh/FgVuc/Elasticity-DEMO.zip

    RThurman
  • Benjamin_m5Benjamin_m5 Posts: 646Member
    Thank you :)

    And yes, yesterday i searched for a little demo. But i couldn't find this. :(
    ---
    Benjamin
This discussion has been closed.