Multiple resolutions - solid example

Forum Home Forum Home > Construct 2 General > How do I....?
 Post Reply Post Reply Page  123 4>
Author
9,714 Rep
Post Options Post Options   Quote gammabeam Quote  Post ReplyReply Direct Link To This Post Topic: Multiple resolutions - solid example
    Posted: 26 Mar 2012 at 2:13am
Hi folks!

I'm working on a skeleton project so I don't have to start things from scratch everytime I'm working on a project.

Today I came up with a nice solution for multiple resolutions, avoiding those annoying black bars no matter how stretched your screen is.

It is also ready to be used no matter the orientation: You just have to change the layout sizes to a portrait orientation (say, 640x960).

Hope it helps! I still have a lot of things to add on the skeleton (level selector, sound options, facebook integration), but this is was a nice start, so I wanted to share it with you.

See ya!


EDIT:
LOLOLOLOL Forgot the link:
http://dl.dropbox.com/u/7324985/multiple_resolution.capx

Edited by gammabeam - 26 Mar 2012 at 2:17am
Back to Top

Scirra Developer
78,602 Rep
Post Options Post Options   Quote Ashley Quote  Post ReplyReply Direct Link To This Post Posted: 26 Mar 2012 at 2:31am
Link is a 404!
Back to Top
9,714 Rep
Post Options Post Options   Quote gammabeam Quote  Post ReplyReply Direct Link To This Post Posted: 26 Mar 2012 at 2:34am
Whoops forgot to enable Dropbox Sync!
Done!
Back to Top
9,714 Rep
Post Options Post Options   Quote gammabeam Quote  Post ReplyReply Direct Link To This Post Posted: 28 Mar 2012 at 10:42pm
UP
Did anyone even see this?

I've tested over different iOS and Android devices, and it is working very well!
Back to Top
2,241 Rep
Post Options Post Options   Quote FredQ Quote  Post ReplyReply Direct Link To This Post Posted: 28 Mar 2012 at 11:02pm
I hadn't seen this. Thanks for the bump.

It sounds like exactly what I need. Will download. Thanks.
Back to Top

Scirra Developer
78,602 Rep
Post Options Post Options   Quote Ashley Quote  Post ReplyReply Direct Link To This Post Posted: 28 Mar 2012 at 11:48pm
Nice demo, that's how it's meant to be done :)
Back to Top
5,530 Rep
Post Options Post Options   Quote 0plus1 Quote  Post ReplyReply Direct Link To This Post Posted: 11 Apr 2012 at 11:26pm
This should be sticky, I wish I'd seen it before..
Why are you setting this: "(LayoutHeight * scaleRatio - WindowHeight) / 2 / scaleRatio" technically the result would always be 0? Or am I missing something?


EDIT: Also how is it that the element in your canvas stay magically centered?

EDIT2: Disregard that I'm stupid, I didn't see the unbounded scrolling

Edited by 0plus1 - 11 Apr 2012 at 11:47pm
Back to Top
9,714 Rep
Post Options Post Options   Quote gammabeam Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 2012 at 10:03am
Yes, unbounded scrolling must be on so this can work :)

I've made this example but hadn't used it since, so let me know if you find any bugs or weird behaviors.
Back to Top
1,308 Rep
Post Options Post Options   Quote Thunder Quote  Post ReplyReply Direct Link To This Post Posted: 15 Apr 2012 at 6:28pm
Thanks for the info gammabeam

@Ashley
I'm still running into the same problem with scale. Maybe this will explain.

FullScreenTest.capx

Edited by Thunder - 15 Apr 2012 at 7:44pm
Back to Top

Scirra Developer
78,602 Rep
Post Options Post Options   Quote Ashley Quote  Post ReplyReply Direct Link To This Post Posted: 15 Apr 2012 at 7:48pm
@Thunder, aren't you just missing the layer parameter for the Touch.X/Y expressions?

Both mouse and touch take an optional layer parameter, e.g. Touch.X("Layer 1"). If that's not provided, the returned value does not take in to account any layer's scale.
Back to Top
 Post Reply Post Reply Page  123 4>

Forum Jump Forum Permissions View Drop Down