Posted By
Message
Andy Hull
Registered 08/07/2002
Points 111
15th December, 2006 at 12:51:29 -
Hey-- I was just curious about doing lighting effects in MMF2....
I made a solid layer in the top frame and switched the ink effect so that it makes the whole scene look like night, but I wanted to have lights in the scene, which would essentially by holes in the "darkness" layer that move around. How can i set this up so multiple holes move around and are cut out of the darkness, creating light areas in the room? Does anyone have an exmple file of this?
thanks...
Andy
-astro out
www.astrospoon.com
Knudde (Shab) Administrator
Crazy?
Registered 31/01/2003
Points 5125
15th December, 2006 at 15:11:34 -
Alpha Channels maybe?
I haven't really messed with them a whole bunch yet.
Craps, I'm an old man!
Ski TDC is my stress ballRegistered 13/03/2005
Points 10130
15th December, 2006 at 15:14:50 -
Why not? -.- The core should have some surely?
n/a
Knudde (Shab) Administrator
Crazy?
Registered 31/01/2003
Points 5125
15th December, 2006 at 16:04:13 -
Haven't touched it in at least 2 weeks, and it's still TGF driven.
Craps, I'm an old man!
bhlaab
Registered 19/06/2002
Points 73
15th December, 2006 at 16:11:49 -
The only ideas I can come up with would run completely unbearably slow :\
n/a
Fifth QuadrupedRegistered 07/05/2003
Points 5818
15th December, 2006 at 16:33:31 -
Hmm... I had something like that once, but it was only set up for one light source.
That, and it was a pretty low resolution. And it was tile-based, too, so it looked kinda blocky.
But the multiple light sources thing was the big issue.
Go Moon!
..:.Phox.:..
Registered 18/02/2005
Points 646
16th December, 2006 at 06:23:33 -
phizzy know how to do it I think.
I think he told me that it's done with the OR ink effect, but I'm not sure.
Profile edited as it messed the layout of the site up.
Pixelthief Dedicated klik scientistRegistered 02/01/2002
Points 3419
16th December, 2006 at 18:02:17 -
For a *single* hole of light, you can use a subapplication inside of a large, fullscreen black background. Swear I saw an example of it once.
Otherwise, any other method is bound to either take up massive CPU usage or lots of active objects (or both)
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
Pixelthief Dedicated klik scientistRegistered 02/01/2002
Points 3419
16th December, 2006 at 18:03:45 -
I wonder.
What if you used the overlay object with some raycasting effects, in order to give a shadow effect that overlaps backgrounds, and then had ALL active objects onscreen have their transparency set based on that difference. Then maybe you could do it without the subapplication.
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
axel Crazy?
Registered 05/02/2005
Points 4766
16th December, 2006 at 18:29:33 -
For one single hole, you could just use one big active, with a hole in it, maybe with some alpha blending too. But I guess that's kind of stupid. I also remember hearing something about the OR effect being able to do something like this, but I've never tried it myself. So there you go, unban phizzy and let him explain kplz?
n/a
Pixelthief Dedicated klik scientistRegistered 02/01/2002
Points 3419
16th December, 2006 at 19:14:30 -
You *can* use 1 big AO, if ur in TGF. Subapps make it easy in MMF, just place it in the middle of a first frame and load the second, real frame.
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
axel Crazy?
Registered 05/02/2005
Points 4766
16th December, 2006 at 20:03:31 -
Umm, yeah, but wouldn't that just give you a rectangular "hole"? I'm rather sure you could do it with ink effects somehow...
n/a
Pixelthief Dedicated klik scientistRegistered 02/01/2002
Points 3419
16th December, 2006 at 20:06:52 -
*cough* windows shape object */cough*
god, I made a very honest attempt at using MMF.
IT IS UNUSABLE. I GIVE UP. BACK TO TGF RAAAAHHHH Edited by the Author.
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
axel Crazy?
Registered 05/02/2005
Points 4766
16th December, 2006 at 20:20:13 -
Hmm, didn't know you could use Window Shape Object on subapps. Oh well. Edited by the Author.
n/a
LAustin
Registered 04/10/2011
Points 1
10th October, 2011 at 01:12:26 -
I HAVE A SOLUTION!
Create '3' Layers
On the 2nd Layer create a large black active object. 'Square'
Then change the ink effect to semi-Transparent and coefficient to 20.
Now create your player and put him at the 3rd layer and make him eight directions. or what ever you please.
Now on the 1st layer create a Active object that is a circle and white.
Now change the ink effect on that to Semi-Transparent and coefficient to 100
Ok then go into frame editor and Select 'Always' and put the position always on Player and you can even create another active object to test it!
Thank you and have a nice day.
"Forgive others, Its worth it."
nivram
Registered 20/07/2006
Points 171
10th October, 2011 at 04:01:33 -
Here is one example of lighting. Hope it helps.
Link:
http://www.castles-of-britain.com/mmf2examplespage15.htm
Marv
458 MMF2 & CTF 2.5 examples and games
http://www.castles-of-britain.com/mmf2examples.htm
Eternal Man [EE] Pitied the FOORegistered 18/01/2007
Points 2955
10th October, 2011 at 12:32:40 -
THE THREAD IS FIVE YEARS OLD.
You necrophiles..!
Eternal Entertainment's Code'n'Art Man
E_E = All Indie ...actually Ell Endie, but whatever.
nivram
Registered 20/07/2006
Points 171
10th October, 2011 at 16:29:38 -
Eternal Man [EE]. What are talking about the thread is 5 years old? It is from my archive of examples on my website.
Marv
458 MMF2 & CTF 2.5 examples and games
http://www.castles-of-britain.com/mmf2examples.htm
Eternal Man [EE] Pitied the FOORegistered 18/01/2007
Points 2955
10th October, 2011 at 18:18:47 -
Not your archive Marv! The last entry in this thread before those posted today was 16th December 2006.
So it's not really directed at you, rather at LAustin.
Eternal Entertainment's Code'n'Art Man
E_E = All Indie ...actually Ell Endie, but whatever.
AndyUK Mascot ManiacRegistered 01/08/2002
Points 14586
10th October, 2011 at 18:19:07 -
Look at the first post's date. Andy Hull wanted help in december 2006.
.
Sketchy Cornwall UKRegistered 06/11/2004
Points 1971
10th October, 2011 at 18:45:15 -
Just for the benefit of anyone else who might stumble upon this thread at a later date, here's another example:
https://skydrive.live.com/self.aspx/Public/LightsEg.mfa?cid=b1e7ee094271bbda&sc=documents
n/a
nivram
Registered 20/07/2006
Points 171
10th October, 2011 at 23:56:18 -
Thanks for clearing that up Eternal Man [EE].
Sorry
Marv
458 MMF2 & CTF 2.5 examples and games
http://www.castles-of-britain.com/mmf2examples.htm
Chris Burrows Registered 14/09/2002
Points 2396
11th October, 2011 at 02:02:11 -
Great example Sketchy. How exactly does it work? If I copy the Active object into another game it just appears as a black circle?
n/a
Rikus Administrator
Crazy for NewsRegistered 02/12/2001
Points 980502
11th October, 2011 at 07:11:49 -
i tried it to but got the same circle effect.
Be sure to follow us on the twitters for the latest and greatest: @dailyclick
Sketchy Cornwall UKRegistered 06/11/2004
Points 1971
12th October, 2011 at 13:37:00 -
The example uses 2 layers:
* The background layer (in an actual game, this would be all your layers containing backgrounds, sprites, etc)
* The darkness layer
(and then in a game, you'd probably have a layer on top of that, containing your HUD with score, lives, etc)
The darkness layer has a "subtract" effect applied to the layer itself. The white background object means that 255 is subtracted from the red, green and blue values of each pixel (ie. they are made black) - except where there are black "light" objects. Basically, the darkness layer is the inverse of what you want - a lighter color represents darkness.
You can play around and create some nice fog effects using a similar method: https://skydrive.live.com/self.aspx/Public/LightsEg2.mfa?cid=b1e7ee094271bbda&sc=documents Edited by Sketchy
n/a
Chris Burrows Registered 14/09/2002
Points 2396
13th October, 2011 at 00:35:15 -
Thanks Sketchy, I didn't spot that. Cheers
n/a
Fanotherpg I'm living proofRegistered 26/06/2004
Points 522
17th October, 2011 at 00:20:43 -
http://cid-b1e7ee094271bbda.office.live.com/self.aspx/Public/LightsEg.mfa <- Uses HWA and Layer Effects as well as alpha channels on objects - 1 light, 1 Active object
http://cid-b1e7ee094271bbda.office.live.com/self.aspx/Public/fow.mfa <- Uses surface Object.
There was also one by Andos but I can't find it. Those two are by MuddyMole and I based on LightsEg my game.
My Real Fog Of War based on it.
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=250108#Post250108
www.therpg.pl
Sketchy Cornwall UKRegistered 06/11/2004
Points 1971
17th October, 2011 at 02:51:49 -
MuddyMole = Me (The first of those examples is the one I just posted here).
Andos' shadow-caster engine is really very impressive - the only downside is the complexity of the code (and possibly performance).
That's a nice FoW example you've made - going to have to try and figure out how it works, when I have the time...
n/a
Fanotherpg I'm living proofRegistered 26/06/2004
Points 522
17th October, 2011 at 16:07:04 -
Sketchy - I just read thread name on right hand site of side, I haven't check the posts here - LOL.
Also That FOW works but it got some issues MMF not always paste the object but saves data properly - ODD.
But if you can improve it I would be grateful (I was thinking about adding Internal List Object and Fast Loops.
www.therpg.pl
Pixelthief Dedicated klik scientistRegistered 02/01/2002
Points 3419
18th October, 2011 at 19:46:03 -
Hey, someone *just* asked me for a raycasting shadow engine a few days ago, and I couldn't find my old file, so I just made a new one quickly in < 10 minutes. So I can actually post that a second time if it helps!
https://sites.google.com/site/claniraq02/shadows.mfa?attredirects=0&d=1
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
Fanotherpg I'm living proofRegistered 26/06/2004
Points 522
20th October, 2011 at 00:20:23 -
And this is why I'm saying that even in your case simple enemies are F* complicated. How you manage to do it in less than 10 minutes?
www.therpg.pl