I'm surprised no one has attempted this light effect much since MMF2 launched. There has to be a way.
Yes, I looked at the thread, but a couple of the examples are just using a mouse-controlled spotlight effect, which is NOT what I want for my project. Mine, similar to the video I linked to above, is supposed to have a circle around the player character while the background is surrounded by darkness. I am looking for something simple, nothing extremely complicated.
This effect is incredibly easy to do in MMF2. I've done it for ArcaneTale. Unfortunately, I don't have MMF2 installed right now but I'll let you know how I did it.
First and foremost, you have to be using Hardware Acceleration in order for my method to work properly.
Next, create a new layer and set the co-efficient for the layers position to be 0,0 that way the layer doesn't scroll with the rest of the frame, it follows the camera. Now from coordinate 0,0 create a white object that's as large as the target resolution. For example, if your game is 640x480, make a white object at 0,0 that is 640x480 big.
Now create a sphere or gradient that's black and make sure it's in the middle of the white object because this is where the player should be if the screen is centered on them.
Last, the most important step... under the layers effects, change it to Subtract. This will make the white black and the black transparent.
If you did everything correctly (and the layer is ontop of everything you want dark) then you should get the effect you're looking for.
If you change the color of the white object, you can get off colors. Just remember that it's subtracting, so the color of the active object is the opposite of the color your offsetting. So a light orange for example, will give you a dark blue, which is perfect for night.
I hope this helps. If you have a hard time, I'll see if I can find my MMF2 disk and make you an open source example.