ForgeableSum Posted September 24, 2016 Share Posted September 24, 2016 I've noticed that when you set the game to even a significantly lower resolution (e.g. .4), there is zero performance gain. You would think the renderer was doing less at lower resolutions, so why isn't there a performance gain? Link to comment Share on other sites More sharing options...
Arcanorum Posted September 24, 2016 Share Posted September 24, 2016 I get a performance gain from going from 800x600 to 800x450. The FPS is capped at 60, so you wont see an improvement if it is already at that. Link to comment Share on other sites More sharing options...
ForgeableSum Posted September 24, 2016 Author Share Posted September 24, 2016 I'm not talking about the size of the game world (size of the renderer). I'm talking about resolution. Link to comment Share on other sites More sharing options...
ForgeableSum Posted September 27, 2016 Author Share Posted September 27, 2016 Anyone? Link to comment Share on other sites More sharing options...
ForgeableSum Posted October 14, 2016 Author Share Posted October 14, 2016 Really curious about this one. bump. Link to comment Share on other sites More sharing options...
Mike018 Posted October 14, 2016 Share Posted October 14, 2016 I'm confused about this question. Isn't the performance gain from using lower resolution graphics to fill the game world? Wouldn't any size game world have about the same performance if it wasn't populated with graphics? Link to comment Share on other sites More sharing options...
mattstyles Posted October 14, 2016 Share Posted October 14, 2016 17 minutes ago, Mike018 said: Wouldn't any size game world have about the same performance if it wasn't populated with graphics? Not at all, rendering is only one piece of the puzzle and GPU's are designed to take that strain. For example, a war game with 10k independent, thinking, units will potentially run slow even if you render nothing at all (pathing, for example, is traditionally very expensive). AI is often a bigger bottle neck than rendering but there could be many things which slow the perceived speed of a game, some things off the top of my head: Network latency, poor coding leading to redundant structures or inefficient algorithms being relied on, AI, monitoring etc etc Link to comment Share on other sites More sharing options...
samme Posted October 14, 2016 Share Posted October 14, 2016 On 9/24/2016 at 7:32 AM, feudalwars said: I've noticed that when you set the game to even a significantly lower resolution (e.g. .4), there is zero performance gain. Set what to 0.4? Link to comment Share on other sites More sharing options...
ForgeableSum Posted October 14, 2016 Author Share Posted October 14, 2016 The game resolution: http://phaser.io/docs/2.6.1/Phaser.Game.html#resolution It's an integer that can be changed before booting the game (webgl/canvas feature). Link to comment Share on other sites More sharing options...
Fatalist Posted October 14, 2016 Share Posted October 14, 2016 You probably have too many sprites or too many draw-calls. Link to comment Share on other sites More sharing options...
ForgeableSum Posted October 14, 2016 Author Share Posted October 14, 2016 4 minutes ago, Fatalist said: You probably have too many sprites or too many draw-calls. Nah, performance is the same with zero or very few sprites on the map. Nonetheless, if you had too many sprites, the performance should still be significantly better on lower resolutions ... especially if we're talking about something as drastic as .5 - in which the renderer only needs to render half as many pixels. We're talking about comparative performance here, not absolutes. Link to comment Share on other sites More sharing options...
Fatalist Posted October 14, 2016 Share Posted October 14, 2016 16 minutes ago, feudalwars said: Nah, performance is the same with zero sprites What is visible then, only tilemap? 16 minutes ago, feudalwars said: Nonetheless, if you had too many sprites, the performance should still be significantly better on lower resolutions Yes if in your game lower resolution means fewer sprites on screen, and you are culling the sprites that are outside the screen. But then the problem can be in your culling algorithm. Link to comment Share on other sites More sharing options...
ForgeableSum Posted October 14, 2016 Author Share Posted October 14, 2016 21 minutes ago, Fatalist said: What is visible then, only tilemap? Yes if in your game lower resolution means fewer sprites on screen, and you are culling the sprites that are outside the screen. But then the problem can be in your culling algorithm. Actually lower resolution doesn't mean fewer sprites on the screen. It's the exact same window of the game world except 4 pixels might be used to represent a single pixel. I know it's not the traditional way people think about resolution, but you can test in your game to find out. You'll see the exact number of sprites fit on the screen with .5 resolution as with 1 resolution. Link to comment Share on other sites More sharing options...
Fatalist Posted October 14, 2016 Share Posted October 14, 2016 6 minutes ago, feudalwars said: Actually lower resolution doesn't mean fewer sprites on the screen In that case, lower resolution may not increase performance significantly if, let's say, 90% of work is spent on preparing and sending vertex data as a result of a large number of sprites/tiles/Graphics/etc. Link to comment Share on other sites More sharing options...
ForgeableSum Posted October 14, 2016 Author Share Posted October 14, 2016 10 minutes ago, Fatalist said: In that case, lower resolution may not increase performance significantly if, let's say, 90% of work is spent on preparing and sending vertex data as a result of a large number of sprites/tiles/Graphics/etc. Here's my thinking. An older mac will run at 60 FPS with a game view of 800 x 800. Increase the size of the game view (camera view) and you're rendering more pixels at once, so and increase to say 1200 x 1200 might drop the FPS down to 40. Well, if I lower the resolution to .5, I should be rendering half as many pixels, so while the display may be 1200 x 1200, the renderer is only dealing with 600 x 600, and should run at 60 FPS. But it doesn't. The FPS is the same at 1200 x 1200 camera view regardless of the game resolution. This is with ZERO sprites and an empty game world, mind you. So my reasoning is, if rendering is the bottleneck (and you can be sure it is), why does a lower resolution not mitigate that? And why is it that in ZERO circumstances, does a lower resolution improve FPS? It goes against conventional logic which is that a lower resolution = less work for the renderer and therefore, better performance. Link to comment Share on other sites More sharing options...
Fatalist Posted October 14, 2016 Share Posted October 14, 2016 20 minutes ago, feudalwars said: This is with ZERO sprites and an empty game world, mind you. So you see only background color? Then resolution does not matter, any computer should be able to draw the background color many times over per frame at max resolution, there is something else that's eating the performance. Have you tried the profiler? Link to comment Share on other sites More sharing options...
ForgeableSum Posted October 14, 2016 Author Share Posted October 14, 2016 If you open up phaser in webgl mode on a 2009 imac, the fps drops to 30 when you increase the size of the game camera to something like larger than 800 x 800. Performance is just absolutely abysmal with zero objects in the game world. Performance is a little better in canvas mode, but FPS still drops the larger the game camera is. I am absolutely certain that nothing else is dampening performance as I have removed everything from the update look and creation state. I expect shit like this in Firefox but not on Chrome. My thinking is that it must be the renderer that is sucking up all the juice. but if that were true, why doesn't lower resolution improve anything? I feel like people who make game in phaser are only testing in the most optimal environments (e.g. tiny game camera on a newer windows machine) and that's why none of this stuff is ever discussed. Link to comment Share on other sites More sharing options...
ForgeableSum Posted October 14, 2016 Author Share Posted October 14, 2016 You can even see this happening in the phaser sandbox with 1 sprite in the world. Just increase the game world size to something like 1300 x 1300, and look at the chrome FPS meter: It drops to 30FPS with absolutely nothing in the game. Link to comment Share on other sites More sharing options...
ForgeableSum Posted October 16, 2016 Author Share Posted October 16, 2016 Well, I guess the conclusion is just that webgl doesn't work on older machines, like a 2009 imac. Link to comment Share on other sites More sharing options...
Recommended Posts