Help with C2 Autorunner example

Discussion and feedback on Construct 2

Post » Fri May 10, 2013 7:18 pm

Hi all,

I've been trying out C2's built in example runner game. The example seems to work well in the browser and the windows phone emulator, but when I export for cocoonjs it starts to behave strangely.

If you play the game for a short while (2-3 mins), you'll notice that platforms are sometimes placed in mid-air, and these mid-air platforms lose their solid behavior towards the end. These platforms also tend to disappear before they have completely left the layout.

(Note: You may have to be patient, as it doesn't happen all of the time, however even a few times would be enough to spoil an otherwise decent game! Also, if you allow the player to die a few times, it helps to bring on this behavior faster).

Does anyone know why this might be happening, and how I could fix it?

Oh, I changed the fullscreen option from 'letterbox scale' to 'scale' (not sure if that matters!)

Thanks everyone, any help would be appreciated.

RunnerTest.capx

PS, I've attached the capx, but it's just the example found as an option in the new project list.
B
8
S
2
G
1
Posts: 63
Reputation: 880

Post » Sun May 12, 2013 9:33 am

@Ashley, not sure if you could help me with this? I'm guessing it was either Tom or yourself who wrote the example.

I was wondering if it may have something to do with scaling? The original layout is 640, 360. When I run it through the CocoonJS launcher, I display it in a 800, 400 screen. The function used to create new blocks uses Layout.Height and .Width to create / position new blocks.

I'm still very new to C2, but could that be the problem. and if so, how could I re-code the example to prevent this. I have already tried Window.Height and .Width, but that made it do all sorts of strange things!

Thanks very much for any advice.
B
8
S
2
G
1
Posts: 63
Reputation: 880

Post » Mon May 13, 2013 11:26 am

Bump,

Anyone, please?

B
8
S
2
G
1
Posts: 63
Reputation: 880

Post » Mon May 13, 2013 2:24 pm

Hello.
I'm not a "big experienced" user, but I suppose you found the solution : try it on your device with full screen off for example, to see what happens.
I had pbs with example of codes too at the beginning, because some don't work, i mean, are not adapted to fullscreen scale.
goldentreee2013-05-13 14:25:32
B
11
S
6
G
2
Posts: 105
Reputation: 3,910

Post » Mon May 13, 2013 2:33 pm

Thanks for the reply @goldentreee. :)
B
8
S
2
G
1
Posts: 63
Reputation: 880

Post » Mon May 13, 2013 8:02 pm

I do believe it has something to do with scaling.

I was having an issue with my app where it would offset the screen, sometimes after a couple minutes, sometimes after resuming.

I changed the scaling options and it fixed it.

One setting I changed was parallax to 0,0

I cannot recall the rest of my settings, but I can check when I am home if you did not get it figured out
B
31
S
12
G
7
Posts: 415
Reputation: 6,870

Post » Mon May 13, 2013 8:12 pm

Thanks @humanescape that would be very helpful :)
B
8
S
2
G
1
Posts: 63
Reputation: 880

Post » Tue May 14, 2013 12:56 pm

@pantaloons completely forgot, sorry.

Ill try to do it tonight this time, I put it in my google calendar lol

There was a post about this issue too, its how I found my solution. I am trying to find the post again with no luck.

The general idea was, set your canvas and layer size the same, background goes bigger then layer, set scale to scale, retina display iphone only, then go to your layer settings and set parralax to 0,0

Try that, ill have the exact steps tonight (hopefully)
B
31
S
12
G
7
Posts: 415
Reputation: 6,870

Post » Tue May 14, 2013 5:07 pm

@humanescape,

No problem, I appreciate the help! :)

Just checked my project, and I've already implemented all of the settings you mentioned, including every layers parallax set to 0, 0.

Hmmmm puzzling, hopefully your update might shed some further light on the subject.

Thanks again!
B
8
S
2
G
1
Posts: 63
Reputation: 880

Post » Wed May 15, 2013 11:20 pm

@pantaloons

OKAY,

here are my settings: window size: 800 x 480,
Fullscreen in browser: Scale
Use iOS Retina: Iphone Online
Hide Address bar: yes
Layer scale rate: 100
Layer Parallax 0,0
Layout size 800,480
Unbounded scrolling: yes

Now, if you still get the error, are you trying all the cocoon scale options?
B
31
S
12
G
7
Posts: 415
Reputation: 6,870

Next

Return to Construct 2 General

Who is online

Users browsing this forum: armaldio, Clintonpacheco, saiyadjin and 0 guests