Question regarding window size

Get help using Construct 2

Post » Wed Jan 11, 2012 6:56 pm

So I have a game where I want to spawn objects right outside of the screen and have them move across it. The problem I'm having is exactly how I should go about determining where to spawn the objects. I've tried spawning them using the layoutHeight and Width properties but in fullscreen scaled mode it ends up spawning them inside the window. When I use windowHeight and Width it spawns them inside when in windowed mode and much too far outside when in fullscreen mode. I want my game to work on all screen sizes consistently and it doesn't seem to be possible. I've ran all my tests in full screen scaled mode.

I included my

capx

Thanks for any input.
B
16
Posts: 15
Reputation: 630

Post » Wed Jan 11, 2012 7:51 pm

I've tried your capx, all seems to work accordingly to what you expect with windowWidth/Height, in fullscreen as not in fullscreen.

I'm not sure what you need support for here.
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 » Wed Jan 11, 2012 8:00 pm

Well the issue is that some of the lilypads are spawning off of the screen, or further away than they should be. I know it's not the values I'm using because I tried the same expressions with a fixed window size in non full screen scaled mode and they worked fine. Could this possibly be because I have a wide screen monitor?
B
16
Posts: 15
Reputation: 630

Post » Wed Jan 11, 2012 8:45 pm

lilypadding.capx
WindowWidth and WindowHeight are the real size of the display. either you put fullscreen on scale or crop mode, if you have a 1920 by 1080px like me (who has bought a dual screen 2x24" recently and can't seem to stop to brag about it) WindowWidth will be close to 1920 with a browser properly stretched.
But the value you want is 640 since you scale to fit the display.
If you were in crop mode you would use WindowWith, but there you have to create your own variable with 640x480
Last edited by Yann on Sun Sep 14, 2014 10:12 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Jan 12, 2012 4:53 pm

I get what you're saying Yann, so how would you suggest I set up my layout and window properties so that the game works properly and scales to correctly spawn lilypads just off the screen on any display? Should I set the dimensions based on the smallest resolution I want to display (mobile devices) and stretch it?

I'm just not sure what the issue is. I tried changing the dimensions to the actual resolution of my desktop (1366,768) and it says the pads are spawning at x = 1398, but they are still spawning inside the window noticeably. Could this possibly be a bug with the scaling feature?jtlindeman2012-01-12 17:08:18
B
16
Posts: 15
Reputation: 630

Post » Thu Jan 12, 2012 10:26 pm

I honsetly don't know. I have to admit that I don't really know how fullscreen modes are calculated, by providing a capx in my last post I thought I found out, but it seems that there still was issue when kyat tested it.
So you can try your chance in a bug reporte or we could directly ask @Ashley here about this
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Fri Jan 13, 2012 12:21 am

Well thanks for taking the time to look into it. For the mean time I'm going to stick with a strict layout size and not run in full screen that way I can least continue to work on the mechanics of the gameplay. My main concern is how will various screen sizes and resolutions on mobile devices affect this, as my end goal is to turn this into a native phone app at some point.
B
16
Posts: 15
Reputation: 630


Return to How do I....?

Who is online

Users browsing this forum: emoticon, MrWhizm, Skebab and 16 guests