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

Author Topic: Conversion from the C++ Lightmanager to Ruby  (Read 5917 times)

0 Members and 1 Guest are viewing this topic.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Conversion from the C++ Lightmanager to Ruby
« on: April 09, 2011, 04:02:14 pm »
Aight I've done a working conversion of the light manager in the french wiki here: http://www.sfml-dev.org/wiki/fr/sources/lightmanager (Thx to google translation)

It can be found here: https://github.com/SFML/SFML/wiki/Ruby-Light-Manager

Also note that I do not require or load rbSFML in the file at all, I expect that you do this somewhere else in your application( I just realized I forgot to load the library after I uploaded it ).

Side Note: While doing this I found 4 bugs in rbSFML ^^
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Conversion from the C++ Lightmanager to Ruby
« Reply #1 on: April 09, 2011, 06:02:30 pm »
Quote
As soon as the Source page on the new SFML Wiki get's up I'll post it

You can use the new wiki, I opened it like two weeks ago.
Laurent Gomila - SFML developer

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Conversion from the C++ Lightmanager to Ruby
« Reply #2 on: April 09, 2011, 06:24:13 pm »
Quote from: "Laurent"
Quote
As soon as the Source page on the new SFML Wiki get's up I'll post it

You can use the new wiki, I opened it like two weeks ago.


I know but you haven't created a Source page yet and since I don't know how you want the general structure to look like, I don't touch it ^^
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Conversion from the C++ Lightmanager to Ruby
« Reply #3 on: April 09, 2011, 06:56:48 pm »
I'm not going to create it. The general structure is like the old page, and like the Tutorials page which has already been converted to the new wiki.
Laurent Gomila - SFML developer

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Conversion from the C++ Lightmanager to Ruby
« Reply #4 on: April 09, 2011, 07:09:05 pm »
Hmm there was a source page already in place? But why is the link red?

Anyway I am creating a page now for the light manager. But I am having trouble explaining something in English.

Quote

Well I want to work more on the class as I really enjoy working with lighting. Some of the plans to add is:
* Follow the target view for rendering.
* Support Z-layers for games that want depth or maybe tiled levels/floors.


The bolded part is the thing I am trying to explain. Is that descriptive enough? What I mean is when you have a 2D game and you can maybe enter a building and then walk up a stair and then you are on the second floor but no level change has been done. Don't know if there's any better word/description for it?
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Conversion from the C++ Lightmanager to Ruby
« Reply #5 on: April 09, 2011, 07:14:12 pm »
Also just noticed that the source I gave out had the zlib license with my name on it, I'll remove that since I'm not the one that did the original.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Conversion from the C++ Lightmanager to Ruby
« Reply #6 on: April 09, 2011, 08:12:19 pm »
Now the source page is up and done I've modified the first post to direct people to it: https://github.com/SFML/SFML/wiki/Ruby-Light-Manager
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Conversion from the C++ Lightmanager to Ruby
« Reply #7 on: April 14, 2011, 12:49:49 am »
Done some updates. Changed the intensity calculation. Added a Debug mode which will make the light show the actual triangles in a bright green colour.

Also did some changes to the example code to show everything in action. Noticed that by adding more walls the example slowed down dramatically. Will be optimizing this. Currently I only have the idea to have the light sort out walls who's points are not inside the light radius in a much efficient way( though might look a bit dirty )

Anyway enjoy:
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

 

anything