Making a tilt platform in game

jbrown2177jbrown2177 Member Posts: 66
edited November -1 in Working with GS (Mac)
I'm making a cute little game in which you use the accelerometer to tilt the iPhone to collect items an build your score. The thing is the main character is on a platform that tilts when the iPhone is moved. How do I animate the background in accordance with the character on top of it to perform this action? It seems like it's an easy thing, but working it out in my mind it's not. Unless there's a game with an engine built like this already?

Comments

  • FoleyFoley Member Posts: 37
    I'm not sure I understand your game correctly- are you are talking about characters standing on a platform like a see saw? where tilting the iphone tilts the platform?

    if this is what you are talking about, here's how I would try it:
    - turn on gravity
    - make the platform moveable so it can tilt, but in the behaviors constrain the x and y position.
    - then set the accelerometer controls to accelerate or move the platform in a rotational motion.
    - you can add invisible actors as collision barriers to limit the max tilt angle in either direction, (or you could do that with a rule).
    - adjust the friction of the player and the platform so the player slides on the platform.
    - you may need additional rules or collision actors if you want to prevent the actor from sliding off the platform.

    hope that helps.
  • jbrown2177jbrown2177 Member Posts: 66
    Yeah, this is what I'm talking about thanks for your suggestions. I'm going to start drawing my island or iceberg. The animation part has me kind of stumped because I guess now I will have to animate the platform moving unless GS moves it based off the gravity rules?
  • FoleyFoley Member Posts: 37
    What animation do you need?

    If the iceberg actor rotates, the image rotates for you. You don't need to animate unless the image itself is changing. orientation of the image can all be handled by GS.

    If you have a iceberg background image with a flat platform in front for the actors to stand on, you can constrain the background image (a separate actor) to match the position and rotational angle of the platform actor. that way everything moves together seamlessly.

    Let the physics do as much of the heavy lifting as you can
  • jbrown2177jbrown2177 Member Posts: 66
    That's what I was trying to figure out, but I haven't seen any examples or tutorials based on this physics method. I'm still new to all the physics and wonders of what GS can do. Only problem I'm having now is why my artwork is clipping the entire canvas and image instead of just the image so I can paste it into the editor.
Sign In or Register to comment.