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

Post Reply  Post Oekaki 
 

Posted By Message

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