Slick Forums

Discuss the Slick 2D Library
It is currently Sun May 19, 2013 3:46 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Aug 11, 2011 3:05 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
Hello again! I'm having trouble with backgrounds in libgdx. On some backgrounds, tiles end up incredibly skewed.
example:

Right:
Image

Wrong:
Image

please note the background around the green parts. Also note that the foreground is composed of a tiled map and has never given me trouble. The background uses a single tileset with a 512x512 32bit png, where the foreground uses several 256x256 or smaller 32 bit pngs. Anyone know what the problem might be? I tried posting here http://slick.javaunlimited.net/viewtopic.php?t=3473, and kevglass said something about a texture atlas, but I don't know what that is, and the discussion degraded in to an exposition on the virtues of using powers of two for images. Just for clarity, I use a 512x512 tileset divided into 32x32 sections.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 13, 2011 12:32 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
Update: I think the problem has to do with spritesheet rendering. I just can't figure out why the foreground (with the bars) renders fine, and the background does not.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 23, 2011 6:27 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
I was able to solve it by using spritesheets that were 256x256


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2011 7:23 am 
Offline

Joined: Wed Sep 28, 2011 7:20 am
Posts: 2
Mr. Kenkron wrote:
I was able to solve it by using spritesheets that were 256x256

How did you do it? And what about 512x512?

_________________
The best mobile app developers


Last edited by Jully on Mon Oct 03, 2011 9:32 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2011 6:29 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
512x512 spritesheets didn't work, but 256x256 spriteseets did. I would guess that android textures are limited to dimensions of 256x256, and the reason I was having problems was that I was getting too large. To solve this, I split my 512x512 tileset into four 256x256 tilesets, and it works fine now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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