[SOLVED]Change map graphics during play

Started by Satoh, December 04, 2017, 02:25:25 AM

Previous topic - Next topic
December 04, 2017, 02:25:25 AM Last Edit: December 08, 2017, 06:20:30 AM by Satoh
I want to change the colors of the map, either to harsh black and white or some sort of inverted color or some similar effect.

I don't have the slightest idea of how that might be accomplished. My instinct is that it isn't possible with the current version of solarus...
I didn't see any functions that dealt directly with tilesets, and I don't think maps are drawn as Drawables that can be altered using blend modes...

I'm asking as a sort of last resort, does anyone have any ideas how I might change the look of the map in real time? (the whole map at once)
Patience is difficult and rarely thanked, but always appreciated, and sorely missed when absent.

It is possible with the development version, with shaders. Today I think that Chris will stream a new development video about shaders, and I recommend you to watch the last one too, because he explains and shows many things.
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."

I actually missed it while I was reading, but if I make a duplicate of each tileset, with the specific graphical alterations I need, there IS a function to swap tilesets while the map is loaded.

map:set_tileset(tileset_id)

It'll mean duplicating all my tilesets, but it'll work in lieu of waiting around for shaders...which I may not even figure out how to use.
Patience is difficult and rarely thanked, but always appreciated, and sorely missed when absent.

I am not sure, but maybe shaders are already functional in the development version of the engine. Chris can tell you that. I don't know if that is included in the last snapshots.

In my opinion, duplicating all tilesets and sprites is too crazy and bad. Don't do it in that way. Wait 2-3 months until shaders are finished and do it with clean code.
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."