Will 3.0 support 16bit atlases? [OpenFL limitation]

camaleonyco

  • Posts: 204
I hope so, because that would solve all my iPod 4 RAM problems.

« Last Edit: March 04, 2014, 12:50:04 pm by Jon »

Jon

  • *
  • Posts: 17533
Not for 3.0 (NME doesn't support it yet but it's in their TODO list).

However, the memory management in 3.0 is better than it was before, and you may be able to make your game work without having to resort to this.

Out of curiosity, as an artist yourself, how do you cope with using 16-bit atlases? When I played around with them, I found the graphics degradation to be quite bad, especially for things with gradients.

« Last Edit: August 27, 2012, 11:18:10 pm by Jon »

camaleonyco

  • Posts: 204
Not for 3.0 (NME doesn't support it yet but it's in their TODO list).
That's a shame, but I hope you implement them whenerver NME starts supporting it. I think they are not appreciated because people doesnt fully understand how useful they can be.

However, the memory management in 3.0 is better than it was before, and you may be able to make your game work without having to resort to this.
Those are great news!

Out of curiosity, as an artist yourself, how do you cope with using 16-bit atlases? When I played around with them, I found the graphics degradation to be quite bad, especially for things with gradients.
Well, if you are going to use 16bit atlases you have to consider some details:
-Choose a style with plain solid colors, like Angry Birds or Where is My Water.
-Use 16bit colors when you draw your assets (like #112233, #00FF00, etc.).
-Move all the sprites that doesn't look fine to 32bit atlases.
-If you really need 16bit images with gradients or blurs, use dithering. For example, I needed to add some kind of blur to my backgrounds because their hard edges were a little distracting, so I made a scene just with my blurred background, tested it on the ipad (where it looked terrible of course), took a snapshot, opened with an image editor, converted it to an 8bit image (256 colors), saved the color palette, opened the original blurred image, converted it to an 8bit image using the saved palette and choosing the best dithering method ("noise" in my case), and that was all.

Sounds complicated, but after you take the snapshot it takes less than a minute to convert your original 24bit to a 16bit image... Actually, to an 8bit image, but you know that what you see if what you will get on the device. Take a look at the attached screenshot. The background looks noisy, that's true, but taking into account that each background takes almost an entire atlas for itself, I wanted them to be as "light" as possible.

Jon

  • *
  • Posts: 17533
As soon as NME supports it, we will.

When that happens, do let me know what kinds of toggles you'd like available because it can get pretty involved, and I have to balance the simplicity of offering the option with letting it do what you want it to do.

(For starters, I know that with 16-bit, you have to choose how you allocate your bits, for example choosing between 3 channels: 5-6-5 or 3 channels + alpha: 4-4-4-4)

camaleonyco

  • Posts: 204
That sounds great. Having a "Dither" checkbox would be enough to minimize the odd look of 16bit images (perhaps using a diffusion dithering algorithm).