wrap issue

Bugs will be moved here once resolved.

Post » Tue Oct 04, 2011 9:00 pm

I moved the Origin to the far left,

hooray, this seems to solve the problem Thank you @zenox98!!!

maybe stupid question, but I do not know, where I can find boundary check?
B
21
S
5
G
5
Posts: 163
Reputation: 5,028

Post » Tue Oct 04, 2011 9:14 pm

I'm not certain why it didn't work. It should, but it seems to me that Wrap has a problem dealing with more than one instance when they leave the layout. Just guessing :/

My hack involved setting the Origin to the far left, then checking when the cloud reached the far right, and resetting it's x-position to '0-cloud.width' so it starts again. That's all I meant by boundary check. The boundary at the far right of the screen.

I don't think this is a good enough solution, but at least it works :)
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,844
Reputation: 48,289

Post » Tue Oct 04, 2011 9:56 pm

...That's all I meant by boundary check. Ah, I understand
Thank you again !

I don't think this is a good enough solution, but at least it works :)

I thought I'm stupid
B
21
S
5
G
5
Posts: 163
Reputation: 5,028

Post » Tue Oct 04, 2011 10:45 pm

I'll move the subject to "bugs" even though you have a workaround, to be sure ashley takes a look at it when he comes back.

It is indeed strange that clouds stop this way after a while.
Maybe an uncommon combination of events or something.

Also nice art on the example, I'm curious to see the game a little more advanced (with actual gameplay).
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,999
Reputation: 57,793

Post » Wed Oct 05, 2011 8:01 am

@vidi

Forgot to mention, the way it works now, there is no need for the Wrap behavior.

If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,844
Reputation: 48,289

Post » Fri Oct 07, 2011 2:49 pm

...there is no need for the Wrap behavior.

Ok, I see !
B
21
S
5
G
5
Posts: 163
Reputation: 5,028

Post » Sun Oct 09, 2011 7:54 pm

I can't see any problem with the provided .capx. Everything seems to wrap OK. Am I missing something?
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Sun Oct 09, 2011 7:58 pm

With vidi's capx after two or three times/wrap, the clouds indeed stop wrapping.

At least it did when I tried his cap in firefox.
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,999
Reputation: 57,793

Post » Wed Oct 12, 2011 9:01 am

I'm reviewing this, and doing a little debugging in firebug at the same time.
I am also prebuffering a megavideo at the same time. (it seems to slow down my FF a bit)

When launching the preview in firefox, the cloud1 and cloud3 don't wrap on their very first roll.

Checking line 55 in wrap_behavior.js, it seems that every tick the bounding box right edge is less than 0.
(current value : -0.9279989999896685)
Then, each tick, the following lines are executed, making the object move left, outside of screen instead of moving right.

Maybe instead of
l.57: this.inst.x = layout.width - this.inst.x;

=> this.inst.x = layout.width - this.inst.width/2;
or
=> this.inst.x = int(layout.width - this.inst.x);
would work better (having a true 0).

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,999
Reputation: 57,793

Previous

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests