How high is high CPU usage?

0 favourites
  • 11 posts
From the Asset Store
High Low is a casino game using luck and points accumulation.
  • Right now I'm making my game to work mainly on node-webkit platform and I've realized that the game seems to be eating about 30% of CPU use on my quad core constantly even on idle. The layout has only 84 objects and 90% of them are just static sprites with no events or effects connected to them. The usage doesn't drop even if I remove all particle generators and disable WebGL. Is this normal for C2 games? Also for some reason the debug layout seems to cap my FPS to 50 and makes it feel very laggy, but I don't think it's connected to the CPU usage since it happens on all my projects.

    Also does other layouts eat CPU even if they aren't rendered? I have one layout just for objects, containers etc. to make spawning them easier and to keep the project more organized.

  • how are you determing CPU use if you are running in debug mode it adds CPU usage quite a bit if your in the inspect page i

  • Also does other layouts eat CPU even if they aren't rendered?

    no

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, debug will butcher your framerate on the inspect tab, especially if you have a lot of arrays or objects.

    One thing about cpu usage: the best thing to do is to export your project, either as html or as node-webkit. Sometimes your cpu will go down drastically on export, sometimes it won't, but it's best to see what happens. Be sure to have 'minify' checked.

    If you are still using around 30%, something is almost certainly wrong.

    Best way to figure it out: fire up debug and go to the 'profile' tab. See how much cpu is being used. If you have any groups, you can see aprox how much cpu is being used by each group. This is another reason why it's a great idea to break your logic up into groups and sub-groups; makes it easy to spot what events are lagging you down.

    Also, check for extra behaviors on objects that you don't need, or loop logic going awry.

  • Debug Watch or Profile mode is pretty accurate.

    Also its extremely high for a PC quad core to be that highly used in a small project, I think you have a code-leak somewhere. It's NOT normal for C2 games to abuse your CPU unless you set it to do it on purpose or accident.

  • when you export your final game - use brutal png re compression. it will though take time.

    and about the CPU usage - i have quad 3.4GHz, currently uses 1-5%, and i have tiled water background with 250 frames color map, 250 frames normal map (these are 2 sprites with 2x250frames, infinite looping, bump mapping effect) with effect over them, one 2kx2k image that scrolls under water, 360 frames boat, and static clouds. it's 5 layered layout and still more to come. uses around 180MB by debugger and 5% cpu, 7% when driving boat. but since i use "average" data for mobile / CPU's i'd double that value and say it's 14% usage for average CPUs. we'll see how much it will be once the level is complete.

  • From the sound of that it must be that I'm just creating my events wrong and causing some weird loops that eats up my CPU. My game has very little animated content aside from the actual characters that usually have 4-5 animations with at least 4 frames and at most 12. I'm gonna start disabling chunks of events and see if that shows me the way to the problem.

    EDIT: Alright, I got a question. Which CPU usage I should trust? The one that shows when the Profile tab is open or the one in Inspect? The game uses about 10% of my CPU when the Profile is enabled but jumps up to 35% when in Inspect? Could it be that the Inspect itself hogs the CPU? This also happens on both node-webkit mode and in Chrome.

  • As has been stated, inspect can seriously impact your framerate. You can put your own cpu/fps meter into your project using a spritefont object, and look at the reading from a node-webkit export. That would be the most accurate way of going about it.

  • quick question, how are you getting 30% usage... a single core of a quad-core maxxed out should yield 25% cpu (at least that's how window's will report it, I'm not sure how C2 reports it).

    so if you have a maxed out core, then you are going to hit frame-rate issues.

    assuming a lot of games are played on laptops... a simple issue is that they'll get hot and noisy as fans power up. so that sounds high to me.

    R

  • On multi-core's, node-webkit splits into 3 processes. Chrome can do the same thing. I'm not sure which thread does what, but chromium certainly has some multi-threading capabilities.

  • I thought construct 2 compiles in node-webkit for everything ?

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