Improve browser performance

0 favourites
  • 6 posts
From the Asset Store
This is a single chapter from the Construct Starter Kit Collection and the Student Workbook from the Workshop.
  • I don't really know in which forum part I should post this tread. So I'm sorry if I placed it wrong.

    As I'm working with web design I know the performance issues that HTML5 has. So it's quite understandable that my game is running quite slow as there are a lot of objects being spawned.

    But I opened the task manager to check how my hardware resources were used and at the state where the whole game was just lagging insanely I was still only using about 25% of my CPU power and about the same of my RAM. So obviously Firefox don't use all my computer's processing power for rendering the game.

    I'm wondering if anyone are familiar of any way to give the browser access to more system resources? Or something else causing this lag?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you on a computer with a multi-core processor? Because if you were maxing out 1 core on a quad-core machine, it would read 25%.

    Even trying to get C2 to max the CPU usage on my computer doesn't work because C2's runtime only uses one core.

  • Ah, of course. well that explains it all. Thank you.:) Well then I guess I can't do anything to boost the performance.

  • For best performance, see performance tips.

    You'll also want to make sure you have up to date graphics drivers to ensure the browser turns on WebGL for best performance.

  • Thank you for your reply Ashley.

    I've followed the advice on the performance tips page and I'm running a system with a i5 2500k clocked at 4ghz, 8gb RAM and a GTX560 card with the latest drivers.

    Though the performance issues were quite logical as I had several hundreds of object instances and a lot of collision checking going on.

    But I've redone almost everything now when I'm familiar with the software so that it works more efficiently and uses about a third of the object amount. :)

  • On my system (i5 3750k) no individual core goes above 50% even when the game is chugging.

    But I've redone almost everything now when I'm familiar with the software so that it works more efficiently and uses about a third of the object amount. :)

    On this topic, I've been able to do some similar things. For example, I had a couple of hundred soldiers spawning bullets as they shoot, which then disappears and spawns a dust cloud when it gets to a certain range.

    I've changed it to be twice as efficient by adding the dust cloud sprite to the bullet sprite as a second frame in it's animation - once it reaches full range the bullet stops, the frame changes to the dust cloud, and I trigger the Fade and Sine(size) behaviours to start.

    Put simply, when possible instead of spawning objects, change existing object's animation frames to the new object. Half as many objects with exactly the same visual effect.

    This is probably similar to the sorts of things you've been able to do, but I thought it might give some other people some ideas.

    From my own experience lots of object creation and physics tend to slow the framerate the most. Tricks like I mentioned above help with object creation; it's worth lowering the physics iterations for better physics performance. Lowering it from 3 to 1 gave me no noticeable visual loss, and framerate went up by about 5 fps.

    I'd love to hear about other techniques people use to get around performance drops.

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