demiculus

How to decrease heating up computer.

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?

Share this post


Link to post
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.

Share this post


Link to post
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

 

 

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.