Pixelation

General => General Discussion => Topic started by: QueenSkadi on May 09, 2017, 05:25:53 pm

Title: Sprite sizing for 2D games?
Post by: QueenSkadi on May 09, 2017, 05:25:53 pm
Does size matter? For instance say I wanted to create something like Secret of Mana for instance is it better to keep most character sprites a uniform size or does it not really matter so long as they are all of a uniform scale? Should all sprites conform to some sort of rule when it comes to sizing (for instance all sprites sizes should be a multiplication of 16, eg 32 x 64 or 64 x 64) or can you have the sizes all over the place so long as they are even numbers?
Title: Re: Sprite sizing for 2D games?
Post by: eishiya on May 09, 2017, 06:23:39 pm
As long as they're all to the same scale and are all displayed with the same zoom (not mixing pixel scales), size doesn't really matter.

Even-number sizes make flipping the sprite more predictable, but other than that, the sizes don't matter in modern engines. Old systems had sprites that were made of 8x8 or 16x16 tiles and were read from memory as tiles, but that's not the case with modern 2D rendering, which deals with texture images addressed as a unit square (i.e. not by the tile or by the pixel). As long as your texture atlas (a big texture that gets loaded by the GPU and which contains most of your sprites to avoid texture-swapping mid-rendering) is of a size that the GPU likes, there's no problem. Most advanced engines take care of texture atlas stuff for you, and even if you make your atlas(es) by hand, the individual sizes of the sprites don't really matter.


I personally work with sprites that are some multiple of my tile size (which is usually 16px or some other multiple of 8 because I like round numbers), because my in-game logic is in terms of tiles and hitboxes are sizes in tiles, so it's easier for me to get a sense of scale that way. Keeping my hitboxes in mind from the beginning and sizing the sprites around them (with breathing room, of course) helps me avoid issues with characters not matching their hitboxes or having weirdly-sized hitboxes.
Title: Re: Sprite sizing for 2D games?
Post by: chungsie on May 10, 2017, 07:03:42 pm
a friend told me that 8x8 px is 8bit, but you can scale it as you please.
Title: Re: Sprite sizing for 2D games?
Post by: yaomon17 on May 10, 2017, 09:38:04 pm
8-bit doesn't refer to resolution. It most commonly refers to color count or size of computing components.
Title: Re: Sprite sizing for 2D games?
Post by: yrizoud on May 11, 2017, 09:21:19 am
NES, GameBoy, Sega Master System, Commodore 64, Amstrad : 8bit era of videogaming / microcomputing
All of the above had facilities to handle sprites and scenery efficiently as 8x8 pixel units, so it's common to use this guideline - but 8bit = 8x8 is an oversimplification.
The same 8bit machines which ran this:
(https://i.ytimg.com/vi/JEAZXL9jajo/hqdefault.jpg)(https://i.ytimg.com/vi/xmsjR4GQq7U/hqdefault.jpg)
Could also run this :
(https://cpcrulez.fr/img/z1157.png)(https://i.ytimg.com/vi/wwkQu_qSjg4/hqdefault.jpg)