User Tag List

Results 1 to 8 of 8

Thread: color depth support

  1. #1
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,028
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.48%

    color depth support

    ZC has command-line flags that let you choose the color depth. How exactly does this work? All of ZC's (heavy) use of palettes requires 8-bit color depth only, right?

    If I try to set the color depth to something other than 8 (e.g., -32bit for my desktop's native 32-bit depth) I get artifacts and crashes. But are these flags supposed to work?

  2. #2
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,958
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.18%
    They are, in fact, supposed to maybe or maybe not work, or do different and unexpected things on different platforms (On Windows XP they actually work minus the wrong GUI colors), and that's why they are undocumented and no one knows they exist.

    I can't remember exactly why; just that it was the Windows 7 era and there were multiple gfx issues no one knew how to fix.

    allegro actually converts all the 8-bit to 32-bit internally before displaying it.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  3. #3
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,762
    Level
    21
    vBActivity - Bars
    Lv. Percent
    69.26%
    Quote Originally Posted by Gleeok View Post
    They are, in fact, supposed to maybe or maybe not work, or do different and unexpected things on different platforms (On Windows XP they actually work minus the wrong GUI colors), and that's why they are undocumented and no one knows they exist.

    I can't remember exactly why; just that it was the Windows 7 era and there were multiple gfx issues no one knew how to fix.

    allegro actually converts all the 8-bit to 32-bit internally before displaying it.
    I thought that they may've been something for Linux, which is what I mentioned to DD on Skype. If they truly do nothing, we can rid ourselves of them. Until we support native 24b or higher, they're superfluous.

  4. #4
    Username Kaiser SUCCESSOR's Avatar
    Join Date
    Jul 2000
    Location
    Winning.
    Age
    37
    Posts
    4,436
    Mentioned
    152 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    10,563
    Level
    30
    vBActivity - Bars
    Lv. Percent
    52.04%
    I always wondered what it would take to make ZC work in higher color. Is that a major overhaul sort of deal. I know nothing about the workings of allegro.

  5. #5
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,028
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.48%
    Oh yes, it's a major overhaul

    In short, ZC currently makes heavy use of color palettes to implement CSets, some of the animations, etc. The palettes are implemented as true bitmap palettes: each bitmap is stored using 8-bit colors where each "color" is an index into the palette.

    Of course in true color each pixel stores an R, G, B value representing its color, rather than an index into a color palette. This means that to implement CSets in true color, you either need to:
    - precompute several different true-color versions of each sprite, one per CSet, and swap between them as its CSet changes; or
    - write code to recolor sprites on the fly as the CSet changes.

    It's doable but it's not a minor change.

  6. #6
    Username Kaiser SUCCESSOR's Avatar
    Join Date
    Jul 2000
    Location
    Winning.
    Age
    37
    Posts
    4,436
    Mentioned
    152 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    10,563
    Level
    30
    vBActivity - Bars
    Lv. Percent
    52.04%
    That's about what I figured for True Color. I am guessing there's no 16 bit implementation of palettes. ZC is the only software I've used that uses palettes. Guess I should have been into game development in the late 90s.

  7. #7
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,958
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.18%
    Palettes shouldn't be too hard (in theory) to move to glsl (you jimmy-jack and flatten the zc palette map to be a 256xN 2D RGBA texture, send down vertex colors as some kind of offset data to the actual single-color texture which are indices into the the actual color map, etc), it's probably just the wonkyness of the entire cset system that zc uses that's sure to give some headaches to whomever has to rewrite the palette stuff.


    [edit] I just realized how funny that sounds starting the sentence with "Palettes shouldn't be too hard to move to glsl."
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  8. #8
    Username Kaiser SUCCESSOR's Avatar
    Join Date
    Jul 2000
    Location
    Winning.
    Age
    37
    Posts
    4,436
    Mentioned
    152 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    10,563
    Level
    30
    vBActivity - Bars
    Lv. Percent
    52.04%
    I have quite a bit of experience moving pallets.
    Last edited by SUCCESSOR; 01-07-2017 at 12:36 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social