Sampling Graphics - Linear and Point

Post your own tutorials, guides and demos.

Post » Tue Aug 26, 2008 7:30 pm

I recently played a game on the Dailey Click and noticed the cut scenes used parrallaxing between the foreground and background. However, it was a little strange as the screen scrolled really slowly and you could see the images jumping entire pixels.

So I thought this would be a simple way to demonstrate constructs linear filtering technique and compare it with point sampling. Linear filtering is on by default in all Construct games and allows objects to render at floating co-ordinates

http://www.fileshack.us/get_file.php?id ... mpling.zip

The pics I used are from a recent holiday :)
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Wed Aug 27, 2008 1:25 am

It's a good example of why you should use Linear for high-res graphics.

On the other hand, everyone should keep in mind that for low-res pixel art Point sampling is often the best bet. Linear does make for smoother scrolling, but it will also slightly blur your pixel art. If that's the look you're going for, then fine, but to keep your pixel art crisp, Point is the way to go.

Not to mention that at low resolutions, you won't notice the strange jumpiness when scrolling because everything is blocky anyway.



You know what... I just thought of something. The problem with separation between tiles in scrolling games that some people have... it may be due to the fact that the movement behaviors are operating on a sub-pixel level, but the Point rendering is operating on a whole pixel level. Could that be the problem?
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Aug 27, 2008 4:01 am

Its not just hi res graphics..just any graphics which are antialiased, but you are right about pixel art...it gets ruined if its blured.

Whats this gaps between tiles thing?
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Wed Aug 27, 2008 4:14 am

viewtopic.php?f=4&t=732

The one discussed here.
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Wed Aug 27, 2008 6:43 am

[quote="David":3p5u8b1w]Whats this gaps between tiles thing?[/quote:3p5u8b1w]

[quote="Jeswen":3p5u8b1w]http://www.scirra.com/phpBB3/viewtopic.php?f=4&t=732

The one discussed here.[/quote:3p5u8b1w]

Maligna is also experiencing this problem with his game:

viewtopic.php?p=10053#p10053

Basically, if background graphics are laid out in tiles (like most retro games are) then they separate by a pixel when the screen scrolls. But it's not a constant separation, they kinda jitter a little. Apparently not everyone experiences this graphical glitch, though.

I don't know, I seem to recall Ashley saying... something about it. It was a long time ago, I can't remember now.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Aug 27, 2008 9:13 am

The gaps are because the images are 30x30 instead of 32x32..and the graphics card makes them 32x32 and leaves a transparent region which are noticable with linear interpolation.

I surpose a good idea would be to add pixels to the bottom and the right of the image so the image, while being 30x30...would actually load at 31x31 but render as 30x30..that would fix the glitches.

Now to work out how to do that :(
B
4
S
2
G
5
Posts: 641
Reputation: 3,011


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest