Very slow with WebGL

  • Hello,

    When I turn on WebGL support in project properties during game play I see 29-30 fps and all objects like a slow-motion. But when I turn off WebGL I see 60 fps and game is running without a slow motion.

    I use latest Google Chrome browser, updated graphic drivers, not so old graphic card (Radeon HD4270). In my project I have only 5 objects with Physics behavior.

    Can somebody explain why I get these results? Which result is real - 30 fps or 60 fps?

  • If possible, post your .capx and we can all test it out for you and see what FPS we get.

  • There is my capx file:

    http://terademix.com/game_v_0.5.capx

    I checked it again on my iPad. When I turn on WebGL everything is like a slow motion.

  • I think iPad/iOS doesn't support webGL (yet ?).

  • There are two links:

    http://terademix.com - with WebGL

    http://terademix.com/2/ - without WebGL

    Both are very slow on my iPad, and only WebGL version slow on my laptop. But it works fine without WebGL on laptop.

    If I use less than 10 objects and 21 event in total and already got slow bugs how can I continue creating game? May be it depends which version I use - free or paid. Currently I am using free version of Construct 2.

  • alexgold87: iOS (ipad/iphone/ipod) doesn't support WebGL *at all* for the moment. The only WebGL piece you can do with HTML/JS for the moment is an iAd...

  • Problem for me that red box is moving very slow. How can I increase it's speed?

  • Pode is right, changing the WebGL setting will have no effect on iOS, because it doesn't support WebGL at all! It will always use the same canvas2d renderer. Use the 'renderer' system expression to show which renderer is in use.

    See Delta-time and framerate independence to make sure your game runs at the same speed regardless of the framerate.

    See Performance Tips for general advice on getting the best performance.

  • alexgold87 : what's slowing your game on mobile is the physics behavior. I'm sorry for you, but for the moment it's very ressource consuming...

  • Ok, I got the idea, thanks. Any suggestions - what can I use instead on Physics in this case? Can Platform imitates real physics?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • But how can I use Physics behavior if it so slow on any device? It's impossible to create a good game with 2 or 3 physical objects only. Seriously, I am confused and no more sure that software is so awesome..

  • You only need physics if you want realistic glancing collisions, etc. (e.g. if you want a stack of crates to fall down properly).

    You can still have physical objects. Give them the solid behaviour. They won't move but will still cause collisions with other solids and objects with platform, 8-direction, etc.

  • Ok, I tried to apply:

    1. Physics and Solid - for one moving object.

    2. Solid for other objects.

    But when moving object collisions with solid object it's just fly through.

    For my idea I need 20 non-moving objects and 1 moving, so I want to apply physics to only one object. How can I set other objects to detect collisions with them?

  • There is a file with example. Can somebody show how to use only on physical object with other non-physical objects. I need realistic movement, platform is not a good idea.

    http://terademix.com/physics.capx

  • Read the tutorial Physics in Construct 2: the basics.

    b]Note: Physics objects only interact with other physics objects. Adding the Solid behavior to the floor has no effect on physics objects. They ignore anything which does not also have the physics behavior. Physics objects will pass right through 'Solid' objects, unless you give them the Physics behavior and set them to immovable.

    Physics should perform OK with up to 20-30 objects, enough for an Angry Birds type game. Are you sure Physics is causing the slowdown itself? Mobiles have pretty weak hardware, and simply drawing the screen can cause most of the slowdown. If you remove Physics entirely, does the game run a lot faster? If not, you must conclude that Physics isn't causing it to run slow.

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