Luven - Minimalist light engine

Showcase your libraries, tools and other projects that help your fellow love users.
MissDanish
Citizen
Posts: 65
Joined: Wed Mar 07, 2018 11:21 pm

Re: Luven - Minimalist light engine

Post by MissDanish »

ChicoGameDev wrote: Sat Feb 23, 2019 3:44 pm Yeah you are right I will work on optimization ! But if you have any suggestions I'll be happy to hear them :awesome:
I haven't peaked into your code but an important thing to do when making a light system is to destroy all canvases when they're out of range. A canvas that is not drawn on screen will not only take up a large amount of VRAM but even GPU processing.
ChicoGameDev wrote: Sat Feb 23, 2019 5:29 am
Yeahyay wrote: Sat Feb 23, 2019 2:04 am Would you be able to implement cone lights as well?
Hum, it would be useful only on 2d side-scroller no ? Could you please elaborate a little bit ?
This is what cone lights look like, this is an ancient screenshot from my game back when I used the Lights vs Shadows light system:
conelights.png
conelights.png (584.4 KiB) Viewed 19977 times
Cone lights can be made from a circular light, it probably wouldn't be hard to add it to your system.

I hope this helps a bit, would to see another good light system for LÖVE. I currently use Shädows which is not really ideal as it has a ton of features I don't need (like shadows).
User avatar
ChicoGameDev
Citizen
Posts: 71
Joined: Thu Feb 14, 2019 6:02 pm
Location: Switzerland
Contact:

Re: Luven - Minimalist light engine

Post by ChicoGameDev »

Hello everybody,
Nelvin wrote: Mon Feb 25, 2019 6:50 am Hm, not sure - I don't use camera alike systems alot or transform objects at all (my project is using Löve 0.10.2).

But in the end, what's required would be to transform any light on the screen to just the scaled down canvas so I guess what you'd have to do is to add the scaling to your camera transform and use the resulting transform to render all the lights to the canvas, then pop the transform (including the one used by the camera) and render the lightmap scaled to the full screen.
Thanks I will try again I probably just missed something :D
yetneverdone wrote: Mon Feb 25, 2019 8:11 am Hmmm since it has camera, what if don't render or process light when outside the camera boundaries?
Optimization that will probably comes in a future version :nyu:
yetneverdone wrote: Mon Feb 25, 2019 8:11 am Also, does it really have to integrate camera to lighting system? What if users use other full-featured camera?


Here is my thinking about that :
During development I had problems between the shader and the camera, and it appears that the two of them where linked in many ways. Now that I'm experimenting without the shader, it looses a bit of interest to have an integrated camera system BUT actually... I like it a lot, I'm looking for making Luven a good "First lib to install when starting a new Löve2D project"... And actually I read a lot of cases where the Light system is not compatible with the camera system and peoples had to do a lot of tweaks to make them work together.. No problemo with Luven :ultrahappy:

However to tell Luven to let you manage the camera, just pass "false" as a third parameter to

Code: Select all

Luven.init(screenWidth, screenHeight, useCamera)
MissDanish wrote: Mon Feb 25, 2019 9:38 am I haven't peaked into your code but an important thing to do when making a light system is to destroy all canvases when they're out of range. A canvas that is not drawn on screen will not only take up a large amount of VRAM but even GPU processing.
Thanks for your participation (and your follow on twitter :D). Actually Luven use no canvas and is slow because of my poor shader knowledge, but I'm currently working on a optimized version that will use canvases, so thanks a lot for insights.
MissDanish wrote: Mon Feb 25, 2019 9:38 am I hope this helps a bit, would to see another good light system for LÖVE. I currently use Shädows which is not really ideal as it has a ton of features I don't need (like shadows).
That's it ! No shadows, Luven only bring lights to your worlds ! That's the philosophy. Glad you like the idea !


Thanks everybody, stay tuned for new version.



Regards
Lionel Leeser

Luven : https://github.com/halsten-dev/Luven

--

Always keep Game Dev as a passion.
User avatar
yetneverdone
Party member
Posts: 448
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Luven - Minimalist light engine

Post by yetneverdone »

Hmmm I haven't tried any other lighting system so i will believe in your experience with them.

With that said, do you plan to add more features to the camera side? Stalker-x is a really good camera lib for reference
User avatar
ChicoGameDev
Citizen
Posts: 71
Joined: Thu Feb 14, 2019 6:02 pm
Location: Switzerland
Contact:

Re: Luven - Minimalist light engine

Post by ChicoGameDev »

