Back when I was creating Splinter Source, I used a very primitive and stupid method for the shadows; they were all active objects. Originally, I actually had 32x32 tiles making up the shadows but I ran into an object limit problem. So what I did was took a screen shot of the map, cropped out the objects and only kept the shadows so I had one huge active object for all the shadows. Ya, like I said really stupid.
Anyways, it seems to me I should be able to acomplish a more efficient effect with the overlay redux object but I have no idea how. Any insight would the helpful.
Well, if you'd like to try something strange, I'd recommend (as I always do) the Text Blitter.
Since the shadows are simply 32x32 pixel tiles (correct?) you can put the data of what tiles're where in an external file, and have a mere than 4 Text Blitters displaying them appropriately.
The strange part would come from making the way to create the shadowmap data, the way to display it properly, and a new way to detect if the character is actually IN shadow.
But it would totally work in the end.
Go Moon!
Deleted User
21st January, 2007 at 22:48:13 -
If you are using MMF 2, there is a much more simple solution. First, simply create a new layer and name it "shadows". On that layer, place all the shadows as obstacle backdrop objects, possibly with semitransparency. Next, create a new active object named "shadow detector" and put it on the same layer. Simply position the "shadow detector" to the X,Y position of the player, but it should stick on the "shadow" layer instead. If the "shadow detector" is overlapping a backdrop, then the player is in the shadows. Thats it, easy huh?
If you are using MMF 1.5, then go with the method that Fifth came up with. Sounds clever to me- however you could also just use an array, fastloops and a small bunch of active objects... Well, if you want me to explain this further, just tell me.
Haha sorry if this is too noobish, im new to MMF 2.
Heh now this made me really motivated to make a stealth "sneak em' up" myself~ Hmm, i wonder...
ok i just used the match rgb function and everything works well. HOWEVER. For some reason, although my overlay is visible in the frame editor, its not visible when the game is actually running. The reason seems to be the 'transparent mode' check box. Any idea why this is happening?