window size and optimization

Discussion and feedback on Construct 2

Post » Thu Feb 06, 2014 3:45 pm

Hey guys, so im trying to optimize my game, I have read pretty much all the posts and tutorials on optimization. I had one question though and its something that people havent really mentioned in the posts or tutorials.

Does the size of the window affect how well a game runs. Making a game 768x1024(using scale outer)vs 320x480 (also using scale outer) to make it fit the screen. Is there a big difference in performance. I have made my game using the bigger resolution and changing it now would be a lot of work. But I really need the game to be efficient.

thanks a lot for any input
B
8
S
2
G
1
Posts: 64
Reputation: 1,340

Post » Thu Feb 06, 2014 6:34 pm

Great question! Hopefully, somebody else has already tested this and can let us know.

The same amount of pixels would be drawn in either case. So, I think it may depend on how well the particular browser scales the canvas versus not having to scale at all.

Would you be able to copy your entire project, and test the different dimensions in the copy?danialgoodwin2014-02-06 18:35:45
B
20
S
4
G
1
Posts: 185
Reputation: 2,563

Post » Thu Feb 06, 2014 6:53 pm

The bigger your native game resolution, the bigger the rendering/performance hit!

320x480 is still a 1.33:1 (4:3) ratio, so it will fill the screen the same as your 768x1024 game would (with less pixel density/graphical fidelity), but due to the increased resolution, the draw calls are going to be much more intensive.

That is because 320x480 is 153,600 pixels, and 768x1024 is 786,432 pixels! Over 5 times as many pixels!

Thus, a game designed a 320x480 will run many times faster than the same game at 768x1024 at the cost of graphical fidelity.

I actually just made a utility to help gauge this type of thing.

Here's a link to my resolution utility

What this utility does it show you based on layout size how much your game will scale up or down from it's native, intended resolution to fit the device it is running on.

If you open the portrait version, the layout is actually already set to 768x1024 (4:3 - iPad res) so you can test with the portrait HTML5 link to get an accurate idea of how your game will scale.Sigmag2014-02-07 17:26:03
ImageImageImage
B
16
S
3
Posts: 45
Reputation: 2,188

Post » Thu Feb 06, 2014 7:08 pm

I can test maybe a few levels. Would have to import art in new sizes as well. But I have 40 levels so doing it for all of them would be a lot of time spent on it. So before I do it would be great to hear from the pros to see if its worth it. Im making a web game thats meant to run on mobile. clients want it to run on super slow and old hardware. I can only test on the 1st ipad since thats the oldest hardware I have. So any info would be much appreciated.
B
8
S
2
G
1
Posts: 64
Reputation: 1,340

Post » Thu Feb 06, 2014 7:11 pm

@sigmag Ur awesome!!!!!thanks for the reply. I'm actually using pixel art so I dont think it will look that bad with the loss in graphic quality. Again thanks a lot for the answer it makes sense and for your utility :)
B
8
S
2
G
1
Posts: 64
Reputation: 1,340

Post » Thu Feb 06, 2014 10:07 pm

@ronval

If your game runs ok right now on the iPad 1, then you might be ok - since iPad 1 is an old device. But if your clients want you to have a game that runs really well on old hardware, the smaller resolution is usually the way to go, ESPECIALLY if they want it primarily for phones. If they want it primarily for tablets, you have to weigh the pros and cons of each to fit your situation.

I know I wouldn't want to redo all that work either! :X

I'm glad I was able to help.
ImageImageImage
B
16
S
3
Posts: 45
Reputation: 2,188

Post » Thu Feb 06, 2014 10:54 pm

@ronval this is also why there is a new feature for fullscreen scaling, if set low quality, it first renders the canvas at whatever windowsize your game is set and then rescales the canvas to fit screen, this improves performance a great deal,because it skips al that extra pixelinformation if it set to high, it renders at the higher resolution of the fullscreen
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Fri Feb 07, 2014 2:07 am

So it would be even more beneficial if I do what sigmag says and put it in low quality or does setting it in low quality already do what sigmag says? Im assuming you should do both at the same time. Clients are wanting games to run on iphone 3gs, samsung galaxy y. Which are really crappy phones so any performance from the way things are drawn is a must.
Thanks a lot for your input
B
8
S
2
G
1
Posts: 64
Reputation: 1,340

Post » Fri Feb 07, 2014 5:00 am

well, i could be wrong about this, but if high quality first scales, and then renders, you're still running on a pretty high resolution, no matter how small you're stage is, you are saving on texture space (if your objects are not scaled)

so i would say you should do both, for best performance

+ setting high dpi screens to no, actually if you don't scale you objects, this probably doesn't have an effect.

if you put a higher resolution objects and scale it smaller, on high dpi, it will show the details of the higher one.

but the best way to know is to do small tests, try some different settings,

but low quality scaling and no high dpi, should give you best performance, combine this with a smaller layout and you're set
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Fri Feb 07, 2014 5:00 pm

The project 'Window size' property has no direct effect on performance in 'High quality' fullscreen mode, assuming the same content is displaying. It results in exactly the same rendering work. It's only faster to use a smaller window size in 'Low quality' fullscreen mode, where it first renders to a smaller size (which is faster), then stretches the result up (which is quick).
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests