[quote data-userid="17" data-postid="66447"]
Now about your amazing trick in DizzyAGE, you own us an explanation :smile:
Just a quick guess – do you have the graphics white in the background, than paint white dizzy, then another set of brushes (white rectangles with no alpha) painting the proper colors with modulate?
[/quote]
I wasn't sure what you meant at first, but i get it now. I've never tried anything like that, and didn't even know it could be done! interesting... i may try something like that. It would be a bit of a pain to do though, painting every object (and item) twice.
i may modify my rather complex coding to incorporate something like that tho.
the way i did it is as follows:
it's relatively easy to change the actual colour of dizzy depending on what he collides with. the issue is how to break it down into blocks of colour. So what i did was draw 9 'Dizzys' elsewhere in the map, then use coding in the HandlerGameAfterUpdate() function to specify which part of the tile was shown for each 'dizzy', and then to position that part of the tile over the main 'dizzy' character. So there are actually 2 dizzys, one on top of the other. The only difference is that the one on top is made up of 9 blocks, each 8x8 pixels.
then what i do is use a small bit of code i wrote for CoTM to determine when each of those 9 blocks collides with an object in the room. If it does, it finds the colour of that object, and changes the colour of that 8x8 block to be the colour of the object. The original Dizzy tile is still white behind the 9 coloured blocks.
See the picture below for a more graphic explanation.
http://i402.photobucket.com/albums/pp106/eqixx/colourdiz.pngthe only problem with this is that it doesn't exactly correspond to the colour directly behind him, as if he moves 4 pixels to either his left or right, all the 8x8 blocks will be half-way between one colour and another.
The solution would be to make him up of 36 4x4 blocks instead, which should fix the issue.
I hope that satisfies everyone, and is clear enough! :tongue: