Slick Forums

Discuss the Slick 2D Library
It is currently Wed Jun 19, 2013 9:56 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun May 27, 2012 8:20 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
Hello,
My game uses a Tiled map for part of the background, but when the screen is scaled to the size of the device, gaps in the map appear. pardon the low quality of the following screen shot.
Image

Notice that, behind the gear with eyes, there is a vertical orange line. This is the gap. To my knowledge, the image filter is set to nearest, and the map is rendered at an integer anyway. Also, this problem only appears when I the game is scaled, and I believe the scale at which I am getting this problem is 1.5

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
PostPosted: Mon May 28, 2012 2:34 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1477
This is a common issue if you're using bilinear filtering. Also try giving your sprites an empty 2px border.


Top
 Profile  
 
PostPosted: Tue May 29, 2012 2:02 am 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
I thought that setting the tileset to filter nearest would stop bilinear filtering. I suppose I should also mention that the line that appears is exactly one pixel wide, and that it has no transparency. I have come to think that bilinear filtering problems occur when a pixel is covered by two sprites, but because each sprite is only over part of it, they both render with transparency, and the two semitransparent shades do not completely cover the background. if so, the line should be only partially missing. I know it doesn't look like it on the screenshot, but it appears as though the tile is a victim of some sort of off-by-one-error.

On a semi-related note, how does slick handle a scaling screen? I wasn't able to really tell (that is, I couldt figure out what lines of code did the game screen scaling). Do you know off the top of your head? This may help me understand my problem, and may also help fix a problem with the slick desktop screen-scaling (it's not woking as far as I can tell)

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
PostPosted: Wed Jun 27, 2012 8:51 pm 
Offline

Joined: Wed Jun 27, 2012 8:48 pm
Posts: 4
Hello, i appear to have the same issue when drawing my sprites from a SpriteSheet and scaling, do anyone of you have any idea about how to solve that?
Thank you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group