yetneverdone wrote: Mon Feb 25, 2019 11:16 am With that said, do you plan to add more features to the camera side?
Of course I do ! I just couldn't think of more simple features for the first release. In my opinion the shake feature is the most useful :crazy: !
yetneverdone wrote: Mon Feb 25, 2019 11:16 am Stalker-x is a really good camera lib for reference
Thanks for suggestion I will take a look.


Regards
Lionel Leeser

Luven : https://github.com/halsten-dev/Luven

--

Always keep Game Dev as a passion.
User avatar
ChicoGameDev
Citizen
Posts: 71
Joined: Thu Feb 14, 2019 6:02 pm
Location: Switzerland
Contact:

Luven v1.1 - Minimalist light engine

Post by ChicoGameDev »

Hey everybody !!!

Your requests have been heard !

So here I come with Luven v1.1 !

Lets grab it on my github :
https://github.com/chicogamedev/Luven

What's news ? More FPS... :rofl:

More possibilities, cone lights by default (hardly requested).

And if the lights by default don't suit your need :

Check out this page : https://github.com/chicogamedev/Luven/wiki/Good-to-know

Thanks all for your interest and please feel free to give me feedback and do not hesitate to post an issue on the repo :
https://github.com/chicogamedev/Luven/issues

I'm never very far from a keyboard we can chat about your needs !

I love working on Luven for this community. I'm very happy to have joined in !


Regards
Lionel Leeser

Luven : https://github.com/halsten-dev/Luven

--

Always keep Game Dev as a passion.
lerabot
Prole
Posts: 2
Joined: Fri Apr 19, 2019 3:47 pm

Re: Luven - Minimalist light engine

Post by lerabot »

Hey, I've been using your lib and was wondering if we could use on own camera?
Yeahyay
Prole
Posts: 7
Joined: Sat Feb 23, 2019 1:58 am
Contact:

Re: Luven - Minimalist light engine

Post by Yeahyay »

lerabot wrote: Fri May 03, 2019 12:25 am Hey, I've been using your lib and was wondering if we could use on own camera?
I'm late as hell but just for anybody else reading, yes. Just convert camera coordinates into a love.math.newTransform object and send it to Luven.
User avatar
ChicoGameDev
Citizen
Posts: 71
Joined: Thu Feb 14, 2019 6:02 pm
Location: Switzerland
Contact:

Re: Luven - Minimalist light engine

Post by ChicoGameDev »

Hi, I'm actually late too... Sorry for inactivity.

Actually you just have to pass false as a third parameter to Luven.init. It will disable all the Luven camera system. You'll be able to use a custom or an already existing camera in your love.update and love.draw functions.

My answer can be a bit rusty because I'm not working since 2 month. Feel free to post your code and ask more questions.

Thanks for using Luven, I'm happy that it is usefull for you guys :)

Have a lövely day/evening/night.
Lionel Leeser

Luven : https://github.com/halsten-dev/Luven

--

Always keep Game Dev as a passion.
Yeahyay
Prole
Posts: 7
Joined: Sat Feb 23, 2019 1:58 am
Contact:

Re: Luven - Minimalist light engine

Post by Yeahyay »

Yeahyay wrote: Tue Jun 11, 2019 4:40 am
lerabot wrote: Fri May 03, 2019 12:25 am Hey, I've been using your lib and was wondering if we could use on own camera?
I'm late as hell but just for anybody else reading, yes.
Right:
Pass false on the third parameter to Luven.init().
Wrong:
To use luven's, just convert camera coordinates into a love.math.newTransform object and send it to Luven.
Oops.
User avatar
ChicoGameDev
Citizen
Posts: 71
Joined: Thu Feb 14, 2019 6:02 pm
Location: Switzerland
Contact:

Re: Luven - Minimalist light engine

Post by ChicoGameDev »

Hi everybody,

I'm very happy to announce the version 1.3 of Luven.

I've added missing getters and setters for lights properties, I've worked on the documentation too.

https://github.com/chicogamedev/Luven/wiki

As always I kept up to date the Trello : https://trello.com/b/4kLFwfyV/luven-love2d

You can find me on Twitter if needed : https://twitter.com/ChicoGameDev

Hope you're all happy with Luven. Do not hesitate to give me feedback and add issues to the repo for features requests that I might address.

https://github.com/chicogamedev/Luven/issues

Here's the download link for Luven 1.3 : https://github.com/chicogamedev/Luven/releases/tag/v1.3


Thanks for using Luven. :awesome:


Regards
Lionel Leeser

Luven : https://github.com/halsten-dev/Luven

--

Always keep Game Dev as a passion.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests