Tilemap feature, seam fix

Discussion and feedback on Construct 2

Post » Thu Apr 17, 2014 6:39 pm

Hey Ashley,

I was curious if this would be possible:

Include one more setting in the tilemap to allow a sprite block larger than the tilemaps grid (this could be user defined) Essentially the tile map would then grab whatever tile it needed plus an additional however many pixels of overlap. Or rather than automatically doing it it could be manually set do draw larger sprites than fit in the grid. The overlap would rid seams and allow pixel rounding off, linear sampling, and arbitrary rotation/scaling.

All that is need is to be able to draw a sprite that is larger than the grid using user defined parameters. Currently I have a project demonstrating this using events to replace each tile in a tile map with a similar sprite. The problem is with this method is you end up with a tilemap that has to be replaced by a bazillion individual sprites all needing names and events to cause them to replace the tilemap.... this gets messy quick!

I was looking at the code for the tilemap and thought I would ask before I got to invested in it.
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,153

Post » Thu May 01, 2014 6:47 pm

+1000
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Thu May 01, 2014 6:51 pm

This is similiar thread that Ashley really doesn't care about seam fix. He will force you to use letterbox integer scale.

I was hoping we should have seam fixed for this tilemap. Keep demanding to earn popular demand.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Fri May 02, 2014 10:33 am

This would increase the CPU overhead of drawing the tilemap by a factor of 100 or more, since it would no longer be able to draw regions of tiles in one go (see this blog post). It would likely also introduce new glitches at edges meeting transparency (where there is no tile), since the tile area rendered is too large.

As ever the workaround is: letterbox integer scale, point sampling, pixel rounding. Seams should never show up with those settings. I've been thinking for a long time of a high-performance workaround for the seams, and I can't come up with anything so far. Meanwhile it works with the right settings. It's not that I don't care, it's a difficult technical problem.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Fri May 02, 2014 10:53 am

@ ashley
yes they will not show but...
scml animations get destroyed since they tween sub pixel
with point sampling the image quality degrades especially if it has thin lines and you see flicker everywhere.
the movement becomes jerky.
i managed to fix the seams with sprites as tiles and i am 100% happy at the moment.
could you please answer this question for me ? it will save me a lot of trouble and time.
i just conducted an experiment because i read somewhere that you stated that tile maps are 100 times more efficient than using sprites as tiles.
so i left the seams aside kept my linear and pixel rounding to "off"
deleted all sprite tiles(about 2000 objects),imported 2 tile maps one with collisions and the other one with none.
i used the ones with collisions as a platform for my player to walk on and filed the rest of the level with the one with no collisions to keep the check count to a minimum.(about 10.000/sec). before i thought to use 2 tile maps the collisions went to 350.000 /sec and the game run at 30fps at pc.
i saw 5 fps down in pc!! (from 60 to 53-56)
mobile was exactly the same
and another platform was exactly the same.
if my tests are correct should i stop trying to make the tile map plugint to work with all the "wrong" settings since i see no performance gain whatsoever?
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Fri May 02, 2014 8:49 pm

@Roccinio @Joannesalfa

I've reconsidered the use of TileMaps at this point and chosen Method 2 from here . The difference in performance shouldn't be noticed on smaller games.

If there will be a fix for the seams, I will easily make the changes and use TileMaps ;)
B
49
S
15
G
6
Posts: 534
Reputation: 7,195

Post » Fri May 02, 2014 8:55 pm

TGeorgeMihai wrote:@Roccinio @Joannesalfa

I've reconsidered the use of TileMaps at this point and chosen Method 2 from here . The difference in performance shouldn't be noticed on smaller games.

If there will be a fix for the seams, I will easily make the changes and use TileMaps ;)


I'm using method 2 in my project. But also have added tiled bg's.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Fri May 02, 2014 9:46 pm

One possible work around would be to shove the tilemap into a single texture.
Course that means you couldn't change any of the tiles after.
Image ImageImage
B
169
S
50
G
174
Posts: 8,328
Reputation: 110,800

Post » Fri May 02, 2014 10:25 pm

@TGeorgeMihai This method 2 doesn't provide benefits for memory usage, Ashley gave us an excuse to use letterbox integer scale.

Tilemap is awesome solution for big games, but C2 renderer for tilemap is unprofessional however is not impossible to fix seam.

Another framework for HTML5 game is called Phaser provides seamless using tilemap in fullscreen.
It's really nice for clean and seamless.

http://gametest.mobi/mariocombo/

Tilesets are 16x16

Image

Image



Ashley claimed that it doesn't use floating point scaling, nothing else anyway he won't explain more details to fix seam, more like he's giving up. We are not happy with seam. I wouldn't use integer letterbox scale, most game publishers DON'T LIKE small window or impossible to upscale, not cool Ashley.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Sat May 03, 2014 4:04 am

@joannesalfa good example,

so dear @Ashley, can you contact http://phaser.io/ and ask them how they get seamless tilemaps?
B
18
S
7
G
1
Posts: 783
Reputation: 4,247

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 17 guests