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

Author Topic: SFML Light System - Let There Be Light  (Read 250244 times)

0 Members and 1 Guest are viewing this topic.

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
SFML Light System - Let There Be Light
« Reply #30 on: February 25, 2012, 02:51:16 am »
I really enjoyed your code, I think I will just put this deep in the Parabola Engine!

Would you mind if I use your code, with possible modifications, even for redistributing later? You get credit for it anyway!


Question, I am using Visual Studio 2008 and while trying to compile your code, the compiler actually can't find unique_ptr. I guess I don't have the C++11 ready in my compiler? What do you advice?

Thanks in advance.

Ockonal

  • Jr. Member
  • **
  • Posts: 58
    • ICQ Messenger - 449909010
    • View Profile
    • WinCode
SFML Light System - Let There Be Light
« Reply #31 on: February 25, 2012, 12:49:03 pm »
Quote from: "DevilWithin"

Question, I am using Visual Studio 2008 and while trying to compile your code, the compiler actually can't find unique_ptr. I guess I don't have the C++11 ready in my compiler? What do you advice?


Yes, c++1x support became after 2008 version of visual studio. Try to upgrade it.
Developing 2d engine&game using: sfml, box2d, librocket, spark2, zoom&zoost, thor

Ockonal

  • Jr. Member
  • **
  • Posts: 58
    • ICQ Messenger - 449909010
    • View Profile
    • WinCode
SFML Light System - Let There Be Light
« Reply #32 on: February 28, 2012, 12:24:23 pm »
lolz123, Any news? :) If something is wrong you could connect with me and I'll try to help you. Just don't want rewrite your code if there are some new changes ;)
Developing 2d engine&game using: sfml, box2d, librocket, spark2, zoom&zoost, thor

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
SFML Light System - Let There Be Light
« Reply #33 on: February 28, 2012, 01:17:38 pm »
Thanks Ockogonal for the support as well!

I've updated all my stuff to VS2010 now, it seems to be fine :)

Now its time to implement everything into my own scene :)

One question, ConvexHulls are the only thing i should use to make the shadow casting shapes right?

Ockonal

  • Jr. Member
  • **
  • Posts: 58
    • ICQ Messenger - 449909010
    • View Profile
    • WinCode
SFML Light System - Let There Be Light
« Reply #34 on: February 28, 2012, 02:10:00 pm »
DevilWithin, ;)
Yeah, ConvexHull is the only thing.

Btw, I'm using box2d in my engine and there is already defining the shape of the objects. It's normally that shadow could be dropped only by physic bodies. So I just convert physic shapes into ConvexHull at creating.
Developing 2d engine&game using: sfml, box2d, librocket, spark2, zoom&zoost, thor

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
SFML Light System - Let There Be Light
« Reply #35 on: February 29, 2012, 02:35:47 am »
Your idea is indeed nice!

I was thinking of handling this by creating a utility class, a Shape extended.

That would be a collection of sf::Shapes, to allow concave shapes, or simply sets of them..

This would not be a bad idea because it could generate ConvexHulls, Box2D multi-fixtured bodies as well as rendering sf::Shapes..

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
SFML Light System - Let There Be Light
« Reply #36 on: March 01, 2012, 06:30:55 pm »
Quote from: "DevilWithin"
I was thinking of handling this by creating a utility class, a Shape extended.

That would be a collection of sf::Shapes, to allow concave shapes, or simply sets of them..
No need to reinvent the wheel, I've already written such a class ;)

By the way, my library also contains a triangulation algorithm, in case you want to split a polygon into triangles.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
SFML Light System - Let There Be Light
« Reply #37 on: March 01, 2012, 10:00:12 pm »
Quote from: "Nexus"
Quote from: "DevilWithin"
I was thinking of handling this by creating a utility class, a Shape extended.

That would be a collection of sf::Shapes, to allow concave shapes, or simply sets of them..
No need to reinvent the wheel, I've already written such a class ;)

By the way, my library also contains a triangulation algorithm, in case you want to split a polygon into triangles.


Woo, I keep getting nice news ! Specially that triangulation thing, is just something on my todo list ! :)

Do you mind if i "copy" your design? I won't link to more libraries for simpleness sake (already linking to 6 or more). However i will gladly credit you as a contributor to the engine framework.

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
SFML Light System - Let There Be Light
« Reply #38 on: March 02, 2012, 02:37:14 am »
Sorry that it has been taking so long for me to make the next version. It is practically finished now, I am just hunting for some minor bugs now. The next version (1.2) should be available for download by tomorrow. Here are some things that have changed:

- Fixed (hopefully) the strange artifacting occurring on some machines
- Cleaned up light and hull interfaces, they now do most AABB updates automatically
- Light rendering is a bit faster, since I found a way around saving the OpenGL states
- Fixed some AABB misalignment issues

Also, I wrote a manual for it. It includes a walkthrough for the demo program, and detailed descriptions of all of the core classes.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
SFML Light System - Let There Be Light
« Reply #39 on: March 02, 2012, 03:11:16 am »
You already found a user to the next version! Thanks :)

ChonDee

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
SFML Light System - Let There Be Light
« Reply #40 on: March 02, 2012, 05:07:05 am »
I'm looking forward to see it as well, keep up the good work!

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
SFML Light System - Let There Be Light
« Reply #41 on: March 02, 2012, 06:42:12 pm »
Quote from: "DevilWithin"
Do you mind if i "copy" your design? I won't link to more libraries for simpleness sake (already linking to 6 or more).
No, please just regard the license ;)
You can also copy the whole files required to triangulation and use them directly in your project. Then you can replace them easily in case I improve something, fix a bug or the like...

By the way, maybe you should wait until SFML 2 is out, because the naming convention in SFML (and probably also in Thor) might still change.

Quote from: "DevilWithin"
However i will gladly credit you as a contributor to the engine framework.
That would be nice, thanks :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
SFML Light System - Let There Be Light
« Reply #42 on: March 03, 2012, 01:21:56 am »
Version 1.2 is now available for download!

Please let me know of any bugs you find!
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
SFML Light System - Let There Be Light
« Reply #43 on: March 03, 2012, 03:26:37 am »
zlib just the license I am planning to release under! :) Yes, i certainly will use your triangulation code :D Thanks!

My library is already using the nameConvention, i decided i don't like NameConvention anymore! When you guys change, I will lose some time adapting the code, its not a problem !

Now that the lib is better than ever and approaching an alpha release, I will really need criticism, testing , you know the drill..

@mr. author of the awesome lighting system

Thanks! Indeed, Thanks!

Though, there is one more thing I would like to ask to you or anyone that can answer. How do I manuals in the style of yours? I really liked the idea of making a PDF, exactly like yours, to describe my work. Thanks

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
SFML Light System - Let There Be Light
« Reply #44 on: March 03, 2012, 05:30:31 am »
I used MS Word to write the manual. I simply saved it as a PDF. Nothing fancy  :)
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

 

anything