Use trigonometry to calculate the placement of the shadows. Then use an add effect on that part.
Seriously, Construct does make it a lot easier. There's like, a button for it. Otherwise, I'd seriously suggest you wait until MMF2 HWA is ready (if it isn't already - you could use the beta). It's much easier to use HWA (whether Construct or MMF2) since it already calculates all the long, annoying formulas for it, without much slowing down frame rate by much.
Also, you don't really want to spend a few weeks coding something buggy that you're just going to replace anyway, do you?
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Once again, if I had the possibility to use the ADD effect I know exactly how I would make it work like a charm, but I use MMF1.2 not MMF2, so I can't do it that way.
On a sidenote! I found the Overlay Redux object! YAY! But I don't have a clue on how to use it though... Anyone familiar with the object?
The result I'm after is this.
Say I have a platform game. Then I decide that one entire level would look good almost pitch black! To add to the play experience I want specific areas around lights lit up. How would one go about doing that with the overlay object? If it would help the lit area can be an active object.
Suggestions?
Hmm... I don't know exactly how you want this thing to look, but you can get a sort of "transparent boxes covering the screen" thing that works from a single light source (easily, at least) with little more than a single Text Blitter.
Looks like this:
I was able to do this in MMF 1.5, but it SHOULD work in 1.2, theoretically.
And it's a little blocky, but it looks nice enough in motion.
Just make a giant black active object with a hole cut out of the center that's the topmost order of your frame's Z-axis, and have it always follow your guy around where your guy's in the middle. You could then do some more trickery with transparencies of course, and this is very basic but it'd work.
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
It's made in MMF 1.5, but it'll work just as well in MMF2.
There's really not a lot to it. It just uses the Text Blitter's "callback" function to change each character's transparency based on its distance from the light source.
Originally Posted by Eternal Entertainment Yes that'd work for a light surrounding the player, but if the light is somewhere else lighting up a different location it'd be hard to accomplish.
Yeah, it is unfortunately. It's too bad you can't just "cut holes" in the big active whenever a torch of fireball overlaps it. I'm going to check out Fifth's example when I get home (in MMF1.5 too, hooray!)
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!