• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

SOLVED appropriate size of tiles?

R

Raindow00S

Guest
I found that most tiles are in the size of 32x32, some are 16x16, 12x12, 8x8 and others.
I just wonder is it a kind of trandition? Or 32x32 is the most appropriate size of tiles? If my game window is big, could I make the size of tile to 64x64 or bigger?
And it seems that most of sizes are multiples of 4. Is there any reasons? Could the size be like 10x10, 13x13?
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Your tiles can be any rectangular size that you wish. The reason you see tiles as 16x16 or 32x42 etc... is because on the first computers, it was much more memory efficient to make sure that everything was a power of 2, and as things have progressed, people have just kind of stuck with these sizes as it gives a good aesthetic and there are plenty of resources out there designed for them. But it's not a hard and fast rule and you can do what suits the look and feel of your own game (my game Alpha Dog is loosely based around 6x6 tiles, for example).
 

Ricardo

Member
To complement Nocturne's explanation: GMS2 will, by default, store your tiles and sprites in "texture pages" (also known as texture atlas in other engines) that are power of two, so you're free to use images of any size and proportion that fit your needs whenever and when a single image doesn't extrapolate the whole texture page size you select in the game options (2048x2048 by default).
That said, GMS2' texture packer will accommodate your assets in a more efficient way if they are square and keep a pattern. The less texture pages you have, the less memory and texture swaps, which is good for performance.
 

Yal

šŸ§ *penguin noises*
GMC Elder
And it seems that most of sizes are multiples of 4. Is there any reasons?
Sizes are actually powers of two: 8, 16, 32, 64, 128, 256 etc. There's historical reasons for this: computers and game consoles use binary data, and the power-of-two numbers are the largest possible number that fits in a binary number of a given size (for instance, an 8-bit console had 256 possible values for a "word" of memory). So in old days, having power-of-two sizes was the most efficient way to pack data, because no space would go to waste. NES cartridges started out with 32 kilobyte of total disk space, so being storage-efficient was crucial. On the NES, tiles were 8x8 in size, which means 64 pixels x 4 colors = 256... i.e., one byte of memory exactly.

I'd guess most modern retro games stuck with it because of tradition... tons of people grew up with 16x16 tile sizes and it's in that sweet spot between "each pixel is a meaningful detail" and "things actually look like the thing they're supposed to be depicting" that makes them easy to work with and pleasant to look at. Myself, I use 16x16 grids for that reason, but I'm very loose with forcing stuff to be grid-sized. Usually I make 16x24 characters to get more humanlike proportions (with tall characters being 18x29 pixels if needed) but having that set grid size is still really helpful just to know the rough proportions of things before you draw them, so you don't end up with 2-floor ovens and hand-sized cars.
 
R

Raindow00S

Guest
Thank you all! It's great to know these historical tradition, though they don't really have influence on the game making! That satisfies my curiosity.;)
 
Top