What are normal FPS rates, CPU usage for Node Webkit?

Discussion and feedback on Construct 2

Post » Wed Sep 10, 2014 12:19 pm

Hi guys,

I also have a CPU/FPS problem with my Space invader clone.

My game CPU consumption is around 30% and the framerate drop sometime very low (and it's a problem because there are sounds associated with).

The game is still under cosntruction but I can't see what is taking so much resources.

I have around 140 objects, is that normal?
Is that the droplets (because they are destroyed at one point)?

Thanks for the help!
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 29
Reputation: 529

Post » Wed Sep 10, 2014 4:15 pm

Nice game! I wonder where all those CO2 emissions from the explosions go? :)

I don't experience any problem at all in my 7 year old PC. The fps are almost always 60 (with occasional drops to 58 or so) and the CPU usage is between 0 and 2 %...
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Wed Sep 10, 2014 5:05 pm

Ahah Thanks :) Maybe it goes into space as player is suposed to stop them before invading Earth. But it's just a way to show the fight against CO2 :D

So I guess the problem is coming from me because I have the following results:
- Firefox: 55 FPS/20-25% CPU (with sometime drop to 5FPS with 5% CPU)
- Chrome: 60 FPS/8% CPU
- Opera: 60 FPS/15% CPU

It a bit better with Chrome then but still much more than you (and I have a great computer (P35W v2 Gigabyte))...

So, how do you get 1% of CPU usage????
Is there something special to do or just the regural export???

Thanks so much for the answers.
B
6
S
1
Posts: 29
Reputation: 529

Post » Wed Sep 10, 2014 11:19 pm

I don't know where is the problem coming from...

In my PC with an old intel core 2 quad I have the following stats:

Firefox: 58-60 fps, 0-2% cpu.
Chrome: The same as above
IE11: 60-67 fps (!). 4-7% cpu.

Please mind that I also play the game in a 2660-1440 monitor and it is huge in size (since you have set the game to letterbox scale) and even at this resolution I have no problems.

Perhaps something is up with your graphics card? Have you installed the latest drivers?

I read your code and I didn't find any loopholes or something. Everything looks like it won't cause any problems. I think that your event sheet will greatly improve if you use families (include all enemies to one family for example), and some actions could be made calling a function. Also, you could use very small sprites and lessen the download size and since the game's aesthetic is pixel art, it could benefit from point sampling and pixel rounding (at the project settings/parameters). Also, try not to use too many sprites if you can avoid it. You can use the same sprite with an instance variable to check for collisions, also, the life bar system can be replaced with a single tilledBG object. And finally, use actions to create/spawn the enemies, you don't have to use placeholder sprites: See the events 16 and 36 inside the attached capx.

Cheers
You do not have the required permissions to view the files attached to this post.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Mon Sep 22, 2014 6:34 pm

Hi there,

Sorry for the late but I couldn't worked on my game this week :ugeek:

So I manage to do everything to told me to optimize my game and that works brilliant ! I even make the sprite in low rez all over again!
The only thing I haven't done is about the respawn of the enemies (because I don't really understand your solution :roll: )

I'm still have 10-20% of CPU consumption but frame rate is great.

So now I still have to figure how to post a score on Facebook and to store highscores online... 90% done still 90% to go 8-)

Thanks and cheers
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 29
Reputation: 529

Post » Mon Sep 22, 2014 9:55 pm

The part with the respawn is using a loop, it's just a way to do something in few events and it makes the need of the placeholder sprites (and all the hustle arranging them) obsolete. It's not nothing necessary, although all those placeholder instances might add a few draw calls that tax the CPU a bit. But If the framerate is great, all is good :)

As for the web storage and Facebook stuff, I know nothing about these subjects yet, so I can't help unfortunately. I a m sure that there are tutorials for high scores though, try to search the tutorial section on the forum.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests