Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411490 Posts in 69371 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 01:39:38 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperArt (Moderator: JWK5)Are their downsides to working with 24x24 sprites?
Pages: [1]
Print
Author Topic: Are their downsides to working with 24x24 sprites?  (Read 9139 times)
Shipright
Level 0
***


View Profile
« on: April 01, 2017, 12:15:29 AM »

Greetings again everyone!

So the title says it all. It seems to me that the most popular sprite icon resolutions for pixel art are 16x16 or 32x32, obviously in keeping with the factor of eight to help with resizing. As I continue to work I have come to the sad realization that I am not talented enough for the minimalism of 16x16, nor am I talented enough for the detail of 32x32 nor do I have the time for that much pixel work (my project has items take up multiple inventory slots, so 32x32 quickly becomes 64x64 or larger).

Based on the above I am contemplating shifting the inventory portion of my project to 24x24. Before I do so though, and because my research yields so few examples relative to the other two, I thought I would ask about an obvious pitfalls I might be missing. Does anyone have experience with this size of sprite?
Logged
surt
Level 7
**


Meat by-product.


View Profile
« Reply #1 on: April 01, 2017, 12:22:26 AM »

There's nothing magical about the number 16.
It's just popular because many games on old systems used 16x16 sized metatiles as they were a good fit for their hardware tile size and screen resolutions.
Use whatever damn number works for your needs.
Logged

Real life would be so much better with permadeath.
PJ Gallery - OGA Gallery - CC0 Scraps
Shipright
Level 0
***


View Profile
« Reply #2 on: April 01, 2017, 08:00:15 AM »

Thats good to know, but I am more concerned with technical issues with game design. Things like the ease of resizing sprites with a factor of 8 for instance.
Logged
Glyph
Level 10
*****


Relax! It's all a dream! It HAS to be!


View Profile
« Reply #3 on: April 01, 2017, 08:49:34 AM »

Kirby Super Star had a 24x24 grid, and it really does fill a nice gap of having more detail but not feeling overly large.



As for resizing, I am not sure why 24x24 would be an issue in your mind. What are you using that can't perform a simple doubling of the size? Even if it only allows changing size in units of 8, 24 is a multiple of 8 and everything should work anyway, no?
Logged


Richard Kain
Level 10
*****



View Profile WWW
« Reply #4 on: April 05, 2017, 09:26:07 AM »

The predominance of 16x16 and 32x32 grids was more a matter of legacy hardware support than anything else. Certain consoles, most notably the NES, had certain hardware limits for their sprites, which is why they would frequently end up being based on those grid values.

In modern game development, with the power at our disposal, and the type of rendering that has become standard, such considerations are no longer valid. Some earlier 3D cards (most notably the 3dfx Voodoo line) had restrictions on textures being power-of-two. But with modern sprite-rendering techniques, even this obscure limitation wouldn't actually be a problem. If you want 24x24 grids, go for it.

The real consideration you need to take into account for sprite grid size is the native resolution you are planning on targeting. Keeping pixel art nice, chunky, and consistent is the real challenge for retro-styled games these days. Fixed resolution displays can be a bit temperamental when displaying low-resolution targets, and keeping things rendering consistently can sometimes be a challenge. Choosing a grid size that scales well with different high-definition resolutions is usually a good approach. (so you can have accurate integer scaling for resolution resizing)

From some basic preliminary math, I think 24x24 would work pretty well for resolution resizing. I haven't checked it against 4K standards, but for 720p and 1080p I believe it would work well.
« Last Edit: April 05, 2017, 09:36:51 AM by Richard Kain » Logged
DragonDePlatino
Level 1
*



View Profile WWW
« Reply #5 on: April 05, 2017, 10:19:40 AM »

Go for it! I used to feel the same way about 16px and 32px graphics. I started out with pixel art before I had a foundation in traditional art so low-resolution stuff felt more comfortable to me. Over time, I gravitated towards 24px and 32px.

As someone using 24px tiles in my current game, I can testify they are a little wonky. While Richard is correct, graphics cards still demand textures to be a power of two. Any larger or smaller than this and texture sizes will be rounded up. Be warned that you will frequently have wasted space on the right and bottom edges of your textures. Not a big deal, but on mobile platforms every pixel can count for complex games!
Logged

Richard Kain
Level 10
*****



View Profile WWW
« Reply #6 on: April 05, 2017, 02:59:47 PM »

While Richard is correct, graphics cards still demand textures to be a power of two. Any larger or smaller than this and texture sizes will be rounded up.

The texture that gets loaded into memory needs to be a power of two. But a texture stretched across a polygon or rasterized to the screen does not need to be. It is always a good idea to keep the actual texture files you are working on as power-of-two. I still do this myself just out of habit. But an in-game quad can be rendered as a non-power-of-two, no problem. This is usually handled through a built-in sprite system, normally based on picking UV coordinates from an existing texture to create "sprites."

Just make sure the resolution of your sprite sheet textures are power-of-two, and you'll be fine. The individual sprites themselves can be whatever size you want.
Logged
DragonDePlatino
Level 1
*



View Profile WWW
« Reply #7 on: April 05, 2017, 05:59:52 PM »

I know in-game quads don't need to be a power of two. The problem is when the in-memory textures need to be.



See how with 24px tiles and a 256px texture, there's a bunch of wasted space along the edges? The number of tiles aren't a nice power of two, either. And this continues to be a problem even in higher-res textures.

Not that much of an issue in practice, but it's very annoying with small textures and a large number of tiles/sprites per texture.
Logged

Glyph
Level 10
*****


Relax! It's all a dream! It HAS to be!


View Profile
« Reply #8 on: April 05, 2017, 06:48:32 PM »

It is true that you'll always miss out on a small amount of your texture if you're not using power of two sizes, but with very large pages the size loss starts to become negligible. How large a final texture page will be probably depends on many factors, but I couldn't imagine them getting much larger than 2048x2048.



Note that for 24x24, the overhang waffles between 8 and 16 pixels, so efficiencies come in pairs. For a small sheet, you may lose over 10% of your size, but if it gets to max size then you lose less than 1%. Ultimately, you have to ask if this loss is worth it - to me, it seems to almost certainly be a small issue that should take the backseat to a critical decision like the artistic framework for your game.
Logged


DragonDePlatino
Level 1
*



View Profile WWW
« Reply #9 on: April 05, 2017, 09:50:18 PM »

Of course. Like I said, my current game is using 24px graphics. The advantages of using 24px far outweigh that minor annoyance. In particular, it's a good resolution for top-down games. On smaller screens you can display an acceptable number of tiles while having recognizable sprites. In addition to Kirby Super Star, another good example is the Pokemon Mystery Dungeon series:

Logged

Richard Kain
Level 10
*****



View Profile WWW
« Reply #10 on: April 06, 2017, 09:33:23 AM »

This assumes that your sprite sheet will be made up solely of 24px tiles. While 24 would be the standard for you tile spacing, the actual in-game graphics do not need to be limited to 24x24. You can have individual character graphics that take up more or less than that standard. And with sprite packing, there are ways and methods to reduce the texture-space waste you are pointing out. As such, I wouldn't really consider that slight drawback a deal-breaker. An annoyance, certainly, for someone attempting to keep every graphic within a strict 24x24 space, but little more for anyone else.

So yeah, I'm feeling the general consensus is that non-standard pixel tile resolutions are fine to go with, and 24x24 in particular has a recommendation or three.
Logged
Sik
Level 10
*****


View Profile WWW
« Reply #11 on: April 11, 2017, 06:20:38 AM »

As someone using 24px tiles in my current game, I can testify they are a little wonky. While Richard is correct, graphics cards still demand textures to be a power of two. Any larger or smaller than this and texture sizes will be rounded up. Be warned that you will frequently have wasted space on the right and bottom edges of your textures. Not a big deal, but on mobile platforms every pixel can count for complex games!

Er, yes and no. On PC you pretty much can use non-power-of-two textures freely (though they may be slower), on mobile you're still required to use power-of-two instead. Power-of-two is probably still easier to cope with (and the wasted space is probably not a big deal since the larger the texture the smaller the amount of waste). If you want to get really nitpicky you can make tiles that overlap other tiles to outright reuse part of the graphics =O) (I actually did this once to reduce on filesizes from images to be downloaded in a web game, the spritesheet became a mess to say the least)

As for tile size, yeah 16px and 32px come more from the fact you could do bit shifts to convert between pixel coordinates and tile coordinates. Not a big deal on modern hardware where multiply and divide are reasonably fast, so the only real restriction is what size is reasonable for the scale of your game.

I still prefer 32px (at 240p density, scale up as needed) for other reasons, I find it a sweet spot - and 16px is too small in my opinion, period.
Logged
JWK5
Moderator
Level 9
******

A fool with a tool is an artist.


View Profile
« Reply #12 on: April 27, 2017, 02:30:11 PM »

A lot of development tools (such as Game Maker Studio) just take your sprites and stick them on a texture page anyways, so sticking to 2x2/4x4/8x8/16x16/32x32/64x64/etc. isn't really a problem in that regard. As long as whatever tool you are using functions fine with it (for example, it doesn't get screwy with grid settings) then you are fine.
Logged

My Art Tutorials:
 Here

"Today is victory over yourself of yesterday, tomorrow is victory over lesser men." - Miyamoto Musashi
muki
Level 2
**



View Profile
« Reply #13 on: May 11, 2017, 05:52:12 AM »

I think the problem is mostly if your math needs to divide by 2 multiple times over for some reason. 24->12->6->3 then it gets really weird.

Back in the days of yore, platformers used a lot of bitwise operations and multiplications/divisions by two, because it was super fast on old hardware! Sprites with sizes of powers of 2 also fit much more nicely in limited memory. Every byte was used.

Modern engines probably don't need to be this optimized, at least when it comes to sprite sizes, math and sprite memory. Go for it!
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic