on start of layout works before second tick

Bugs will be moved here once resolved.

Post » Tue Feb 07, 2012 11:54 pm

not bumping this time, but similar bug occurs (maybe it's the same cause, but please be aware of that) - behaviours also seem to activate after first frame is displayed, best seen with anchor behaviour.

http://www.mediafire.com/?4ry2d9ivpi082cb

if you make your window thin and tall you can see about one frame full black (loading) one frame white with black box in the middle of the left side (bug) and third and following frames the black box will be positioned to the left bottom (as it's meant to be). this only occurs when NOT in first layout, so it seems that behaviours become active and run their events AFTER first tick and frame is drawn.

cheers!
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Wed Feb 08, 2012 10:14 am

Looks like the time taken by the browser to redraw things.
It has the same kind of delay when I'm looking at this very forum and resize my browser. The middle/body section takes a little time before getting drawn in the center again.
Not sure it is C2 specific.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,786

Post » Wed Feb 08, 2012 12:09 pm

this forum is html, C2 canvas is... well... canvas :) and in the canvas the object should be drawn AFTER its behavior / events are set not BEFORE in every tick. in other way, right now it's like (excuse my pseudo coding)

[code]// tick start
canvas.drawThingsOnIt();
foreach(i in canvas.objects) {
   canvas.objects.runBehaviors();
   canvas.objects.runEvents();
}
// tick end
[/code]

and it should be like:

[code]// tick start
foreach(i in canvas.objects) {
   canvas.objects.runBehaviors();
   canvas.objects.runEvents();
}
canvas.drawThingsOnIt();
// tick end
[/code]

hope that helps to explain what I mean. also I do remember similar bug in construct classic, kinda like the every X ms precision bug :)ranma2012-02-08 12:10:43
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Wed Feb 08, 2012 7:14 pm

Technically, that wasn't a bug. It was just kind of unintuitive.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Wed Feb 08, 2012 9:10 pm

it was and still is a bug, on collision events also are run AFTER frame has been drawn, so I think this is larger than it appeared. and the on start of layout bug appears only when it's NOT a first layout. haw this cannot be a bug?
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Thu Feb 09, 2012 12:24 am

[QUOTE=ranma]also I do remember similar bug in construct classic, kinda like the every X ms precision bug :)[/QUOTE]

Sorry, I should have quoted what I was referring to. The every x ms imprecision in CC wasn't a bug.Arima2012-02-09 00:25:12
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Thu Feb 09, 2012 1:23 am

[QUOTE=Arima] [QUOTE=ranma]also I do remember similar bug in construct classic, kinda like the every X ms precision bug :)[/QUOTE]

Sorry, I should have quoted what I was referring to. The every x ms imprecision in CC wasn't a bug.[/QUOTE]

we're talking about two differend things :) the one you're talking about I agree it wasn't a bug, but what I meant was the bug that also occured in C2 up until 78. If you made two events:

every 1000ms do something
every 50000ms do something different

the two events should fire in the same frame after 50000ms. the bug was causing the first event to fire quite earlier as it drifted off accuracy every time it was run.

hope I explained it now :)

cheers! and back to the topic please :)
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Fri Feb 10, 2012 4:13 pm

I can't reproduce any issue - I don't see the object flash. However in the code I noticed when you change layout it goes:

On start of layout -> tick behaviors -> run events -> draw

I've changed this to

tick behaviors (old layout) -> On start of layout (new layout) -> run events -> draw

for the next build which I think should resolve the issue. 'On start of layout' definitely runs before *anything* else, before any events and before any drawing, so I don't know why you'd see the sprite flash for a tick.
Scirra Founder
B
358
S
214
G
72
Posts: 22,946
Reputation: 178,333

Post » Fri Feb 10, 2012 4:58 pm

I let myself send you a quick and short PM with some files that I didn't want to see the public light :)

also, which may help you, actually every event in the game seem to run after the draw (maybe that will be corrected by your recent change, you wrote about, dunno), objects that have "on collision -> destroy" can be seen in one frame colliding / overlapping and in the next one they get destroy, when they clearly should in the first one :)

cheers and thanksranma2012-02-10 16:58:39
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Fri Feb 10, 2012 7:11 pm

@ranma
In your first capx if you hide the locked sprite at the same time as destroying it you won't see it flash. When destroying a sprite it is not destroyed till the beginning of the next frame, so that is probably why you see it flash.
B
79
S
24
G
52
Posts: 4,724
Reputation: 39,711

PreviousNext

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests