flareteam / flare-game

Fantasy action RPG using the FLARE engine
http://flarerpg.org/
Other
1.13k stars 237 forks source link

Low-Quality Textures thoughts #38

Closed igorko closed 11 years ago

igorko commented 12 years ago

Migrated from clintbellanger/flare#531

dorkster recently added a config toggle for High/Low quality textures. This refers to the transparency of textures -- full alpha (8 bit) vs. magic pink (1 bit).

On some systems there may be a vast performance improvement by using the low-quality textures -- e.g. systems that support hardware blitting but have slow processors to do alpha transparency calculations.

How to arrange all these textures? I suggest a new folder alongside images that mimics its structure, named something like images_noalpha or images_low.

I need to poke around and see which images don't have full alpha versions, even in the art_src folder. I need to check NPCs and flying loot animations, perhaps others.

For power animations we can carefully create no-alpha versions. It's all about the Alpha Threshhold (as it's called in GIMP).

And future thoughts: it might be a lot to ask for every Flare game to supply both full alpha and 1-bit alpha images (especially for projects where full-alpha makes no sense, like most pixel art). Perhaps in config files we can enable/disable this toggle feature and set a default for the project.

stefanbeller commented 12 years ago

The spritepacker tool now generates both the normal image and a low quality pink image, this additional image is stored in a noalpha folder along the actual image. This is compatible to the current master flare-engine.

I propose to not save these low-quality textures in the art_src folder, because generating these textures is rather easy, if you have the full alpha version.

igorko commented 12 years ago

Agree. art_src should have only non packed spritesheets with alpha layer(if such).

igorko commented 12 years ago

We should have no-alpha versions for all minicore art. Small devices have small amount of RAM...

igorko commented 12 years ago

plasmaball, freeze and stone(I think so) are still broken in noalpha. After fixing these we can easily scale all art for minicore. And shield is not present.

igorko commented 12 years ago

@stefanbeller Can we resize spritesheets to 50% with you scripts with animation definitions? Or it will repack images? If so. we need to remake animations manually and resize images manually too.

igorko commented 12 years ago

Resizing images with ImageMagick creates pink borders on noalpha versions. Looks like 320x240 art is too small to have noalpha versions. Or anyone has better idea how to convert them?

stefanbeller commented 12 years ago

What about resizing only the full alpha versions and then reducing these to noalpha?

clintbellanger commented 12 years ago

Yeah resizing should happen on full alpha images, and converted to no-alpha at same resolution.