Tilemap feature, seam fix

Discussion and feedback on Construct 2

Post » Sat May 03, 2014 11:29 am

@Joannesalfa - I already said, that example doesn't appear to use floating point positioning, scrolling or scaling. You can do the same in Construct 2 with letterbox integer scale, pixel rounding and point sampling. If Phaser used floating point positions/scrolling/scaling, AFAIK it would show seams just the same, because it's more to do with how computer graphics work in general rather than anything specific to Construct 2.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Sat May 03, 2014 12:37 pm

Joannesalfa wrote:Another framework for HTML5 game is called Phaser provides seamless using tilemap in fullscreen.


Those results are the same you can achieve in C2 using pixel rounding and low quality fullscreen scaling.
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Sat May 03, 2014 12:45 pm

I have the same problem if I disable the webGL

If I have the webGL on, I can set everything (scaleIn...etc) and I don't have the seams...
B
21
S
9
Posts: 298
Reputation: 2,967

Post » Sat May 03, 2014 1:13 pm

Almost at the bottom of that page http://examples.phaser.io/ there are few example of their Tilemap you can play with.
Don't know what scaling they are using (It's not set in those examples) and I'm not sure about floating point positioning and scrolling, because some of them scrolls quite nicely and some of them clearly looks like integer values. But they for sure are using point sampling - it very visible in exdamples with car moving around desert like tiles.
ImageImageImageImage
B
157
S
66
G
41
Posts: 2,599
Reputation: 34,825

Post » Sun May 04, 2014 12:56 pm

None of the Phaser tilemap demos that @shinkan linked to appear to use floating point scaling or positioning. They look like they effectively have fullscreen mode set to 'Off' (for an in-page embed) and 'pixel rounding' to 'on'. You should get equally seamless results in Construct 2 in those circumstances.

I'm still researching this, but I don't know of any other engines that have solved this when using floating point scaling or positioning. Every other example anyone has pointed to so far simply uses integer scaling and positioning. I'd be interested to find out the technical solutions to this problem.

Note another workaround I mentioned in another thread: using 'low quality' fullscreen mode avoids floating point scaling from letterbox integer scale, and you may be able to then get by only setting 'pixel rounding' on.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Sun May 04, 2014 4:34 pm

@Ashley - I realize this isn't an optimal solution, but what about having an option for 'two pass' rendering, one pass being the tile map offset by 1 pixel on each axis, the second pass the tile map is rendered again in its normal location?

It would double the pixels to draw so wouldn't be a good choice for low powered mobile devices, but desktop graphics cards are so powerful these days, it might be worth it for some people.

Although I suppose people could do that manually already, so maybe it's not worth implementing.
Moderator
B
94
S
33
G
33
Posts: 3,006
Reputation: 27,749

Post » Mon May 05, 2014 8:37 am

Perhaps another solution, if this is a scaling problem with floats, is to render a layer/layout without scaling, and then scale the whole layer/layout (rather than individually for each tile). This is assuming without scaling there are no seams (which I think is the case).
B
12
S
3
G
4
Posts: 57
Reputation: 3,186

Post » Mon May 05, 2014 9:42 am

@Captain - that's what low-quality fullscreen mode already does.

@Arima - sounds like a pretty expensive way to solve it - and I think it would introduce new glitches on any tiles with transparency, since the last row of pixels would be doubled up.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Mon May 05, 2014 10:14 am

@Ashley - why is it 'low-quality' as we are dealing with raster images? Text object might be the one exception. So creating images in the layout for the largest size (i.e. fullscreen) needed and scaling down.
B
12
S
3
G
4
Posts: 57
Reputation: 3,186

Post » Mon May 05, 2014 4:52 pm

Oh right, good point. I didn't think about tiles with transparency.
Moderator
B
94
S
33
G
33
Posts: 3,006
Reputation: 27,749

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 28 guests