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

Get help using Construct 2

Post » Sat Mar 21, 2015 4:56 am

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.
B
9
S
2
Posts: 111
Reputation: 1,010

Post » Sat Mar 21, 2015 5:50 am

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.
'Good' gameplay is gameplay that gets the effect you want.
Want to make a game with me? Come here!
My example capxs
My Game Art 'Portfolio'
B
32
S
9
G
1
Posts: 136
Reputation: 3,257

Post » Sat Mar 21, 2015 9:00 am

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.
composer - multimedia artist
www.eli0s.com/en/
B
65
S
26
G
4
Posts: 1,145
Reputation: 9,572


Return to How do I....?

Who is online

Users browsing this forum: Masked Misery, Yahoo [Bot] and 11 guests