CocoonJs + Centering my game

0 favourites
  • 3 posts
From the Asset Store
five golem elements Sprites Sheet.Best for enemy or villain game characters.
  • *I can't speak English very well, not only because I'm Korean but also I haven't spoken English for decades now. So, please be patient and try to understand my question, not the grammar itself...

    Nice to meet you all.

    First of all, I would like to praise the software;

    the great game developing tool I have ever used.

    Well done, it is :D

    I gave up solving this riddle and came to post this thread which must end my misery(I wish that is, my friend :) ...)

    I did research and read the famous tutorial "How to support multiple resolution...."

    however, it didn't work.

    How can I center my game screen on android devices?

    Let me explain steps I have taken so far.

    1. Created a new "Cocoonjs" project

    2. Changed the project window size to "640, 480"

    3. selected "Letterbox scale"

    4. Saved and Exported as CocoonJs zip file.

    -------and it was time to upload and compile it for Android devices---------

    5. For my CocoonJs project setting I have selected "Landscape to Left" and "Scale to fit"

    6. Voila! it scales perfectly, yet not at the center.

    I will be waiting for your advice and help.

    Thank you.

    And again, this software is a master piece :D


  • Me too.Have you figure it out now? What cause the problem?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is what I do.

    (You can play around with the below resolutions depending on what your are going for. I tend to make everything at 960x640. Just add 150 or so pixels to both)

    1. Make all your layouts 1100x800 (or 800x1100).

    2. Make your window size 960x640 (ipad resolution).

    3. Create a sprite that is 960x640 and just make it a solid color. Set it's opactity to 50 or something. Put it at location 550x400.

    This sprite is going to act as your guide for your window size. Anything that should be seen in the window should be within this guide.

    4. On start of layout - Set ScrollX to 550, Set ScrollY to 400. (swap if doing portrait)

    Now, your background image should be 1100x800. You want the image to be something that is OK if you don't see all of it around the edges. For example in a pool game. the background could be the concrete around the pool, if you see less or more concrete, it's no big deal. Or just use a solid color.

    For fullscreen, if you are using CocoonJS, set to scale outer.

    Other platforms you will need to play with. Windows 8 believe scale outer works, windows 8 phone, lettbox scale works.

    Hope that helps. I have only used this on Static games screens (not games that scroll around a larger layout).

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