Fla5h

phaser and 2d lighting

Recommended Posts

how can i add lighting into my game? i was thinking about trying out illuminated-js, has anyone else tried it with phaser or can phaser do basic lighting by itself?

Im used to working with unity 3d, goo engine ,and blender (you just add a light to your scene and place it where you want) so 2d lighting is new to me.

 

I want something simple like the little green orbs. And white orb in the below pic. The two images below are from a game called luminesca which was made in unity if i remember correctly.

lum2.jpg

5-obrazky-z-chystane-indie-hry-luminesca

 

 I had no problem with this effect in unity but now i want to try it with phaser. I was thinking maybe use canvas to add a mask over the game and only show areas with light? Any help?

 

light example 1

light example 2

light example 3

light example 4

Share this post


Link to post
Share on other sites

Lights are a natural and easy part of any 3D engine, like those you listed, because they're part of the under-pinning technology and cheap to create. However when it comes to 2D they basically need to be faked, and the best way of achieving that varies depending on the game style. Sometimes carefully placed sprites, sometimes an overlay cut-away canvas, in newer browsers blend modes will help with this, but at the end of the day it's still all just faked one way or another.

Share this post


Link to post
Share on other sites

have a look at this game....its a genius game working with light masks....may not be exactly what you are looking for....but will give you some idea nonetheless...

 

Pixel Lanternbearer

Play Url - https://dl.dropboxusercontent.com/u/51179665/html/LD28/index.html

Source Url - https://dl.dropboxusercontent.com/u/51179665/other/felixnemisLD28.zip

Site - http://www.ludumdare.com/compo/ludum-dare-28/?action=preview&uid=6525

 

also you can visit http://pgl.ilinov.eu/?order=source&dir=desc to checkout the source of some really good games made with phaser and how they work....

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.