The Daily Click ::. Forums ::. Klik Coding Help ::. Lightsource
 

Post Reply  Post Oekaki 
 

Posted By Message

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
1st September, 2008 at 04:16:10 -

So, I was wondering if anyone has a clue if you can make a lightsource in MMF1.2? The ideal would be to have a black filter over the entire playfield and do something like the add/subtract ink effect in MMF2 ie "removing" the black filter over the lightsource. I think I have tried almost anything, but I can't get it to work anyways. Anyone want to have a go?

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
1st September, 2008 at 20:31:14 -

Use Construct Lol, once MMF2 has HWA, it should be easier, I guess. The best you can do is probably add a drop shadow that attaches to the sprite you want it to shadow, and make it semi-transparent. Then when it goes near a light source, make it less transparent. That should give it the illusion of a shadow.

But it doesn't give it from a distance. If you want accurate, easy shadowing, well, Construct does that if you (and your players) have decent hardware. It's not really worth the hassle otherwise.

 
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.

Image

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
1st September, 2008 at 20:58:01 -

"Use Construct" is not really a solution, now is it? It's only a recommendation for a program other than MMF...

 
Old member (~2004-2007).

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
1st September, 2008 at 20:58:22 -

"Use Construct Lol, once MMF2 has HWA, it should be easier"

Yeah. MMF2 HWA is probably ten times more stable than construct atm

 
n/a

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
1st September, 2008 at 22:24:51 -

Thanks, but I don't want to use construct, it's not stable in it's current form and I love MMF as it is, and I'm just going to love it even more when I get MMF2(I use 1.2 at the moment).

Back on topic though, I'm not looking for dynamic shadows, the effect I'm looking for is lighting up a specific part of a dark area. Any ideas on that?

//EE

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
2nd September, 2008 at 03:06:59 -

Oh wow... it's starting to get beyond lame that Construct is becoming the new Mac, and MMF is the new Windows.

"Wanna solve all your problems? Get Construct!"
"Wanna solve all your problems? Get Mac!"

 
http://www.facebook.com/truediamondgame

aphant



Registered
  18/05/2008
Points
  1242
2nd September, 2008 at 06:30:23 -


Originally Posted by BrandonC
Oh wow... it's starting to get beyond lame that Construct is becoming the new Mac, and MMF is the new Windows.

"Wanna solve all your problems? Get Construct!"
"Wanna solve all your problems? Get Mac!"



There would still be one problem left to solve: Getting Construct on your new Mac.

Is the light source static? Is there only one light source? Couldn't you have a big black fill over the screen and use the alpha channel to make the light source?

 

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
2nd September, 2008 at 17:44:38 -

I want the lightsource to be able to change positions and I would prefer if you could add static lightsources too.

I realize that this is probably impossible in MMF1.2 without using a complex mass of black actives, just wanted to hear it from more people so I can drop the vision and get MMF2.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
2nd September, 2008 at 17:49:29 -


Originally Posted by Adam Phant

There would still be one problem left to solve: Getting Construct on your new Mac.


Bootcamp, Parallels or Crossover!

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
2nd September, 2008 at 17:54:19 -


Originally Posted by BrandonC
Oh wow... it's starting to get beyond lame that Construct is becoming the new Mac, and MMF is the new Windows.

"Wanna solve all your problems? Get Construct!"
"Wanna solve all your problems? Get Mac!"



I thought it was Linux not Mac?

 
.

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
2nd September, 2008 at 20:58:43 -


Originally Posted by AndyUK

Originally Posted by BrandonC
Oh wow... it's starting to get beyond lame that Construct is becoming the new Mac, and MMF is the new Windows.

"Wanna solve all your problems? Get Construct!"
"Wanna solve all your problems? Get Mac!"



I thought it was Linux not Mac?



Ugh, anyone who knows about Linux and isn't using it, obviously doesn't care about it. I'm talking about fanboys who do nothing but support something that's clearly not worth the props it's given.

 
http://www.facebook.com/truediamondgame

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
3rd September, 2008 at 00:26:26 -

Switching to Mac solved all my problems. But hey, thats just what suited my personal needs.

Image Edited by the Author.

 
Image

Tell 'em Babs is 'ere...

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
3rd September, 2008 at 01:12:48 -

Setting Macs, Linux, Construct and the likes aside, any ideas on the lightsource?

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
3rd September, 2008 at 05:06:04 -

You could always just use a combination of Photoshop and Add/Subtract, like you mentioned. Just be careful about putting your screenshots pretty much anywhere within the click community. Adam will accuse you of "stealing" the lighting off of HFA, like he did to me with Arcane Tale. Apparently it's the only game allowed to use Add and Subtract effects for lighting. Don't say I didn't tell you so.

 
http://www.facebook.com/truediamondgame

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
3rd September, 2008 at 05:48:31 -

The problem with the add/subtract solution is that I'm currently using MMF1.2 which doesn't support add/subtract.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
3rd September, 2008 at 13:11:19 -

I guess no-one uses the overlay object nowadays??

Anders created a light/shadow engine using overlay:
http://click.andersriggelsen.dk/examplefiles.php

That example file uses MMF2, but if Overlay is available in MMF1.2 then you can use that do create the effect.

I would reccommend upgrading to MMF2 if you want to use the ink effects though.

 
n/a

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
3rd September, 2008 at 16:30:35 -

I've been thinking of using the overlay object several times, but I don't have it and can't find it!

I'm going to switch to MMF2 as soon as I can afford it though.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
3rd September, 2008 at 21:23:37 -

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.

Image

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
4th September, 2008 at 02:41:12 -

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?

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
4th September, 2008 at 04:33:46 -

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:
Image

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.

 
Go Moon!

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
4th September, 2008 at 04:36:16 -

That'd be great! But as usual I don't have and can't find the object. But thanks for all the help!

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
4th September, 2008 at 05:14:00 -

fifth can you put up an example of that! thats quite amazing.

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
4th September, 2008 at 15:24:03 -

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!

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
4th September, 2008 at 17:06:48 -

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.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
4th September, 2008 at 18:03:20 -


Originally Posted by cecil64
fifth can you put up an example of that! thats quite amazing.



Sure thing:

http://www.geocities.com/f4fth/darkness.zip

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.

 
Go Moon!

MitchHM



Registered
  23/03/2007
Points
  501

Game of the Week Winner
4th September, 2008 at 18:14:09 -

wow, you old genius you

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
5th September, 2008 at 21:11:51 -


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!

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
6th September, 2008 at 01:19:44 -

By Jove, I think I'm on to something...

Image
http://www.geocities.com/f4fth/darkness-2.zip

 
Go Moon!
   

Post Reply



 



Advertisement

Worth A Click