Page 1 of 1
Sprite sheet questions
Posted: Tue Jun 10, 2014 12:59 am
by Kyosaur
Hello everyone! I am currently working on an android/ios game using LibGDX, and came accross a few problems I need to sort out before I continue. I was hoping you kind people could lead me in the correct direction. The first issue is how I am going to store creatures. This game I am developing is a pokemon like game (100's of creatures), so storage worries me a little bit. There are only 2 real monsters rendered at a time, so I wanted them to be pretty large and detailed, so I decided on a 128x128 creature size(At first). I used a program called texture packer (REALLY like this btw--to bad its only a trail) to create my sprite sheet and atlas texture file. Im a little worried about the number of creatures and the size of each creature (obviously they wont fit on a single sheet). What is the best way to organize this? Should/can I even practically use a sprite sheet? When i rendered a 128x128 creature it was actually surprisingly small, and I had to scale it up (and thus loss some detail). Should I keep the creatures 128x128 and scale them up? Or should I store them a bit bigger? I know a lot of this depends on the screen itself, and that is another thing I am trying to factor in (scaling it...i figure scaling down is better). Im more experienced in application development to be completely honest, so any help is appreciated :D.
TL;DR version:
1. What size should I make me creature sprites if they (2 of them) are the only things displayed (somewhat like pokemon). Right now they are 128x128 and are being scaled up two 512x512.
2. Whats the best method for storing 100+ 128x128 monster sprites? Does the best method allow for even bigger sprite storage?
Re: Sprite sheet questions
Posted: Tue Jun 10, 2014 1:42 am
by Kyosaur
Just noticed im in the wrong section? Damn...I've been gone for too long!
Re: Sprite sheet questions
Posted: Tue Jun 10, 2014 8:09 am
by dandymcgee
Kyosaur wrote:1. What size should I make me creature sprites if they (2 of them) are the only things displayed (somewhat like pokemon). Right now they are 128x128 and are being scaled up two 512x512.
As you said yourself, this is highly dependent upon the resolution of the screen and how you handle scaling of the rest of the screen (UI, etc.). If you're going for the Pokémon style battle screen I would make them at least 20% of the screen height.
Kyosaur wrote:2. Whats the best method for storing 100+ 128x128 monster sprites? Does the best method allow for even bigger sprite storage?
I did a bit of research and it seems 1024x1024 is a really safe bet for maximum supported texture size, but you can query GL_MAX_TEXTURE_SIZE to find out the max supported on your device.
That allows 8x8 = 64 sprites per sprite sheet (texture). That said, the following link actually recommends against using large textures containing many smaller sprites:
http://stackoverflow.com/questions/8573 ... -gl-es-2-0
Best practice: Use ETC for texture compression.
Best practice: Make sure your geometry and texture resolutions are appropriate for the size they're displayed at. Don't use a 1k x 1k texture for something that's at most 500 pixels wide on screen. The same for geometry.
All of the links in Jave's answer contain very good information, especially these two:
http://developer.android.com/guide/topi ... l#textures
https://code.google.com/p/gdc2011-andro ... Transcript
Re: Sprite sheet questions
Posted: Wed Jun 11, 2014 7:51 pm
by Kyosaur
dandymcgee wrote:Kyosaur wrote:1. What size should I make me creature sprites if they (2 of them) are the only things displayed (somewhat like pokemon). Right now they are 128x128 and are being scaled up two 512x512.
As you said yourself, this is highly dependent upon the resolution of the screen and how you handle scaling of the rest of the screen (UI, etc.). If you're going for the Pokémon style battle screen I would make them at least 20% of the screen height.
Kyosaur wrote:2. Whats the best method for storing 100+ 128x128 monster sprites? Does the best method allow for even bigger sprite storage?
I did a bit of research and it seems 1024x1024 is a really safe bet for maximum supported texture size, but you can query GL_MAX_TEXTURE_SIZE to find out the max supported on your device.
That allows 8x8 = 64 sprites per sprite sheet (texture). That said, the following link actually recommends against using large textures containing many smaller sprites:
http://stackoverflow.com/questions/8573 ... -gl-es-2-0
Best practice: Use ETC for texture compression.
Best practice: Make sure your geometry and texture resolutions are appropriate for the size they're displayed at. Don't use a 1k x 1k texture for something that's at most 500 pixels wide on screen. The same for geometry.
All of the links in Jave's answer contain very good information, especially these two:
http://developer.android.com/guide/topi ... l#textures
https://code.google.com/p/gdc2011-andro ... Transcript
i agree with them being scaled to 20% of the screen size. I am still a bit confused on what size I should STORE my sprites though. If 1024x1024 is the limit, should I store my sprites as 256x256 as a sort of happy medium (I currently store them as 128x128 but scale them to 512x512 on the S4--seems like the best size for my phone, but you can tell they are scaled a bit though at 128x128 lol). There are so many game development guides online, but not a whole lot of them really get into theory/concepts like this lol. I would just like to set this up as best as I can. This is all pretty new to me, so I appreciate all the help.
Perhaps you could move my post to the correct section (again--sorry about that, its been a while aha) so I can get different views on this? Someone has to have been in the same boat as me (and just as confused aha).
Re: Sprite sheet questions
Posted: Thu Jun 12, 2014 1:55 pm
by dandymcgee
Kyosaur wrote:
Perhaps you could move my post to the correct section (again--sorry about that, its been a while aha) so I can get different views on this? Someone has to have been in the same boat as me (and just as confused aha).
I would, but apparently your opinion and my opinion of the "correct section" differ because "Hello everyone! I am currently working on an android/ios game using LibGDX" seems like "Game Development" to me.. no? Where would you like it moved to?