Why is the level not clipped?

0 favourites
  • 13 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • I've just read through the manual to understand what the different fullscreen modes do. I am just a little bemused at the behaviour of "On (crop mode)". I get that it increases the view of game instead of scaling. What I don't get is why it expands beyond the bounds of the layout. I see no reason to even bother with a layout size in this instance where I can render objects outside the layout. My expectation was that it would clip around the layout based on the specified size (so things outside the level aren't visible). Is this a bug?

  • It is really designed for when the layout is larger than the window size. Otherwise, why not just turn off fullscreen in browser if you want it to clip?

  • Well, the difference is that the view expands but not beyond the frame boundaries. Why would I want it to expand beyond the frame boundaries? If I turn off full screen there is no expansion at all.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Increase your window size and keep the non-fullscreen in browser setting if your layout is smaller than your browser window size and you do not want to scale.

  • So I can dynamically resize the window based on the browser width/height? Yeah sure I can do that, but it's not really the point though. I don't have a logical explanation for the expansion beyond the frame size. Who would possibly want this? That's the question.

    Or rather I should say, sure keep the canvas at full screen in the browser (which makes sense), just don't render outside the bounds of the current frame. Align vertical/horizontal centre when the frame is smaller than the size of the canvas.

  • I think very few people actually use the crop mode, because the scale modes (especially with aspect ratio preserving) are much more useful.

    The opposite question is: why should crop mode limit the view to the size of the layout? The intent of crop mode is that the viewport size is simply exactly the same as the window size, so there is always one pixel in the layout for one pixel on the screen with no extra scaling or cropping applied so you can handle screen sizing yourself with your own logic. I think if it automatically cropped anything it wouldn't be achieving this goal.

  • Why should crop mode limit the view to the size of the layout?

    Well ok I should probably make myself more clear. No view mode should render outside the layout in my opinion. Give me a good example of where anybody would want to render outside the frame, and I might reconsider asking for an option to turn it on/off.

    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. I start to see everything that lives outside the frame, which

    is not desired in any case. So first of all, crop mode is not fit for

    purpose in this case. However, when I play on a 320 x 480 mobile

    device, the crop behaviour works perfectly.

    If you can't understand why I don't just upscale, you clearly never worked with a pixel artist.

    All I am saying is that expanding beyond the limit of the frame isn't

    useful to anyone and it makes sense to clip to the frame size, because

    displays can be larger than the frame.

    Moreover, assuming it were useful to render outside the frame, the behaviour of objects outside the frame area is inconsistent with objects in side the frame area. Suppose I have a single sprite that is scrolling to the right. If I move the sprite down too far outside the frame it stops scrolling. Its still rendered. I'm rendering inactive objects.

    I just don't expect anything to render outside the frame ever. This area is where visually bad stuff can happen. That's the whole point of the frame is it not? You can also be more efficient with rendering by doing this (assuming construct applies any sort of basic spatial querying).

    The notion of "crop mode" is still valid if you don't render contents outside the frame.

    Who wants to rely on a screen size being smaller than some arbitrary

    size? I'd rather not rely on the screen size being smaller than the

    frame, but I want the crop behaviour on screens which are smaller than

    the frame size. I can't imagine anybody wanting the current behaviour.

  • Is this not reason enough to expect an update on it?

  • o.o i didn't understand anything :) put some pictures

  • 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.

  • Sorry for the late reply - I missed this thread.

    Give me a good example of where anybody would want to render outside the frame

    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.

    ou 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.

    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.

    owever, when I play on a 320 x 480 mobile

    device, the crop behaviour works perfectly.

    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.

    f you can't understand why I don't just upscale, you clearly never worked with a pixel artist.

    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.

  • ou 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.

    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.

    enerally 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.

    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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)