Hello there o/,
I searched forum and web but can't say it was fruitful probably thanks to keywords I used. So apologies if this is a common one.
I just wondered what would you recommend for coloring assets for a web based game. I mean is it possible to have for example a guy sprite and using this to have guy with blue, green, red ... shirt? Or a single house and color it as I please.
I think of a 'colouring map' which stores values of 'proximity' to base color and calculate values on-the-fly. Is it a right approach?
Thanks in advance and apologies for terrible writing style (if any)
On-the-fly coloring
It's a pain to get running, but i colourize stuff on the fly with imagick plugin for php when using that.
If you run asp.net, it's easy to create a generic handler, for instance, to handle these things.
Another time i used a simple c library, cimg, to create a set of colourized spritrs once, and then pick from later.
If you do need to generate on the fly, It's cool if you set up some sort of server-side caching if you use the same colour combinations often.
I like libraries that allow me to lock an image into a series of bytes,
after which i can modify it as much as i like. I stick with levels of red, from black to red, and then increasing on g and b afterwards, as source. Makes it easy to view the originals.
I'd like to elaborate once I've got a hardware keyboard in front of me.
If you run asp.net, it's easy to create a generic handler, for instance, to handle these things.
Another time i used a simple c library, cimg, to create a set of colourized spritrs once, and then pick from later.
If you do need to generate on the fly, It's cool if you set up some sort of server-side caching if you use the same colour combinations often.
I like libraries that allow me to lock an image into a series of bytes,
after which i can modify it as much as i like. I stick with levels of red, from black to red, and then increasing on g and b afterwards, as source. Makes it easy to view the originals.
I'd like to elaborate once I've got a hardware keyboard in front of me.
Thanks for caring to reply, SuperVGA.
Well, what worries me is the number of sprites multiplied with zoom levels , it may take a relatively long while to load , it was actually why I thought of dynamic coloring.
Btw, I was more interested in a javascript solution combined with localstorage if available. But a server side solution may be a matter of debate.
Well, what worries me is the number of sprites multiplied with zoom levels , it may take a relatively long while to load , it was actually why I thought of dynamic coloring.
Btw, I was more interested in a javascript solution combined with localstorage if available. But a server side solution may be a matter of debate.
I suggest storing a few resolutions of a sprite server side,
Leaving the client to scale, downsample them. Client-side stuff can be cool, but unless you have a cross browser foundation,
It easily becomes a bitch of a challenge. Store an atlas of the coloured sprites, so your server can take some time off as soon as possible.
I'd perhaps do some neat scaling and opacity effects with jquery and css3 pie,
but empathise correct, smooth translations and keeping effects to a minimum.
Particle effects with premade emissions go a long way.
But I don't know what you want to do in the bigger picture.
-Maybe your requirements say "webkit only" -and you can worry less!
Leaving the client to scale, downsample them. Client-side stuff can be cool, but unless you have a cross browser foundation,
It easily becomes a bitch of a challenge. Store an atlas of the coloured sprites, so your server can take some time off as soon as possible.
I'd perhaps do some neat scaling and opacity effects with jquery and css3 pie,
but empathise correct, smooth translations and keeping effects to a minimum.
Particle effects with premade emissions go a long way.
But I don't know what you want to do in the bigger picture.
-Maybe your requirements say "webkit only" -and you can worry less!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement