Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
256 color palette --> 16 palettes of 16 colors   Message List  
Reply | Forward Message #10727 of 15019 |
    I guess it's probably too much to ask if someone has a program to do this already, but here's what I'm wondering...
 
    Imagine that you have a set of maps that reference a tileset. This tileset is a 256 color bitmap that you want to fix so that it is compatible with the 16 palettes of 16 color modes ( so your artists don't have to do it by hand ). When you run the program, it reads in the maps and the tileset, and outputs the maps modified with the individual tile palettes correctly mapped, and so that the tileset is correctly allocated.
 
    I started writing a little app to do this, but am having trouble finishing it... I was just thinking maybe others will have ideas of good ways to do this.
 
My thoughts:
 
    1. Each tile can have a maximum of 16 colors (one being transparent), so if any 8x8 tile has more than that number, reduce "similar" colors until 16 colors remain.
    2. Create a list of the palette generated for each tile.
    3. Find tile palettes that are subsets of other tile palettes and combine them.
    4. While we are over the limit (number of palettes)
            combine "similar" palettes.
 
This should work, but I'm having trouble with finding the most "similar" palettes, and keeping track of all the remapped colors. As far as finding similar colors, I've just been using standard color distance sqrt((r0-r1)^2...) stuff, but am not totally sure if that's the best way.
 
    Everyones' ideas will be much appreciated :)
 
Ben


Tue Apr 2, 2002 8:50 am

bsmith2@...
Send Email Send Email

Forward
Message #10727 of 15019 |
Expand Messages Author Sort by Date

I guess it's probably too much to ask if someone has a program to do this already, but here's what I'm wondering... Imagine that you have a set of maps that...
Ben Smith
bsmith2@...
Send Email
Apr 2, 2002
9:06 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help