wrap bug - viewport issue

0 favourites
  • 7 posts
From the Asset Store
Surena Touch
$2.50 USD
A wrap from official Touch plugin to export touch/mouse input to other plugins.
  • Link to .capx file (required!):

    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

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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.

  • sounds like a good option Ashley. please do as wrap is pretty limited at present.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)