multiscreen cocoonjs

Get help using Construct 2

Post » Thu Dec 27, 2012 8:23 am

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??
B
7
S
1
Posts: 32
Reputation: 1,288

Post » Thu Dec 27, 2012 8:43 am

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.Wink2012-12-27 08:50:48
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Thu Dec 27, 2012 9:44 am

in general there is no real method
B
7
S
1
Posts: 32
Reputation: 1,288

Post » Thu Dec 27, 2012 10:02 am

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.Wink2012-12-27 10:05:08
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Thu Dec 27, 2012 1:12 pm

I tried this method, it does not work for me:(would be even possible to use letterbox scale,but it does not work here.
B
7
S
1
Posts: 32
Reputation: 1,288

Post » Fri Dec 28, 2012 7:13 am

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:



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:



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:



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 helpsWink2012-12-28 07:23:33
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Sun Jan 06, 2013 4:37 am

Thank you very much, I'll try
B
7
S
1
Posts: 32
Reputation: 1,288

Post » Sun Jan 06, 2013 1:40 pm

how to incorporate on(scale mode)
B
7
S
1
Posts: 32
Reputation: 1,288

Post » Mon Jan 07, 2013 9:20 am

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:





Edit:

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.

Wink2013-01-08 01:13:25
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Wed Jan 23, 2013 2:07 pm

Hey thanks for the really detailed explanation @wink. 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?
B
14
S
3
G
3
Posts: 25
Reputation: 3,217

Next

Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider] and 12 guests