Ball Paddle Physics

0 favourites
  • 4 posts
From the Asset Store
Everything is made via physics, Very simple code: 6 events only (3 for tank creation, 2 for controls and 1 for camera)
  • Hey everyone! I am making the classic ball and paddle game. Through-out the whole process I have had issues with stuttering and performance. I eventually rewrote the entire project and went "ape-sh!t" on reducing file sizes and using the best optimization practices. Still, I am having issues.

    I notice that other, more intense, games can be played with far better smoothness then mine can. So, I decided to do a test. I stripped everything out and only added one ball, one paddle, and three walls. I added the solids, bullet and physics behaviors where they were needed.

    Guess what? Still stuttering....! I really don't understand what can be causing this problem. I must be doing something wrong. Below is my capx file. Thanks for any advice.


    Decided to compile the above capx file and upload it to my phone for CocoonJS. Stuck at a blank screen.

    With console error.

    Result of expression 'this.body.SetAwake' [undefined] is not a function.

    and Warnings.

    Not found getElementByld: c2canvasdiv

  • Tekniko

    It stutters a bit in Firefox although shows 60FPS. Chrome is fine though here.

    Why have you got a physics behavior on the ball?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No physics behavior? Well, I removed it and the ball still works. In fact most of the shuttering has gone away, although there is still some. I am going to make this change in my main project and see how it runs on a mobile.


    Well, I removed the physics behavior, on both of my projects, and all of my errors have gone away. There is still some slight stuttering but at least it is now playable. This has even fixed a graphical error introduced with r129 when switching layouts.

    And my parents wonder why I dropped out of Computer Programming in college >.< <img src="smileys/smiley7.gif" border="0" align="middle" />

  • Tekniko

    Generally mixing physics with other behaviors which also want to control the object always seems to cause problems. If you need to use physics then only control the object with physics forces.

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