Best way to actually support multiple res?

Get help using Construct 2

Post » Tue Dec 17, 2013 1:28 am

Hey all,

Recently Scirra added a new feature where the game can render to a smaller canvas, then scale up to fit the screen. This is helpful in instances where a computer has a big screen but a weaker graphics card - some of them have trouble drawing the whole window.

However, just by itself this feature is limited as you are basically stuck between two resolutions: native screen resolution, or the game's native resolution (i.e. the window size). I'd love to support a range of resolutions, and I'm fine if they are all using the same aspect ratio. How can I go about this? I assumed that something like using 'set canvas size' along with 'set layout scale' to scale out a certain amount, but that doesn't seem to work for me.

Any tips?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Post » Wed Dec 18, 2013 12:30 am

*bump*
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Post » Wed Dec 18, 2013 10:49 am

When I was coding for iPhone with Xcode or even in Gamesalad I had my artist make all artwork to the power of 2, so it could be upscaled. However even when we was making for a 960x640 or even older 320x480 all of our vector work was created at much higher scales. This allowed you to easy put a build out for 4s, 5 and iPad without too much work.

In C2 I have been testing (and I am a noob at c2) but it has familiar elements that I have grasped rather fast. I have been looking at the resolution and aspect ratio. So a game made at 1280x720 is native 720p and will look perfect on all screen in the 16:9 ratio but letterbox on a 4:3 even at high resolutions like 1680x1050.

So targeting a aspect ratio is easier then a set resolution, and the stance we have taken is most devices be it smartphones or tablets adopt funny resolutions but tend to be 16:9 widescreen ratio.

A simple test sheet would be to draw a background image with the corners highlighted and test it across multiple devices and browsers. This will show you if the image fits and if the aspect ratio is correct and does not distort the image. Don't forget that just because it fits it may not look correct.

I hope that helps a little. If you require ill post a test .capx that will assist you as discussed.

Keithappchogie2013-12-18 11:04:49
B
6
Posts: 13
Reputation: 376

Post » Wed Dec 18, 2013 10:56 am

Oh and by the way Airscape is amazing! I don't wish to teach you how to suck eggs! as you are clearly a talented developer. appchogie2013-12-18 10:56:22
B
6
Posts: 13
Reputation: 376

Post » Wed Dec 18, 2013 12:10 pm

Isn't supporting a range of resolutions with the same aspect ratio just the same as "letterbox scale" mode?
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,464

Post » Wed Dec 18, 2013 1:57 pm

@Ashley the difference comes in how many pixels are actually rendered by the GPU. I want the ability to compromise number of pixels (resolution) for game speed.

For instance, I was trying the game out on a 1080p laptop with integrated graphics and the game ran slowly because apparently the graphics card simply couldn't push that many pixels. In such cases, the player should be able to select a lower resolution, keeping the fullscreen experience but with a slightly lower image quality.

'Letterbox scale mode' I guess would be called 'auto' resolution because it adjusts to the resolution of the screen.

@appchogie haha, no worries mate. We're all learning and we can all learn things from each other ;)
However yes, you may have missed that my problem is GPU capability, not screen geometry.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Post » Wed Dec 18, 2013 2:26 pm

so are you asking to be able to change the res output of the video card.. like with non-browser games?
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Wed Dec 18, 2013 2:50 pm

@keepee not exactly, however I guess it has a similar effect.

And yes, it's for a non-browser (node-webkit) game.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Post » Wed Dec 18, 2013 4:18 pm

Unfortunately 1X scale doesn't always cut it. For instance, objects can look very blurry when they get rendered at non-integer coordinates. While pixel rounding fixes that, it also introduces (comparably) choppy background scrolling as well as jittery sprite movement in some cases. Higher resolution settings would reduce the blur and still boost performance compared to maximum render scale.
B
38
S
16
G
6
Posts: 537
Reputation: 7,582

Post » Thu Dec 19, 2013 4:10 pm

Perhaps these image will make it a bit clearer:



The one on the left is the only simple available option ATM, and I'm looking for a way to implement the option on the right.



Does this make it clearer?sqiddster2013-12-19 16:11:39
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Next

Return to How do I....?

Who is online

Users browsing this forum: RetrocadeMedia, sebrosen and 32 guests