wrap bug - viewport issue

Bugs will be moved here once resolved.

Post » Tue May 28, 2013 12:25 am

Link to .capx file (required!):
https://www.dropbox.com/s/qj5snyb8beupyz7/WrapBug.capx

Steps to reproduce:
1. Open up capx ensure running in letterbox scale - both players are correct
2. Change scaling to be scale outer - only blue player is correct. Purple player wrapping at layout size.
3.

Observed result:


Expected result:
When we develop for 4:3, for example ipad, we have to let the layouts bleed so that the layout also look good in 16:9 environments, e.g., android phone or iphone.

This happens if we export to cocoonjs as it ignores scaling and will always scale outer.

Currently the wrap behaviour cannot handle both formats.

I believe this is a bug.

I will have to develop my own wrap functions to solve the situation the current wrap behaviour is only useful if your game never changes aspect ratios.



Browsers affected:
Chrome: yes/
Firefox: yes/
Internet Explorer: yes/

Operating system & service pack:

Construct 2 version:
132
    czar2013-05-28 01:55:31
B
36
S
8
G
5
Posts: 436
Reputation: 5,967

Post » Tue May 28, 2013 1:15 am

Perhaps your capx is incorrect, the capx you provided only contains one red rectangle.

Also be aware that the wrap behavior only works with the layout size, not with the viewport size. Not sure it's a bug, but rather a misunderstanding of the wrap behavior's design.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
271
S
99
G
70
Posts: 7,267
Reputation: 75,769

Post » Tue May 28, 2013 1:55 am

@Kyatric. Oops I had made two capx. I will update the link.

I am aware that wrap works with layout size. However, that does not change the fact that as a behaviour wrap does not do what you would expect it to do and exporting to devices with differing aspect ratios essential makes wrap pointless.

There are two solutions.

1. Allow layout size to be adjusted dependent on the device.
2. make sure wrap goes to the edge of the visible screen.czar2013-05-28 01:58:54
B
36
S
8
G
5
Posts: 436
Reputation: 5,967

Post » Tue May 28, 2013 3:11 am

Since it is the layout size and not the displayed size that it is used, I don't see how that's not an expected behavior. It also makes your point 2 not valid.
Or maybe as an option then, because projects which were built so far using wrap as it is intended would be broken by such a change.

If the wrap behavior is not what you need, as you did for the blue rectangle, make the behavior you want through events.

Once again, I don't think it is a bug with the behavior itself.Kyatric2013-05-28 03:17:18
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
271
S
99
G
70
Posts: 7,267
Reputation: 75,769

Post » Tue May 28, 2013 3:35 am

The visible screen can not be determined at design time. Maybe it would be different if cocoonjs actually adhered to the scale options but it doesn't.

It means that wrap cannot be used for a project that is exported to to cocoon and that needs to work on a 4:3 device and on a 16:9 device.

It would be a great solution if wrap had an option to wrap to the boundaries of the visible canvas. i.e., it wraps as the user expects. The fact that layout size cannot be adjusted at run time makes wrap too restrictive to use.

czar2013-05-28 03:39:08
B
36
S
8
G
5
Posts: 436
Reputation: 5,967

Post » Tue May 28, 2013 2:04 pm

Closing as not a bug, since the Wrap behavior is only designed to wrap across the layout bounds, not the viewport bounds. I could add a 'wrap to viewport' mode for a future build, but it would default to off to prevent breaking old projects that expect the behavior to wrap to the layout bounds.
Scirra Founder
B
382
S
222
G
85
Posts: 23,987
Reputation: 189,471

Post » Tue May 28, 2013 6:48 pm

sounds like a good option Ashley. please do as wrap is pretty limited at present.
B
36
S
8
G
5
Posts: 436
Reputation: 5,967


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests