Author Topic: [SOLVED]Change map graphics during play  (Read 310 times)

Satoh

  • Newbie
  • *
  • Posts: 47
    • View Profile
[SOLVED]Change map graphics during play
« 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)
« Last Edit: December 08, 2017, 06:20:30 am by Satoh »
Patience is difficult and rarely thanked, but always appreciated, and sorely missed when absent.

Diarandor

  • Hero Member
  • *****
  • Posts: 935
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Change map graphics during play
« Reply #1 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.
“If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you.”

Satoh

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Change map graphics during play
« Reply #2 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.
Patience is difficult and rarely thanked, but always appreciated, and sorely missed when absent.

Diarandor

  • Hero Member
  • *****
  • Posts: 935
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: [SOLVED]Change map graphics during play
« Reply #3 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.
“If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you.”