Jump to content

How to decrease heating up computer.


demiculus
 Share

Recommended Posts

I don't have many animations & most of my game UI is static(its a board game). So correct me if my understanding is wrong.

Even when nothing moves on the screen PIXI draws everything on the canvas constantly, right? So it means every second PIXI draws everything 60 times. 

I have implemented this solution but my computer still heats up when I'm playing the game: https://stackoverflow.com/a/43426419/4204919 

What optimizations can I do?

Link to comment
Share on other sites

If you look at pixi ticker, you'll see that there's setting for target FPS count, but you already implemented your own solution.

While Flash had "cacheAsBitmap" setting that AUTOMATICALLY cached ui every time you change it, pixi doesnt have that , you have to use separate canvas or renderTexture to store it. However, if the problem is fragment shader, it'll persist even through cacheAsBitmap. 

No, there are no other optimizations on pixi side.

Link to comment
Share on other sites

i good way to check if your doing something wrong.
you can also check other big game.
example here starcraft , is hold my cpu between. ~13 ~20 % in the static menu.

and my project on pixi `nwjs`
6~16% in game.
It a little nice way to check if you do something wrong.
If you little 2d game get cpu over AAA game, maybe you need some optimisation.

image.png.bf2a7cacfea9e074b53a731bed8f3fce.png

 

 

Link to comment
Share on other sites

One really great way of reducing gpu/cpu utiliziation is to skip rendering when nothing has changed. Especially good if you have lots of static content.

Easiest way to do that is to have some global flag and everytime you update something set it to true and when rendering set it to false. Then just check before render if it's true or not. Skip rendering on false. That way you only get rendering when it is actually needed.

Link to comment
Share on other sites

13 hours ago, Exca said:

One really great way of reducing gpu/cpu utiliziation is to skip rendering when nothing has changed. Especially good if you have lots of static content.

Easiest way to do that is to have some global flag and everytime you update something set it to true and when rendering set it to false. Then just check before render if it's true or not. Skip rendering on false. That way you only get rendering when it is actually needed.

Any pointers on how to skip rendering cleanly?  I like the idea, and given my architecture (where everything is wrapped by accessors) it would be easy enough to set a global "dirty" flag, but I'm not clear on how to explicitly skip a render using the PIXI.Application model.  Where can I trap the "I'm about to render" event/call?

Link to comment
Share on other sites

> Any pointers on how to skip rendering cleanly?  I like the idea, and given my architecture (where everything is wrapped by accessors) it would be easy enough to set a global "dirty" flag, but I'm not clear on how to explicitly skip a render using the PIXI.Application model.  Where can I trap the "I'm about to render" event/call?

 
PixiJS application class is a mashup for hello-worlds and simple demos. For a serious project you have to copy it and make changes: https://github.com/pixijs/pixi.js/blob/dev/src/core/Application.js
 
Everything in this article except interaction ( its still part of "renderer.plugins.application" and not moved separately) is true: https://github.com/pixijs/pixi.js/wiki/v5-Custom-Application-GameLoop
 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...