Multiple screen ratios in CocoonJS

Discussion and feedback on Construct 2

Post » Mon Feb 17, 2014 4:28 am

@firebelly

I create invisible object with anchor, and then, after 0.01s, make it visible... I prefer that than "moving" anchor on every layout startszymek2014-02-17 04:28:34
B
18
S
6
G
1
Posts: 783
Reputation: 4,187

Post » Wed Jun 18, 2014 7:45 pm

Hi guys @vagaev @szymek @firebelly @Colludium @BluePhaze
Speaking of different ratios, can you check my bug report?

https://www.scirra.com/forum/objects-are-created-in-wrong-positions_t108552

Thanks so much!
B
86
S
25
G
11
Posts: 652
Reputation: 11,045

Post » Thu Jun 19, 2014 10:51 pm

Hi @lolva, I'm not sure what's causing your issue. I found that sometimes C2 needs a tick or two to get the layout up and running properly before you can do things like create physics joints on objects, but this seems a bit different. I can certainly reproduce it but it's hard to say exactly what might cause it and, so, discern how to fix it. In the interim, you could create a shade object to make the screen black for 0.05 sec at the start of the game. I suspect the problem is due to the re-sizing of the canvas size and layout scale to fit the browser window size and something like that would not be noticed at the start of a game. As long as you restrict the player from continually re-sizing the layout, all will be well. Sorry I can't be of more help.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,193

Post » Fri Jun 20, 2014 1:46 am

Hi @Colludium. I think I have a temporary solution:

The objects have to be invisible, then after 0.01s I turn them visible.
I don't like to do this because I believe it's double work for the CPU (1create, 2move, 3set visible) instead of just (1create) the object in the proper place.

Image

So, for now I think it's a solution, what do you think?
B
86
S
25
G
11
Posts: 652
Reputation: 11,045

Post » Fri Jun 20, 2014 2:03 am

Iolva wrote:Hi guys @vagaev @szymek @firebelly @Colludium @BluePhaze
Speaking of different ratios, can you check my bug report?

https://www.scirra.com/forum/objects-are-created-in-wrong-positions_t108552

Thanks so much!


This has been around for ages, and if I recall it's a problem with how often anchor resets the position. Ashley commented that there was no way (or reason) to fix this if I recall. My game has this issue as well.
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Tue Jun 24, 2014 4:01 pm

@lolva

yep, it is very old bug,
still not solved :)

and there is no better solution than "The objects have to be invisible, then after 0.01s I turn them visible"
B
18
S
6
G
1
Posts: 783
Reputation: 4,187

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Zamargo and 1 guest