Solarus-Games English Forum

Solarus => Development => Topic started by: Satoh on December 04, 2017, 02:25:25 AM

Title: [SOLVED]Change map graphics during play
Post by: Satoh on December 04, 2017, 02:25:25 AM
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)
Title: Re: Change map graphics during play
Post by: Diarandor on December 04, 2017, 07:45:29 AM
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.
Title: Re: Change map graphics during play
Post by: Satoh on December 08, 2017, 06:20:05 AM
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.
Title: Re: [SOLVED]Change map graphics during play
Post by: Diarandor on December 08, 2017, 05:05:49 PM
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.