SHAKING: Difference between "window size" and "layout size"?

0 favourites
  • 3 posts
From the Asset Store
Great Game to help children improve their abilities and speed in solving problems (Full Source-Code / Construct 3).
  • What exactly is the difference between "window size" and "layout size?"

    I generally just have both of them to be exactly the same: 640 by 480. I never figured out what the difference was between the two and I never really found a need to care. My crappy games seemed to work fine on various computers, and also on tablets after being downloaded from Amazon. I also always set the margins to 0,0 since I never figured out a use to have margins anyway. As you can tell, I am definitely a novice and don't really have a clue what the heck I am doing.

    The only real reason I'm asking now is because I am trying to have the screen shake by using the "scroll to" effect. And evidently the only way to do that is to have the layout size larger than the window size. (I cannot use the 'unbounded scrolling' option enabled because it screws up the placement of my graphics -- I'm guessing because I generally have graphics float in/out of the screen).

    Without getting into the specifics and likely confusing me even more, could somebody simply let me know what the precise measurements should be generally when creating a game for tablets for both the "window size" and "layout size" so that I can easily use the 'shake' effect without complicating things terrible. I'm guessing the same measurements can be used pretty much all the time.

    Thank you greatly in advance.

  • Well, it's kinda simple with most of that, it's window size that gets me all the time.

    Window size is literally how big the game window is. It's a good idea to match this with the resolution of the device (or at least aspect ratio).

    Layout size is how big your game world is. The bigger it is the more you'll have to scroll around to see all of it.

    Margins I'm not too sure, but I think it's just so that you can zoom in and look at corners still.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's what Sumyjkl said. Margins have purpose only within the editor. Supposedly, you use the margin space to "park" all of your game objects (sprites, text, etc) if you wish so.

    An example will be to have an explosion sprite outside the layout (within the margin space) and call it at runtime with actions.

    Of course, you could use a separate layout to store all of your game assets and keep each level layout clean.

    However, having a large margin number also allows for greater zoom out on the editor, and for me that's the most useful thing about them.

    -EDIT- I've noticed that you are mentioning shaking at the title of this topic. If you actually ask about the shake action of the scroll to behavior, then the layout size/window size does have an affect: in order for the "camera" (the window) to shake, the layout size must be bigger that the window size.

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