How do I improve the physics in my game

Just started using Construct 2? Post your questions here

Post » Thu Jul 14, 2016 3:06 am

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!
B
5
Posts: 11
Reputation: 247

Post » Mon Jul 18, 2016 1:49 am

What is the question? 40-50 fps isn't bad, especially for a physics game.
ImageImageImage
B
44
S
26
G
11
Posts: 518
Reputation: 10,502

Post » Mon Jul 18, 2016 1:50 am

Also, try applying force depending on how much the device is tilted. That is probably why it feels sluggish or not realistic.
ImageImageImage
B
44
S
26
G
11
Posts: 518
Reputation: 10,502

Post » Mon Jul 18, 2016 2:25 pm

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.
B
5
Posts: 11
Reputation: 247

Post » Tue Jul 19, 2016 2:20 am

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).
ImageImageImage
B
44
S
26
G
11
Posts: 518
Reputation: 10,502


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests