dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: colour-count in pixel art

  1. #1
    Senior Member
    Join Date
    Feb 2002
    Posts
    147

    colour-count in pixel art

    While lurking around on pixel-art forums, I hear a lot of talk about using as limited a palatte as possible--dithering should be done by using the two dithering colours, rather than simply finding a third, intermediate colour. A nice painting done with 16 colours has more merit than one with 64 colours.
    So my question is, how much of an issue is colour-palette size when using pixel-art in Flash? If you're using an illustration with 64 colours rather than 16, how will this affect the application? Will it take longer to load? Longer to display? Will it take more memory to move a high-colour sprite? I'm working on a game with a large number of sprites, and I don't want to run into serious performance issues later because I used too many colours. On the other hand, I don't want to spend months trying to get nice two-colour dithering when using intermediary colours would suffice.
    So what's the technology-side? How does having a high number of colours in a gif affect Flash?

  2. #2
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,928
    As far as I'm aware, and I could well be wrong, the actual colour depth shouldn't be a performance factor due to pc graphix cards using chunky pixels rather than a bitplane display, so in effect it plots a whole byte of data per pixel, if it's 256 colours or 2.

    The only time you will get hit performance wise is when you have alpha channels in there as well, although I'm guessing with what you're after that's not going to be an issue.

    I always reduce my images down to the lowest amount of colours which are acceptable purely for filesize reasons.

    If I am talking totally out of my arse ( Which is more than likely ) someone please post cause it would be interesting to know for sure.

    Squize.

  3. #3
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    i think because the actual colors are stored in a palette the graphics software will need to "lookup" the palette for each pixel. thus having a performance impact (however slight)
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  4. #4
    Senior Member
    Join Date
    Jul 2003
    Posts
    138
    Originally posted by BlinkOk
    i think because the actual colors are stored in a palette the graphics software will need to "lookup" the palette for each pixel. thus having a performance impact (however slight)
    I'd have thought that the storage format bears no resemblance to the way Flash actually displays the images. From a programming perspective, it makes more sense to have the various loading routines (GIF, JPEG, PNG) extract the data into a single, standardised class, which is then used internally to display the graphics. Thus, no single format would be more efficient than any other, as they are all treated as 24-bit images.

    This is only a guess, though.

  5. #5
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    i think that's prolly the case ant but either way the image must be stored in it's most compressed format (to reduce bandwidth). the player/os/graphics card must at some point lookup the palette in order to display/convert the format. i'm pretty sure this would be a very very very small overhead though.
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  6. #6
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,928
    I dunno if anyone can face reading through this ( I had a quick skim a while ago ) but it may have some more detailed info.

    http://sswf.sourceforge.net/SWFalexref.html

    Squize.

  7. #7
    jtnw's Avatar
    Join Date
    May 2002
    Posts
    1,328
    Also, MM docs might help too, although I belive it's more focused on how swfs are stored, rather than rendered.

    link

    jtnw

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center