About space-saving techniques

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

Post Reply
Yashiro
Posts: 7
Joined: Wed Sep 19, 2018 3:28 am

About space-saving techniques

Post by Yashiro »

I know some techniques to save space like color cycling, palette swapping, sprite flipping and mirroring. Are there other tricks among these?
User avatar
pubby
Posts: 583
Joined: Thu Mar 31, 2016 11:15 am

Re: About space-saving techniques

Post by pubby »

The biggest gains are the from the compression algorithms used. These don't affect the look of the graphics though.

It can save space to use 1bpp sprites. Aka one color plus transparency.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: About space-saving techniques

Post by tokumaru »

Also, compression is something that goes well beyond graphics. One of the things that occupies the most space in any game is level maps, so it's important to come up with restrictions and compression schemes that take advantage the inherent redundancy of the types of maps you're using. If levels were stored as raw NT/AT data, you'd be lucky to fit 20 screens in an NROM game, but with proper compression you can fit hundreds of screens in the same space.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: About space-saving techniques

Post by tepples »

There are cases where compression does in fact affect the look of the graphics. For example, Super Mario Bros. uses metatile (16x16 pixel unit) compression and mercilessly reuses many of the special-case brick columns used to build World 1-2. This gives its levels a far more grid-based rhythm than, say, any given David Crane game. Likewise for Mega Man games at both the 32x32 pixel and 16x16 pixel scales.

A game that I'm working on for Retrotainment Games uses 16x16-pixel metatiles in one layer of its map compression. We're trying for a grid-hiding art style, but the artist routinely has to go back and make revisions when a single area exceeds the engine's limit of 256 distinct 16x16-pixel metatiles per area. The level map conversion tool can automatically combine similar 8x8-pixel tiles using a tool written by JRoatch, but that doesn't extend to automatically combining similar 16x16-pixel tiles.
Yashiro
Posts: 7
Joined: Wed Sep 19, 2018 3:28 am

Re: About space-saving techniques

Post by Yashiro »

I was thinking of using 8x8 tiles to make more flexible graphics but that would be more time-consuming, and take up more space for maps, but I might be wrong.
User avatar
gravelstudios
Posts: 159
Joined: Mon Mar 13, 2017 5:21 pm
Contact:

Re: About space-saving techniques

Post by gravelstudios »

Yashiro wrote:I was thinking of using 8x8 tiles to make more flexible graphics but that would be more time-consuming, and take up more space for maps, but I might be wrong.
I think it would depend on how you did it. if your level design has rows/columns with a lot of the same tile repeated over and over, Run Length Encoding could probably save you a ton of space, probably almost as much as if you used 16*16 metatiles as your base unit. If you used a system like Metroid where you build structures out of tiles, and then build rooms out of structures, the structure data could take up a lot more space using 8*8 tiles, but you could mitigate that by reusing the same structures over and over in creative ways.

I think the way you compress your level data really is an outgrowth of how the overall game is designed and how you want your levels to look and flow.
Post Reply