Bare minimum to turn on/off a light in the game - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Open Source Collaboration (https://www.frictionalgames.com/forum/forum-27.html) +--- Forum: Overture (https://www.frictionalgames.com/forum/forum-29.html) +--- Thread: Bare minimum to turn on/off a light in the game (/thread-24588.html) |
Bare minimum to turn on/off a light in the game - jorgeas80 - 02-10-2014 Hello, I have a LEDs lamp that can be turned on using a C library. I mean: I can send my lamp messages like "use this RGB color during this amount of time". It accepts effects like flickering or fade too. So, I have this lamp in my desk, and I want to "connect" the game with it. For example:
I've successfully compiled the code. And I can link with my C library. Now, I just want to work with the light part of the engine. Looks like there are 2 main classes I should work with:
I guess I should modify the method FadeTo of iLight class, to send the proper RGB code and time to my lamp, using my own library's functions. So, any time a light is turned on in the game, is also turned on in my desk. Apart from that, am I missing something important, in order to achieve my goals? I'm also adding a new menu entry to enable/disable my stuff, but this is a different story, involving MainMenu.cpp, mostly. Any tip is appreciated. Many thanks in advance! RE: Bare minimum to turn on/off a light in the game - jorgeas80 - 02-13-2014 Update: found Light class and children (Light2D, Light3D, Light3DSpot, Light3DPoint) in HPL1Engine code. Looks more promising. Anyway, I'd like to know how many kinds of light exist in the game, to know if I should turn on my lamp with all of them, and how to turn it on. Examples:
Is there any place where I can find a list of all the lights in the game? And about the idea of include my code inside the Light class and/or its children: is it right? RE: Bare minimum to turn on/off a light in the game - Gunslingerjh - 02-17-2014 Sounds interesting! Unfortunately programming is really not my thing.. I think someone from FG should check this out! RE: Bare minimum to turn on/off a light in the game - jorgeas80 - 02-17-2014 Thanks! I'm learning a lot, and using my github fork to keep track of everything. I'm now working to modify the HPL1Engine by adding calls to my library in certain points. It would be great if someone from FG could give me a hand, by just telling me where should I put my stuff. But I totally understand they're not paid for that. Anyway, everything is open source. And I'll publish the mod when finished. |