Page 1 of 2 1 2 >
Topic Options
#81725 - 03/10/08 09:49 AM HWA Dynamic Light Example
Werbad


Registered: 10/11/06
Posts: 846
Loc: Sweden
Made an example showing how to 'easily' make lights in HWA. It also has code for dynamic shadow casting, but since the Overlay Object isn't HWA'd it runs a bit slow and don't correctly blend multiple lights.

Don't Try to run this in normal MMF since it uses HWA only effects and will therefore not appear correctly.

http://www.mediafire.com/?n9xdmu1cddl

The reason the unrar'ed file is 7mb is because the flashlight has 32 256x256 images due to rotation not being pasted correctly otherwise.
_________________________
//Jonas
www.phizix.tk

Top
#81742 - 03/10/08 11:42 AM Re: HWA Dynamic Light Example [Re: Werbad]
DanielRehn


Registered: 07/10/06
Posts: 945
Loc: Vindeln, Sweden
Awesome ^^
_________________________
/Daniel

www.phizix.tk

Top
#81746 - 03/10/08 12:28 PM Re: HWA Dynamic Light Example [Re: DanielRehn]
Illuminus


Registered: 02/20/07
Posts: 6
Very nice, this is great!

Top
#81750 - 03/10/08 12:34 PM Re: HWA Dynamic Light Example [Re: Illuminus]
Werbad


Registered: 10/11/06
Posts: 846
Loc: Sweden
If you inactivate the Shadow group it runs abut 400% faster on my computer... Want new overlay!
_________________________
//Jonas
www.phizix.tk

Top
#81768 - 03/10/08 02:25 PM Re: HWA Dynamic Light Example [Re: DanielRehn]
MechaBowser


Registered: 06/30/06
Posts: 1238
Loc: Denmark
That's really cool and I'd totally use it, if it wasn't because it lags so much D:
_________________________
I think this is cool

Top
#81770 - 03/10/08 02:31 PM Re: HWA Dynamic Light Example [Re: MechaBowser]
Werbad


Registered: 10/11/06
Posts: 846
Loc: Sweden
I've done some optimization that will limit what is processed and what walls on different tiles that will cast a shadow. With a 320x240 screen I've gotten it almost lagfree with 3 lights.

If only the Overlay could be HWA'd, that would probably solve all lag problems.

If you just want the lights and not the shadow casting you can disable the shadow group, this will make light blending work correctly and remove the lag.
_________________________
//Jonas
www.phizix.tk

Top
#81782 - 03/10/08 03:40 PM Re: HWA Dynamic Light Example [Re: Werbad]
MechaBowser


Registered: 06/30/06
Posts: 1238
Loc: Denmark
I think the main purpose of this threat is to show how to make the shadowing. In that case, optimizing the shadow effect is a must

I'd so use this all the time if the Overlay object could be fixed ~
_________________________
I think this is cool

Top
#81794 - 03/10/08 04:42 PM Re: HWA Dynamic Light Example [Re: MechaBowser]
raytrace


Registered: 08/09/06
Posts: 867
Loc: Westcountry, UK
considering MMF2 already creates its own 'frame' or image as such it would be nice to incoorperate "draw pixel" and "draw line" etc. features direct into the Frame, as overlay creates its own image on top of the MMF2 frame, using twice the memory and processing power
_________________________
Coming Soon - Feryl Studios - For more information please contact me - hugh@feryl.org

Top
#81795 - 03/10/08 04:43 PM Re: HWA Dynamic Light Example [Re: MechaBowser]
Sphax


Registered: 06/30/06
Posts: 2683
Loc: Paris, France
It could be great to find a way to cast the shadow in 360° (and not in 32 directions).
_________________________
FusionUpdater: Keep your extensions up to date and install new ones! [Updated: 12/14/2008]

Top
#81809 - 03/10/08 06:53 PM Re: HWA Dynamic Light Example [Re: Sphax]
Andos


Registered: 06/29/06
Posts: 1149
Loc: Århus C, Denmark
This isn't exactly HWA but I also made a little lighting engine:
http://click.andersriggelsen.dk/readcomment.php?id=63&type;=1
(credit goes to Stuckboy as well)

It doesn't support multiple lights though :P
Overlay + some pixel shaders would make this look magically
_________________________
click.andersriggelsen.dk - open source extensions

Top
Page 1 of 2 1 2 >


Site Links
Forum Index

Home Page
Online Store
Tutorials
Download Center
French Forum
Quick File Links
Multimedia Fusion 2
Updates - build 248
Standard Version
Developer Version

Extension Packs
Bonus Pack 1
Bonus Pack 2
z33z Extension Pack
LIJI Extension Pack

The Games Factory 2
Latest Update - build 248
Community Links
Madword Arcade

GameBuilder
Fusion2Developers
The Daily Click

Extensions
Neatwares Extension List
Extension Updater (FusionUpdater)
Zoom Gamer
Click Chat
6 People are chatting