Dealing with new 0-1 color range

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
megalukes
Citizen
Posts: 94
Joined: Fri Jun 27, 2014 11:29 pm
Location: Brazil

Re: Dealing with new 0-1 color range

Post by megalukes »

Pebsie wrote: Tue Apr 17, 2018 9:24 am So there's no chance that it's going to get reverted back to 0 to 255? :'(
We can only hope.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Dealing with new 0-1 color range

Post by raidho36 »

Dr. Peeps wrote: Tue Apr 17, 2018 8:01 pm using images as maps, where each colour means a certain terrain; using special colours in animated images that can be replaced via code (for example, a character's clothing could be "128", and this colour could then be replaced with whatever colour you wanted the character to wear); old-school colour cycling so parts of an image would look animated or pulsating; palette-based lighting effects; and so on.
Thanks for giving examples of what you shouldn't do with graphics. All of these things can be achieved by much simpler means that require no color comparisons against magic numbers and whatnot. Color-coding terrain for storage is entirely pointless - for what can be done using 1 byte per value you use 4, and you make it harder to store and read data for no good reason by using an image instead of plain data. Special color substitution like this looks terrible, let's be real, and the way you want to do it is by using an additional character layer that renders the cloth piece. To do pallete-based effects you use pallete-based texture mode with an actual pallete in it, and for general color substitution effects you just use a color map sprite with a minimal color mapping shader, it's literally just one line.

Now there's nothing wrong with trying to do silly things such as farting through your ear canal specifically, if you don't know any better. It takes time and effort and reading through a lot of manuals to get things right. Just don't blame the framework when you try something silly like this and it doesn't work. Do your homework and do things the right way.
User avatar
Dr. Peeps
Citizen
Posts: 57
Joined: Sat May 28, 2016 12:57 am
Location: British Columbia, Canada

Re: Dealing with new 0-1 color range

Post by Dr. Peeps »

raidho36 wrote: Wed Apr 18, 2018 6:00 am Thanks for giving examples of what you shouldn't do with graphics.
Yeah, you're welcome ....

I think you misread my post. Notice how I said I have done these things in the past. This was on systems like the Commodore Amiga, etc. in the 80's and early 90's. None of the solutions you listed were available at the time.

You can untwist your panties now. :)
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Dealing with new 0-1 color range

Post by raidho36 »

Well it's like saying that you should give your car some room to roll around in the parking lot and cycle between multiple cars if you need a lot of place going or work doing so they're not overworked, because that's what you used to do with horses. Just because it used to be sensible thing to do, doesn't mean it still is.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 44 guests