Re-Sizing Tilemap at Run Time

Bugs will be moved here once resolved.

Post » Thu Jan 09, 2014 4:12 pm

Link to .capx file (required!):
Capx

Steps to reproduce:
1. Add a tilemap object to the project.
2. Create an instance of the tilemap in the layout.
3. Add events to re-size tilemap.
4. If making a tilemap instance larger, add events to set tiles that should now be visible/available. If making a tilemap instance smaller, add events to set the tiles that should no longer be visible/available.
5. Preview the Capx


Observed result:
The visible/available tiles do not change at runtime. The debugger confirms the width and height of the instance changes, but the visible tiles suggests otherwise.

When running the above capx, the top tilemap instance displays a 2nd row of tiles. The bottom tilemap instance does not display a cactus at tilemap position 0,2.

Expected result:
Resizing a tilemap instance at run time updates the displayed/available tiles according to the instance's new size, similar to how the tilemap instance behaves in the editor.

When running the above capx, the top tilemap should only display a single row of tiles since the instance's height was reduced to the height of a single tile. The bottom tilemap should display a cactus at tilemap position 0,2) since the instance's height was increased to 4x the height of a single tile.

Browsers affected:
Firefox: yes
iOS: yes

Operating system & service pack:
Windows 7 64 bit SP1
iOS 7.0.4

Construct 2 version:
r156
               zatyka2014-01-09 16:30:10
B
64
S
19
G
8
Posts: 341
Reputation: 12,195

Post » Fri Jan 10, 2014 2:18 pm

Thanks, good catch - should be fixed in the next build.
Scirra Founder
B
403
S
238
G
89
Posts: 24,653
Reputation: 196,143

Post » Mon Jan 13, 2014 8:38 pm

@Ashley

I tested the above capx with r157. It looks like the appropriate tiles are available when making the tilemap larger, but when making the tilemap smaller, tiles that fall outside the object's dimensions are still displayed. When the above Capx is run, I would expect the top tilemap instance to only display 1 row of tiles.

Is this intended behavior for the tilemap object?zatyka2014-01-13 20:41:45
B
64
S
19
G
8
Posts: 341
Reputation: 12,195

Post » Wed Jan 15, 2014 3:51 pm

Oops, you're right, should have that fixed in the next build too.
Scirra Founder
B
403
S
238
G
89
Posts: 24,653
Reputation: 196,143


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest