Found solution for seams

Discussion and feedback on Construct 2

Post » Mon Jan 20, 2014 2:38 pm

This does not fix seaming in all situations. It can help reduce seaming but adding a 1px border does not solve it. Say two objects are adjacent and you scroll half way between two pixels (so .5 of the way between them). The first object fills its edge at 50% opacity, which is the correct result with linear sampling. Then the second object also fills the gap at 50% opacity. However drawing something with 50% opacity over something else with 50% opacity does not result in 100% opacity, it results in 75% opacity. With certain low-contrast images this can be enough to fool you in to thinking it's solved, but in many cases the 25% opacity difference along the seams is still enough to show visible seams. As ever the only good solution for all circumstances is pixel rounding and letterbox integer scale.
Scirra Founder
B
402
S
238
G
89
Posts: 24,628
Reputation: 196,023

Post » Mon Jan 20, 2014 3:57 pm

hmm, i was hoping you would at least look further into the issue then just stating, use letterbox integer and pixel rounding, if adjustments in the texture generation can improve or remove seaming, its worth checking out imho.

letterbox integer scale is much harder to get right on multiple devices, its way less dynamic, point scaling results in jittery motion, so anyone who wants to do smooth scrolling or upscaling gets a less then optimal result, so its not good in all circumstances.

there are two options to remove seaming, padding is for texturebleeding,extruding is for the opacity problem (gaps)

have you checked the texture options of texturpacker? If it wouldn't have any effect, the options wouldn't exist

some reference links:

http://talkbinary.com/cocos2d-2/how-to-fix-strange-lines-in-cocos2d-by-using-extrude-in-zwoptex/

http://www.matim-dev.com/texture-packer---get-rid-of-sprite-artefacts.html

http://forum.starling-framework.org/topic/tile-anti-alias-pixels
ImageImage
B
71
S
22
G
7
Posts: 827
Reputation: 10,177

Post » Mon Jan 20, 2014 6:05 pm

I currently have thoses kind of problem with my game and to be honest i am quite frustrated. (Not fault of Construct 2)

I have a fully pixelated game and even if letterbox integer scale seem the best solution (as told by Ashley) this is not a good option at all. This will end up unprofessional. Why? because i can simply not go fullscreen without seeing tons of black area (because it didn't go really fullscreen but instead made the windows size fullscreen)! so what the point to go fullscreen then? most desktop game require a fullscreen mode.

So i started to look for another solution... I avoided seams by having an option to scale up the game at 2x when i reach 1920x1080p in screen size. I use the crop mode. Work good except that you must position everything when you reach the 2x upscaling mode. There another problem.. when you upscale 2x (to avoid seams) you ends up with 2x less place on the current screen size. This can have problems with interface which take a specific minimum size. In the end.. you end up with big layout.. that can reach 1920x1080 in screensize and then reducing the performance.

I think the problem lie in the fact that Construct 2 or Node-WebKit doesn't have the option to enable you to change the system resolution to fit the screensize. Such option would be very useful. I don't think it is normal that i have to make a third party app (kind of launcher) to do that job.

I am a bit out of options... anyone ?
B
16
S
5
G
1
Posts: 190
Reputation: 2,489

Post » Mon Jan 20, 2014 10:56 pm

I became momentarily excited about the tile map object. Then I spent the whole of last weekend trying to get it to work in my game in a way that kept seams from flickering and spoiling the effect. It turns out I've found it impossible - it could be an artifact of my old computer system and its ATI Radeon graphics card, but my system is not that unusual. Anyhow, the only way to make the appearance of seams unlikely (and not impossible!) is to set the game settings to 'visually dissatisfying in every other area' - so I gave up. I look forward to this feature being tweaked so that it can be properly used in the future...

@Roshino & @vtrix, I feel your pain.
A big fan of JavaScript.
B
76
S
20
G
76
Posts: 2,284
Reputation: 47,552

Post » Tue Jan 21, 2014 1:11 am

Seams exist yes.. but why we don't see any in most pixel commercial games ? Does they use the same techniques ? I analysed the situation and i just figured out that we are laking a real fullscreen solution.

I think that until Node-WebKit decide to implement such feature (which may be never done...) we won't have a real fullscreen option. I am not talking about resizing the windows frame.. but a real fullscreen option that change the system resolution then when you leave the game the last resolution get back. I found a solution... but its 500$ a commercial licence (not very good for starters indies..) so i decided to code one from scratch in C#. I will see then how it go. The idea is to use crop and then since we can change the windows size anytime make an app that start the game based on selected resolution and resize that windows while applying the resolution.
B
16
S
5
G
1
Posts: 190
Reputation: 2,489

Post » Tue Jan 21, 2014 1:48 am

Using WebGL like effect as tiling sprite it could have seamless texture

http://powerupware.com/HTML5/tileWebGL/Joannesalfa2014-01-21 01:53:27
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Tue Jan 21, 2014 12:15 pm

About the only 100% proof way I see to eliminate tile border issues would be disallowing the Float positioning and scaling entirely.

Unfortunately the float positioning comes from the fact that bowser frame rate ain't stable and thus the object and BG movements can't be kept on exact pixel coordinates if the movement has to look even. And non-float scaling options either cause multiple layouts or wide (ugly) borders.

In a sense it's kinda amazing to think that with all the challenges coders had on old era (like on C64 and Amiga), at least the audio and frame sync was not amongst them. These extra layers of code and helper functions have done a lot of good, but also caused some all different problems.
Need help? Upload .capx file with your question.
B
16
S
4
G
2
Posts: 233
Reputation: 2,560

Post » Tue Jan 21, 2014 1:48 pm

You might get away with normal letterbox scale with point sampling, but I don't know how all graphics cards would handle that. Depending on what you do you might only need point sampling to solve seams (since it avoids the issue with mid-opacity edges not adding up to 100% opacity) - the integer scale and pixel rounding are just to make sure under all circumstances seams don't appear, and those are pretty good settings for pixel games anyway.

Yes, games can appear less smooth this way, but it's a tradeoff you have to make. The difference should not be enormous. Remember lots of players aren't that discerning, some people happily play bejewelled at 4 FPS... and I've seen some games starting up in the wrong resolution for my monitor, using the hardware blurry linear filter that makes everything look awful, and they still shipped it with that and presumably it was not the end of the world for them. The only way to get that really silky smooth motion is to be able to scroll between pixels. If you scroll between pixels with linear sampling, you open a whole can of worms with the edge opacity issue, which is also a normal result in computer graphics and not a specific Construct 2 issue. It's a decision you have to make as a games designer. You can't always have it all.Ashley2014-01-21 13:50:16
Scirra Founder
B
402
S
238
G
89
Posts: 24,628
Reputation: 196,023

Post » Tue Jan 21, 2014 2:10 pm

@Ashley

why mobile platformers (like Leps World - it's not pixel art game) don't have seams? how they do that?szymek2014-01-21 14:12:31
B
18
S
7
G
1
Posts: 783
Reputation: 4,247

Post » Tue Jan 21, 2014 2:51 pm

[QUOTE=Ashley]- the integer scale and pixel rounding are just to make sure under all circumstances seams don't appear, and those are pretty good settings for pixel games anyway.[/QUOTE]

I have to be so bold to disagree. I found the experience in my low resolution retro project so jarringly bad with pixel rounding activated, that in conclusion it simply cannot be used. And I've seen posts from other users who also find it unusable for their pixel endeavors.

This means I'm back to simply using sprites with numerous frames representing the different tiles. Surely nowhere near as handy as a proper tilemap would be. And I'm still not sure if it may cause performance issues for bigger levels.

I would have to fire up Construct Classic again to really check, but am I wrong to remember there not being such tiling issues? Obviously that one runs on DirectX, so what does that do in this case and why can't HTML5? Unless I'm terribly mistaken here.
B
23
S
6
G
11
Posts: 1,047
Reputation: 8,065

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: papa.mat and 3 guests