Sprite sheet questions

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

Sprite sheet questions

Postby Kyosaur on Tue Jun 10, 2014 1:59 am

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?
Image
User avatar
Kyosaur
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
 
Posts: 80
Joined: Tue Jul 13, 2010 3:00 am

Re: Sprite sheet questions

Postby Kyosaur on Tue Jun 10, 2014 2:42 am

Just noticed im in the wrong section? Damn...I've been gone for too long!
Image
User avatar
Kyosaur
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
 
Posts: 80
Joined: Tue Jul 13, 2010 3:00 am

Re: Sprite sheet questions

Postby dandymcgee on Tue Jun 10, 2014 9:09 am

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/8573178/limitation-on-texture-size-android-open-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/topics/graphics/opengl.html#textures
https://code.google.com/p/gdc2011-android-opengl/wiki/TalkTranscript
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
 
Posts: 4911
Joined: Tue Apr 29, 2008 4:24 pm
Location: New Hampshire

Re: Sprite sheet questions

Postby Kyosaur on Wed Jun 11, 2014 8:51 pm

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/8573178/limitation-on-texture-size-android-open-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/topics/graphics/opengl.html#textures
https://code.google.com/p/gdc2011-android-opengl/wiki/TalkTranscript


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).
Image
User avatar
Kyosaur
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
 
Posts: 80
Joined: Tue Jul 13, 2010 3:00 am

Re: Sprite sheet questions

Postby dandymcgee on Thu Jun 12, 2014 2:55 pm

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?
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
 
Posts: 4911
Joined: Tue Apr 29, 2008 4:24 pm
Location: New Hampshire


Return to Game Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron