multiscreen cocoonjs

0 favourites
  • 15 posts
  • hello,my project 800x480,for full screen I use crop. on my the tablet all is working well,but on devices with higher resolution,is not working properly and not the entire screen:(how to solve the problem??

  • Try setting it to full screen Scale, and unbound scrolling to Yes. Then if your game still doesn't fill the entire screen try making your background larger than your games Layout size. You can also make other layers sprites extend beyond your games Layout size if needed. Sometimes it just takes some trial and error, and a lot of testing to get a game to fit full screen in all resolutions.

  • in general there is no real method

  • Well there is this method:

    Multiple resolutions - solid example.capx

    But to be honest I haven't had much luck with it other than just the background. And if you already have a completed game I think this would be quite difficult to implement into it. But if you can please share how you did it with the community, I'm sure a lot of members would like to understand this method better.

  • I tried this method, it does not work for me:(would be even possible to use letterbox scale,but it does not work here.

  • Letterbox scale would leave two black bars either on the sides of your game, or on the top and bottom. I'm not sure if CocoonJS supports letterbox scale you might want to contact them about that.

    This is what I do, and it works well with CocoonJS.

    First in the layout properties window I set Unbound scrolling to Yes. Then I make the background size much larger than the layout size like this:

    <img src="" border="0" />

    After that in the project settings properties window I set Fullscreen in browser to Scale mode. Here you can see how I extended the background and sprites much farther than needed past the layout size:

    <img src="" border="0" />

    This ensures that it will fill the screen completely no matter what resolution the device has.

    Depending on the type of game you make you might have to modify these settings differently per layout. For example if you make a platformer you will want to use the settings above for the start page, and any layout that is the same size as your Window size. This will keep everything centered on your devises screen.

    But for your platformer levels, layouts which are usually quite long you will want to set Unbound scrolling to NO. This will keep your platformers level starting area tight up against the left side of your devises screen filling it completely, keeping it looking nice and professional.

    Like this:

    <img src="" border="0" />

    I also use to find this very frustrating but after you get it working your next game will become easier to do.

    This might not be a so called "real method" but it works.

    I hope this helps

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much, I'll try

  • how to incorporate on(scale mode)

  • I think I made those games with an earlier version of Construct 2. on(scale mode) has been changed to just Scale. So set it to Scale, and it will do the same thing as on(scale mode) did.

    Like this:

    <img src="" border="0" />


    I almost forgot to mention you also might have to set the Parallax to 0 in the Layer properties window when Unbound scrolling is set to Yes on certain layers.

    For example I just started working on this drop type game were my layout size, and window size are exactly the same and I have endless platforms constantly moving upwards. So in order for all my sprites to show in there correct positions I had to set the Parallax to 0.

    <img src="" border="0" />

  • Hey thanks for the really detailed explanation I haven't had an issue with my game in Galaxy s3 but I have noticed a minor issue in s2.

    I am going to compare my settings against what you suggest. Maybe you should make this into a tutorial?

  • Your welcome NewSkool I'm glad it was helpful. If your having issues with your game supporting multiple resolutions just let me know, and I would be happy to help you out if I can.

    I have been thinking about making a tutorial on this subject since so many people have problems with getting there games to support multiple resolutions.

    Right now I am very busy. I am in the proses of polishing up all my simple prototype games I made last year. I'm trying to get them to production level quality so I can get them out on the Android market place since I believe Construct 2, and CocoonJS has matured enough for this now. Well that, and the new devises out on the market are defiantly ready.

    Perhaps when I have a little more free time I will try to write something up.

  • THANKS, fixed my menus !

  • Wink, I noticed that in your example and in multiple resolution solid example you used On (Scale mode) and then Scale for the updated C2. But for the latest version, I can mo longer find it. Instead I can only find Scale inner and scale outer. How do I implement this using the latest C2. Thanks

  • Wink, I saw your tutorial for resolution on all devices, plus the C2 has only Scale mode, there are some others like to do? You can send a sample Capx? Thank you! you can send an example Capx via dropbox to get a better sense?

  • is there a possibility to "transform" the layout? In my game i have control panels in each corner and i have "boundries" on each end of the layout, so i can't make my layout bigger than my screen size and I would like to stretch it so it's full screen on every device (sometimes it might have a strange aspect ratio but i dont mind. If not, what is the best Aspect Ratio for Android tablets in your opinion? Do you guys too develop your game for the best possible resolution and then scale it down for other devices?

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