Why is the level not clipped?

Discussion and feedback on Construct 2

Post » Fri Jun 08, 2012 10:31 pm

Tutorial supporting multiple screen sizes.
Sounds like you're looking for the scale mode in fullscreen.

Not indicated in this tutorial but you now have access to also "letterbox scale" and "Letterbox integer scale" which do render only the size of the project window size.

Also the fact that more of the layout can be rendered is there to deal with wide screens when the project's size is planned for 4:3 ratio.

New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Fri Jun 08, 2012 11:13 pm

Sorry for the late reply - I missed this thread.

[QUOTE=mcduck]Give me a good example of where anybody would want to render outside the frame[/quote]
Set 'Unbounded scrolling' to 'Yes' in layout properties and you can scroll anywhere, such as to make infinite sized worlds or continually procedurally generated levels.

[quote]You know we have to support a whole ton of screen sizes, but what
happens when I want to render say, a max 640 x 480 area on 1920 x 1080
screen.[/quote]
You wouldn't use crop mode for that - you'd either turn the browser fullscreen option off entirely (so the canvas is just centered in the page), or use a scale mode, possibly with letterbox.

[quote]However, when I play on a 320 x 480 mobile
device, the crop behaviour works perfectly.[/quote]
Generally you should not use crop mode on mobile. Consider the iPad 2 and iPad 3, both which have the same size physical screen but one is double the resolution of the other. Using crop mode all your sprites will appear half as big on the iPad 3, and show twice as much of the layout, which is probably unwanted.

[quote]If you can't understand why I don't just upscale, you clearly never worked with a pixel artist.[/quote]
Try using letterbox integer scale mode with point sampling - it should preserve every pixel as an integer-sized box.

In practice 'crop' mode is not actually really useful for anything, given the problem of using it on mobile. Every other scaling mode is more useful. I'm not sure anyone uses it, but it's kind of there just as a backup option in case everything else fails and you just want complete control of every pixel you're given.

Hope that helps clear up the intent behind the feature.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,554

Post » Sat Jun 09, 2012 12:52 pm

[quote]You wouldn't use crop mode for that - you'd either turn the browser fullscreen option off entirely (so the canvas is just centered in the page), or use a scale mode, possibly with letterbox.[/quote]

Yes, if that's all you were doing then I agree with you, but I think you missed the point. I am suggesting that the crop mode with frame clipping works in all environments, from the small scale up to the large.

[quote]Generally you should not use crop mode on mobile. Consider the iPad 2 and iPad 3, both which have the same size physical screen but one is double the resolution of the other. Using crop mode all your sprites will appear half as big on the iPad 3, and show twice as much of the layout, which is probably unwanted.[/quote]

I'd have to disagree. Common practice in the mobile dev world is to not upscale images but to hand-produce various versions of the images at different resolutions. Upscaling the level so that its an integer multiple is good but its not the same thing as producing multiple versions and cropping the window to fit. This multiple versions approach obviously yields a maximum and minimum resolution. While its probably safe to assume that the lower limit is sensible, I don't think that its right to assume an upper limit. Given that this is a no-scale option, you would just want the frame to center itself in the window. Clipping around the frame provides a one size fits all solution.

The point about wrapping, that is a fair point I guess, but isn't it just that? It's wrapping the frame. Its rendering contents that are inside the frame, you have just wrapped it around. That doesn't mean you are rendering contents outside the frame, you are rendering contents inside a virtual frame.

I can see the point in wanting to be able to control the entire canvas. I don't understand why you have chosen to call it "crop" mode.mcduck2012-06-09 12:54:31
B
7
Posts: 24
Reputation: 590

Post » Sat Jun 09, 2012 3:26 pm

I always thought a better way to develop for mobile would be just to design your game once for high resolution (iPad 3) and use the scale mode to resize it down for other devices like the iPad 2 (so downscaling, not upscaling). This also has nice side benefits like if you zoom in or resize sprites bigger on iPad 2, they get more detailed. And it means you can have a single project with one set of artwork rather than having to have a separate project for each platform you want to target. Is that preferable to downscaling?

I'm not sure you understood unbounded scrolling properly - it doesn't wrap round the layout, it allows you to scroll in a straight line past the edges of the layout as far as you want. So it's quite important then that things outside the layout area are rendered.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,554

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: TRMG, Zebbi, zenox98, Zonacas and 1 guest