Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Curious About Lighting  (Read 1651 times)

0 Members and 1 Guest are viewing this topic.

Clockwork

  • Newbie
  • *
  • Posts: 47
    • View Profile
Curious About Lighting
« on: August 29, 2013, 03:42:07 am »
Hey everybody!

I saw all of the Game Jam entries and had a stroke of inspiration.  I want to get a relatively simple lighting system ready that I might be able to use for some future projects.  I found this tutorial that would be perfect for what I would like, but it's written in an earlier version of SFML (1.6 I think).

(Link) http://www.facepunch.com/threads/showthread.php?t=1011659

Is this a relatively good system for lighting and if so, how would I convert it to SFML 1.6?  The majority of it works, but the stuff like sf::Shape::Line does not.

It doesn't really matter though, any 2D lighting system would be appreciated!

Thank you! :D

Lo-X

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
    • My personal website, with CV, portfolio and projects
Re: Curious About Lighting
« Reply #1 on: August 29, 2013, 08:45:03 am »
I don't have the code here at work but that's where I adapted my lighting system, from which I took just one or two things for my Jam game.

In y memories adapting that code for sfml 2 is really easy.

Concerning if it is the best way to do it, I don't know. You can manage nice number of lights before the fps drops, but some guys around here use shaders and you can probably have more lights like that.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Curious About Lighting
« Reply #2 on: August 29, 2013, 11:06:47 am »
There is an interesting library, Let There Be Light, and its successor GLLight2D. You can either directly use it, or take a look at its source code for inspiration :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Clockwork

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Curious About Lighting
« Reply #3 on: August 29, 2013, 03:42:12 pm »
Wow, that's really cool!

That's exactly what I was looking for, thanks guys.  ;D