How do I improve the physics in my game

0 favourites
  • 5 posts
From the Asset Store
City ride is a game to improve your memory.You have to focus and remember the information related to passengers of previ
  • I'm trying to create a game that's similar to those vintage dexterity puzzles where you have to roll little balls into holes punched into a picture. I'm using the physics behavior and tilt (gamma and beta) to control the movement. For the most part I have a single "ball" rolling around the screen when I tilt my mobile device and it deflects realistically off of immovable objects, however, it seems like my approach, while simple, isn't ideal. The reason I think it could be better is because the performance seems a bit sluggish for such a simple scene -- only 7 objects, 6 of which are immovable, and between 40 - 50 fps on an iPad 2.

    I don't have an easily accessible place to post my event sheet screen capture so I'm typing in the events below.

    1. System -- On start of layout -- ball -- Set Physics world gravity to 0

    2. Touch -- Gamma orientation < -2 -- ball -- Apply Physics force 2 at angle 180 at image point 0

    3. Touch -- Gamma orientation > 2 -- ball -- Apply Physics force 2 at angle 0 at image point 0

    4. Touch -- Beta orientation < -2 -- ball -- Apply Physics force 2 at angle 270 at image point 0

    5. Touch -- Gamma orientation > 2 -- ball -- Apply Physics force 2 at angle 90 at image point 0

    That's it!

    Thanks for any advice!

  • What is the question? 40-50 fps isn't bad, especially for a physics game.

  • Also, try applying force depending on how much the device is tilted. That is probably why it feels sluggish or not realistic.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks badmoodtaylor! I wasn't sure what to expect regarding performance -- it sounds like 40 - 50 fps is reasonable. I'll try adjusting the force based on tilt, per your recommendation. Thanks again.

  • Physics will take a ton of testing to get it how you want, at least from my experiences. Both in getting the impulses/forces to the amount you want and on what your device it can handle. Remember that mobile and tablets have significantly lower CPU than desktop, in case you are testing in browser.

    I'd be interested in seeing your progress so feel free to post something here. I made a silly physics project (here) and have been testing to see if tilt controls would work for some mobile game (have some issues I haven't worked out).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)