Rotational Acceleration & Making a Glider

dmilinovichiiidmilinovichiii Member Posts: 620
edited December 2012 in Working with GS (Mac)
Does anyone know a way to create rotational acceleration? And does anyone know how I could create a glider that could be controlled with the arrow keys?

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    Do you mean like our stunt pilots template?

    You can play the game via the link below.

    http://www.deepblueapps.com/stunt-pilots/

    Darren.

  • dmilinovichiiidmilinovichiii Member Posts: 620
    Not quite. Something more like this:
    http://www.notdoppler.com/flight.php
  • carlblanchetcarlblanchet Member Posts: 755
    edited December 2012
    Damn what an addicting game that was, lol just realised ive been playing for over 1/2 an hour! Goes to show how powerful a story mode and a lot of upgrades are and how much it can make a simple game awesome.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Yes, excellent time waster!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I actually have no idea, sorry. It seems like playing around with drag, gravity, and density might do something but I really am not sure how to achieve that.

    Here's my failed attempt:

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • dmilinovichiiidmilinovichiii Member Posts: 620
    @carlblanchet
    Yes, it is very addicting. I got stuck for 15 minutes when I searched for the link in my second post.

    @tatiang
    I think we would need a rotational acceleration (torque) behavior and a way to check the glider's x and y velocity. Also, a good understanding of trigonometry would also help.

    Is there anyone else out there who has done something like this before?
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    "Does anyone know a way to create rotational acceleration?"

    What kind of rotational acceleration do you mean, by that I mean in what context would you be using it ?
  • dmilinovichiiidmilinovichiii Member Posts: 620
    @Socks
    By rotational acceleration I mean torque. It would be like the difference between the "Move" and "Accelerate" behaviors but applied to rotation. It could be used in flight and glider games such as this http://www.notdoppler.com/flight.php
  • SocksSocks London, UK.Member Posts: 12,822
    It would be like the difference between the "Move" and "Accelerate" behaviors but applied to rotation.
    What is the difference between "Move" and "Accelerate" ?
  • dmilinovichiiidmilinovichiii Member Posts: 620
    @Socks
    Move causes an object to move at the same rate continuously and accelerate makes an object move faster and faster. For example, a car moving down a road at 40 miles an hour is "Move". When a car is at a red light that turns green, the car begins to "Accelerate" and increase its speed.

    To sum it up, accelerate puts a constant force such as gravity on an object and its equation is acceleration=(velocity2 - velocity1)/time

    Move causes an object to move at a constant speed constantly. Move=Speed=Distance/Time

    The advantage of having a rotational acceleration behavior is that we could have a more realistic physics engine. For instance, a spaceship in space could turn faster and faster the longer that you hold the right arrow key.
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    @Socks
    Move causes an object to move at the same rate continuously and accelerate makes an object move faster and faster . . . . . .
    I understand what move and accelerate mean, I was just trying to get a better understanding of what you were after, you say: "It would be like the difference between the "Move" and "Accelerate" behaviors but applied to rotation." - so I wanted to know what this difference is ? Maybe I am reading too much into / or misinterpreting what you are saying.
    For instance, a spaceship in space could turn faster and faster the longer that you hold the right arrow key
    That's easy enough just relate the rotation to time.
  • dmilinovichiiidmilinovichiii Member Posts: 620
    @Socks
    I didn't mean to imply you were an idiot, but there are some 13 year olds on the forum who may not understand and I didn't know if you were one of them.

    What I mean is that the standard rotate behavior makes an actor rotate constantly. A rotational acceleration behavior would cause an actor to steadily increase its rotational velocity. Not sure if I explained that clearly enough.

    I am aware that you can do this just by using something like:
    rotate clockwise at (time right is held)*(30)
    The problem with this is that it becomes incredibly complicated if you want to add the affect of wind and wind resistance to the game. As a glider game, being able to do this would be necessary.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited December 2012
    Here is a quick demo that might be a start.
    http://www.mediafire.com/download.php?c0we113e6khmuuw
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    @Socks
    I didn't mean to imply you were an idiot, but there are some 13 year olds on the forum who may not understand and I didn't know if you were one of them.
    I didn't think you were implying anything (although I can be an idiot at times : ))
    What I mean is that the standard rotate behavior makes an actor rotate constantly. A rotational acceleration behavior would cause an actor to steadily increase its rotational velocity. Not sure if I explained that clearly enough.
    That's clear enough for me.
    I am aware that you can do this just by using something like:
    rotate clockwise at (time right is held)*(30)
    The problem with this is that it becomes incredibly complicated if you want to add the affect of wind and wind resistance to the game. As a glider game, being able to do this would be necessary.
    I can't see it being too difficult, any complexity will be emergent from a few simple ideas / rules.

    I'd suggest (and you may already be thinking like this) that the first move would be to jettison ideas of wind and wind resistance and torque (and so on) and mentally replace them with what they are in the real world and Gamesalad (slower / faster / slower that slows more with time - and so on). You know, break these ideas down into their constituent parts.
  • dmilinovichiiidmilinovichiii Member Posts: 620
    @RThurman
    That's close, but not quite what I'm looking for. After a while, the plane begins to fall very rapidly. That isn't realistic because the wings allow you to change the downward velocity into foreword velocity. Is there a way of doing that?
  • dmilinovichiiidmilinovichiii Member Posts: 620

    I'd suggest (and you may already be thinking like this) that the first move would be to jettison ideas of wind and wind resistance and torque (and so on) and mentally replace them with what they are in the real world and Gamesalad (slower / faster / slower that slows more with time - and so on).
    I tried doing that and I can't seem to get it to work without some problem. I have a good understanding of the physics and the math that goes along with it, but I can't seem to get it just right. Maybe it just isn't possible with GameSalad.
  • SocksSocks London, UK.Member Posts: 12,822
    . . . I can't seem to get it just right. Maybe it just isn't possible with GameSalad.
    What, specifically, is 'it' ?
  • dmilinovichiiidmilinovichiii Member Posts: 620
    The physics. Getting it to move correctly.
  • SocksSocks London, UK.Member Posts: 12,822
    The physics. Getting it to move correctly.
    I'm not very good at this (the parsing, especially online), is there a part of the physics that is causing issues that you could articulate, like for instance: 'when the plane falls the rate is too linear' or 'when slowing due to wind resistance the speed hits a plateau which doesn't look natural' (etc etc) ?
  • dmilinovichiiidmilinovichiii Member Posts: 620
    Well everything kind of looks off, but specifically, the rotation is to linear and not smooth and the glider won't glide. By that, I mean that if the glider goes straight down and accelerates and then turns so that it is parallel with the ground, the glider continues to fall instead of "catching the wind".
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    @RThurman
    That's close, but not quite what I'm looking for. After a while, the plane begins to fall very rapidly. That isn't realistic because the wings allow you to change the downward velocity into foreword velocity. Is there a way of doing that?
    Not the paper airplanes I fly! Once she stalls and the nose tips down -- that's all she wrote!

    Try flying the plane. Use the up arrow for thrust. Use the left arrow to rotate the nose up a little. Then go in and start experimenting with the values in the behaviors. You might find a decent little game in there!

    Its not a perfect simulation with complete aerodynamics, but its a start for you.

    I'd keep two things in mind with this;
    1) Game physics are not the same as real physics. Players actually expect a paper plane to act a little goofy. Its the same principle with cartoon physics.
    2) GameSalad is a game development kit. It is not a simulation development kit. If you want a complete simulation of the aerodynamics of a paper airplane I can scrounge up a few hundred lines of code for you to translate into GS behaviors.
  • dmilinovichiiidmilinovichiii Member Posts: 620
    edited December 2012
    Not the paper airplanes I fly! Once she stalls and the nose tips down -- that's all she wrote!

    Try flying the plane. Use the up arrow for thrust. Use the left arrow to rotate the nose up a little. Then go in and start experimenting with the values in the behaviors. You might find a decent little game in there!
    I hadn't noticed about the up arrow. It is actually quite a good simulation now that I have played with it more.

    If you want a complete simulation of the aerodynamics of a paper airplane I can scrounge up a few hundred lines of code for you to translate into GS behaviors.
    No thanks! That sounds very horrifying to make and to translate. I think I can probably work it out.

    Thank you for your help. I think I can adapt this to what I need.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Glad it will work for you after all. I guess it would have helped if, in the first place, I would have said to use the arrow keys to 'fly' the thing.
  • dmilinovichiiidmilinovichiii Member Posts: 620
    Well I guessed that the left and right keys were to rotate, but I never tried using the up or down keys :)
  • sparkaniasparkania Member, PRO Posts: 300
    I made a rotation decrease or increase according to the velocity of the actor... I don't know if will exactly help.. but it might get you in the right direction...

    http://forums.gamesalad.com/discussion/52040/simulated-steering-when-coasting#latest
  • dmilinovichiiidmilinovichiii Member Posts: 620
    @sparkania
    Thats very creative. It could probably be used for what I'm wanting with a little tinkering. And thats a great guide! The instructions are very clear.
  • sparkaniasparkania Member, PRO Posts: 300
    thanks.. the tricky part was to create a usable velocity.
Sign In or Register to comment.