This topic contains 5 replies, has 0 voices, and was last updated by  HerrVlkr 1 year, 7 months ago.

  • Author
    Posts
  • #7831

    HerrVlkr
    Participant

    I’ve got DMX RGB lighting that I use for Artemis bridge simulator. Search for YouTube videos if you don’t know what Artemis is…

    I will probably be doing a Scorched3D LAN party at my workplace. I thought it would really be cool to be able to connect DMX lighting to the server and have the lights flash and flicker on shield hits, explosions and such.

    The interface for Artemis is based on the $70 Enttec Open DMX USB controller (http://www.enttec.com/?main_menu=Products&pn=70303). Under the hood this controller used the FTDI FT232BM. The interface is pretty simple to use and the controller is much cheaper than your typical pro grade DMX. There is even a cheaper version of the Enttec Open DMX you can create with a little work (http://stevenbreuls.com/2014/03/diy-usb-dmx-controller-for-under-10_2_ethernet_cable/).

    So I would need to tap into various events. With just a quick look, I don’t think this can be accomplished with modding. Or did I miss something?

    I pulled down the code and wonder if an ‘event API’ were exposed. A direct DMX interface could just be created. But a generic API would have longer term uses. I might start to play around with this to see just what it would take.

    Thoughts? Ideas?

    #66246

    PeanutsRevenge
    Participant

    I’ve nudged the only active modder about, hopefully he’ll be able to let ya know one way or the other.

    #66247

    ArmorWraith
    Participant

    Hmm. I think there’s a way to get a log file for server events. It would have to be more basic than that I think, maybe flashing lights solely when players are killed.

    You would probably have to write either a mini program to hook into server events log file, or go more in depth and write one for actual engine events within the C++ framework.

    I know for sure chat logs are recorded. So if you could mod every weapon explosion to ping the chat (not too difficult, just time). Something could be rigged up via the xml, assuming your controller could hook into the chat/server log.

    maybe something could be done with LUA, theres a handy xml script you could potentially call functions with. You would have to tie this to basic events too though, like death or explosions.
    Honestly Im not 100% sure how you would do this without having rewrote the engine or hard coding a plugin. Not sure what kinds of caps Gavin put on the engine either, most likely constrained to game functions to limit the potential for malicious activities.

    WeaponScript
    Executes the given script file when the weapon is fired. See Scripting.



    string
    The name of the script file to run e.g. data/lua/accessories/test.lua
    string
    The name of the function in the file to execute when run

    A set of zero or more variables that will be passed to the script (optional)

    string
    string

    Sorry I couldn’t be more help. Gavin would be the man to contact on this one. I can’t promise you anything though, he’s a busy busy man. Private message is the only way I know to reach him.

    memberlist.php?mode=viewprofile&u=2

    All the best,

    Armor

    #66248

    HerrVlkr
    Participant

    I’ll take a look at message scrapping the server logs.

    I do think putting in a system to allow hooking into game events would be neat.

    The system could be based on a threaded message queue to protect the game.

    When the game starts up, it could look for C DLLs with a particular method signature in a specific directory. It could be as simple as one function with a named event parameter. The events could have categories to organize then a bit better.

    As events happen in the game, the events are pushed onto the queue. A threaded consumer pulls the events off the queue and calls the found DLLs.

    If one of the DLLs crashed, hopefully it only takes the thread down and not the game.

    Anyway, just spit-balling here…

    #66249

    PeanutsRevenge
    Participant

    @herrvlkr wrote:

    I’ll take a look at message scrapping the server logs.

    I do think putting in a system to allow hooking into game events would be neat.

    The system could be based on a threaded message queue to protect the game.

    When the game starts up, it could look for C DLLs with a particular method signature in a specific directory. It could be as simple as one function with a named event parameter. The events could have categories to organize then a bit better.

    As events happen in the game, the events are pushed onto the queue. A threaded consumer pulls the events off the queue and calls the found DLLs.

    If one of the DLLs crashed, hopefully it only takes the thread down and not the game.

    Anyway, just spit-balling here…

    But thanks for trying.

    Fixed it for you.

    #66250

    HerrVlkr
    Participant

    I have a prototype put together to use message scrapping on the server to trigger DMX lighting. I will have to try to take a video or something to show you what it looks like…

    #66251

    HerrVlkr
    Participant

    Here is a video I took showing my DMX lighting project for Scorched3D.

    Sorry for the poor production quality… 😀

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.