Align to sides issue on Android and CocoonJS

Get help using Construct 2

Post » Wed Feb 27, 2013 1:30 pm

@superkew
Hello superkew,
thank you very much for your help.
It works very good.

I'm trying to see if there is a way, when I change the Layout, to let this images not be "shifted" on the right when the layer is shown.
This is a ugly effect on Android.

I can post a capx to show you the problem, if anyone interested...
B
10
S
4
G
4
Posts: 42
Reputation: 3,091

Post » Wed Feb 27, 2013 2:00 pm

I'm having real headaches figuring out how to make a "single code base" for PC and mobile games. If you move stuff about on startup (to fit a mobile screen) then you are screwed the second anyone resizes a browser window running it on PC.
silkc22013-02-27 14:00:25
B
20
S
6
G
2
Posts: 157
Reputation: 3,109

Post » Wed Feb 27, 2013 2:17 pm

@silkc2
Yes, it's true.
I'm trying different solution to find out the correct one.

If anyone has a solution, please help!
B
10
S
4
G
4
Posts: 42
Reputation: 3,091

Post » Wed Feb 27, 2013 6:21 pm

@ghale I think you guys are making this much more difficult than it needs to be.

Here is a simple example I made for you:

https://dl.dropbox.com/u/43763487/examples/alignment_multi_resolution.capx

I used your original .capx to created 3 layers, I then set it to scale mode. After that I placed all your sprites on the HUD layer, and gave each one an anchor behavior with different settings. Then I set unbounded scrolling to yes, and set parallax to 0. This will get the effect you want on all device resolutions.
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Wed Feb 27, 2013 7:13 pm

@Wink
Hello Wink,
can you put it the capx in r119?
I don't use the beta r120!
B
10
S
4
G
4
Posts: 42
Reputation: 3,091

Post » Wed Feb 27, 2013 7:38 pm

@ghale Ok, I updated the download link to a r119 version.

https://dl.dropbox.com/u/43763487/examples/alignment_multi_resolution.capx
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Wed Feb 27, 2013 7:48 pm

@Wink
Hello Wink,
maybe the file is corrupted, because I can see 1 Layout, and an empty Event Sheet!
B
10
S
4
G
4
Posts: 42
Reputation: 3,091

Post » Wed Feb 27, 2013 7:53 pm

@ghale Yes, it is a simple example based on your Alignment_03.capx. You don't need any events to accomplish this. Just run the .capx and you should see a working example.

Everything is done in the properties windows.

I also wrote some tips about supporting multiple resolutions here:

http://www.scirra.com/forum/multiscreen-cocoonjs_topic61313_post376578.html?KW=screen+resolution#376578Wink2013-02-27 20:08:06
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Wed Feb 27, 2013 8:23 pm

@Wink

Maybe I've not been clear.
There is a problem on CocoonJS aligning items at first start of application.
Please run it on CocconJS on Android and tell me if all is correct.
I've just tried your example and it not works correctly on Android (obviously yes on PC).
B
10
S
4
G
4
Posts: 42
Reputation: 3,091

Post » Wed Feb 27, 2013 8:43 pm

@ghale I just tested it with the CocoonJS launcher on a Samsung Galaxy S3, and a Nexus 7. Everything looks fine here.

Here is a screen shot taken off of my Samsung Galaxy S3:



What type of device are you testing on, and what OS is it running? CocoonJS doesn't work very well on 2.2 and older.

Maybe I'm not understanding exactly what your trying to accomplish?Wink2013-02-27 20:56:03
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Braus and 5 guests