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?
Sprite sheet questions
Moderator: PC Supremacists
- Kyosaur
- Chaos Rift Cool Newbie
- Posts: 78
- Joined: Tue Jul 13, 2010 2:00 am
- Favorite Gaming Platforms: PS2,PS3,NDS
- Programming Language of Choice: C++
Re: Sprite sheet questions
Just noticed im in the wrong section? Damn...I've been gone for too long!
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Sprite sheet questions
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.
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.Kyosaur wrote:2. Whats the best method for storing 100+ 128x128 monster sprites? Does the best method allow for even bigger sprite storage?
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
All of the links in Jave's answer contain very good information, especially these two: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.
http://developer.android.com/guide/topi ... l#textures
https://code.google.com/p/gdc2011-andro ... Transcript
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- Kyosaur
- Chaos Rift Cool Newbie
- Posts: 78
- Joined: Tue Jul 13, 2010 2:00 am
- Favorite Gaming Platforms: PS2,PS3,NDS
- Programming Language of Choice: C++
Re: Sprite sheet questions
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.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.
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.Kyosaur wrote:2. Whats the best method for storing 100+ 128x128 monster sprites? Does the best method allow for even bigger sprite storage?
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
All of the links in Jave's answer contain very good information, especially these two: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.
http://developer.android.com/guide/topi ... l#textures
https://code.google.com/p/gdc2011-andro ... Transcript
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).
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Sprite sheet questions
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?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).
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!