SymbolShift
Member
I've searched the manual and forum and I'm unable to find an answer to this one, however the answer may be a flat out "no can do". I've attempted to visually simplify what I'm trying to achieve in GML (with GMS 2.3.6.595)
Assume I have an 8x8 tile (as illustrated):
1) Is there any way to change the colour (or a specific colour) of the tile?
2) Is there any way to shift the contents (or grab a specific area) of the tile?
The original tile remains unaltered, but the modified output would need to be displayed on the screen (either directly, or via a buffer). I know that I could create multiple tiles for each colour, or shift, and switch to that tile (with the tilemap_set tiledata parameter) to give the illusion of change, but this seems a highly inefficient way of doing it, and a huge waste of graphical tile space, for something that should be done "on the fly" in code.
I believe the tile_set_blend() function would change the colour, but is now obsolete. I also believe the tile_set_region() function would have worked to shift the tile, but is also obsolete. It's annoying to know that something was possible in GMS1, and has taken a step backwards in GMS2. Game-making languages from over 20 years ago could perform these basic tasks.
For changing colour, I am aware that using sprites and image_blend can do this, but I need a solution for tiles. I am creating levels where using multiple sprites for this would not be practical. Also, using Shaders could be an option, but seems way over complex for something so simple.
Any advice or help would be appreciated!
Thanks.
Assume I have an 8x8 tile (as illustrated):
1) Is there any way to change the colour (or a specific colour) of the tile?
2) Is there any way to shift the contents (or grab a specific area) of the tile?
The original tile remains unaltered, but the modified output would need to be displayed on the screen (either directly, or via a buffer). I know that I could create multiple tiles for each colour, or shift, and switch to that tile (with the tilemap_set tiledata parameter) to give the illusion of change, but this seems a highly inefficient way of doing it, and a huge waste of graphical tile space, for something that should be done "on the fly" in code.
I believe the tile_set_blend() function would change the colour, but is now obsolete. I also believe the tile_set_region() function would have worked to shift the tile, but is also obsolete. It's annoying to know that something was possible in GMS1, and has taken a step backwards in GMS2. Game-making languages from over 20 years ago could perform these basic tasks.
For changing colour, I am aware that using sprites and image_blend can do this, but I need a solution for tiles. I am creating levels where using multiple sprites for this would not be practical. Also, using Shaders could be an option, but seems way over complex for something so simple.
Any advice or help would be appreciated!
Thanks.