CocoonJs + Centering my game

Get help using Construct 2

Post » Wed Jul 31, 2013 6:26 pm

*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
Magnificent.
B
3
Posts: 2
Reputation: 179

Post » Fri Sep 13, 2013 5:14 am

Me too.Have you figure it out now? What cause the problem?
B
3
Posts: 3
Reputation: 231

Post » Fri Sep 13, 2013 6:13 am

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).ArcadEd2013-09-13 06:15:46
B
100
S
31
G
11
Posts: 1,552
Reputation: 21,512


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests