How do I Set Adaptive Resolution ?

0 favourites
  • 5 posts
From the Asset Store
A whole set you need to create a gorgeous winter 2d game
  • 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

  • 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.

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Shameless bump!

  • 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.

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