How do I Set Adaptive Resolution ?

Get help using Construct 2

Post » Tue May 13, 2014 7:16 pm

So I want to port to Android using cocoon js, the question is how to set adaptive resolution as we know Android phones come in different resolution like 1280x720 or 845x480
I've tried using the resolution 1280x720 but when tested on my Android phone which using the same resolution, the game output is diferrent, some objects located too left of the screen

Also, why my button object is not showing up when porting via cocoon js, but it show up when using intel XDK?
thanks
B
8
S
2
Posts: 203
Reputation: 1,169

Post » Tue May 13, 2014 9:31 pm

Don't use button objects as they are different depending on the platform. Use a sprite as your button and use the touch object to detect touches on it.

For the screen issue there are plenty of posts on the forums about it. Use request fullscreen and one of the scaling modes (scale outer, letterbox, etc...). You want to make your layout sized to fit the smallest screen size you plan to support, but enough overflow (surrounding graphics) to cover larger screens as well. @ArcadEd has a great tutorial on this on Udemy.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,573

Post » Wed May 14, 2014 2:08 am

BluePhaze wrote:Don't use button objects as they are different depending on the platform. Use a sprite as your button and use the touch object to detect touches on it.

For the screen issue there are plenty of posts on the forums about it. Use request fullscreen and one of the scaling modes (scale outer, letterbox, etc...). You want to make your layout sized to fit the smallest screen size you plan to support, but enough overflow (surrounding graphics) to cover larger screens as well. @ArcadEd has a great tutorial on this on Udemy.


i've viewed his video
and what i got is that we need to guide the screen focus to the middle of our layout so when we scale it outer, it still cover the screen, right?

also, what's the best resolution for android games ported using cocoonjs?
I mean the layout and the window size and fullscreen mode
thanks
B
8
S
2
Posts: 203
Reputation: 1,169

Post » Wed May 14, 2014 2:34 pm

Shameless bump!
B
8
S
2
Posts: 203
Reputation: 1,169

Post » Wed May 14, 2014 3:36 pm

There is no "Best Resolution" you should check the tutorial on supporting multiple screen sizes. Coding for one size is bound to lead to frustration, instead assume a lowest common denominator and just make sure it scale up from there.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,573


Return to How do I....?

Who is online

Users browsing this forum: lolsuperscratch, RobertMKD, tarek2 and 10 guests