Jump to content
LaunchBox Community Forums

Getting started with writing a plugin for LB/BB?


Recommended Posts

In case it helps, I have a few plug-in projects that I maintain in this github repo, feel free to review/steal anything you find in here: 

https://github.com/AtomFry

I'm not great at WPF so if you do check them out, take what you find in there with a grain of salt as there are probably lots of better ways to do things in WPF than what I've done but I figured I'd share in case it helps to give you some more ideas.  

  • Like 2
Link to comment
Share on other sites

What I was hoping to do it somehow build an API / listener to allow external inputs to launch games in BB/LB.  

In my specific use case, BB install 1 on cab A could send a signal to BB install 2 on Cab B to launch a game.   

What I've got working right now is AHK key scripts, so you launch a game on Cab A in retroarch and it triggers Cab B to launch RetroArch in netpplay mode, basically starting up a 4 player game between two 2-player cabinets.    It works, but its a little janky.   And the LEDBLinky commands don't get send from BB on Cab B (I can do it via command line) and the game Maquee doesn't load on the marquee montior, because BB isn't launching the game.   

Totally superficial, but something I've been thinking about.   

Link to comment
Share on other sites

Yeah it would be awesome if there was a CLI for BigBox or LaunchBox so your API could call in externally to launch a game without something like AHK. I don’t believe anything like that is available. You could possibly take the idea of my big box auto play plugin and have your service edit the settings json file to specify the game to launch in there and then launch big box. Then Big Box would load and auto start the game. 
 

 

Edited by Fry
Link to comment
Share on other sites

Not sure I see the point of a CLI to launch a game. That point just launch the emulator via CLI. If you running a setup where both machines already have BB running you can code that up easily enough as the plugin can use the IDataManager interface to get the IGame interface of the title in question and then play it.

Link to comment
Share on other sites

The reason I mentioned a CLI interface would be that any configurations you have through launchbox would be honored. For example, additional applications that setup key mappers, AHK scripts that run on game start, multiple monitors showing marquees, etc. I agree if you’re just trying to launch the game then you may as well use the emulator command line. But if you have any of those configurations on games then you also need to take care of setting them up via command line too. 
 

2 hours ago, C-Beats said:

If you running a setup where both machines already have BB running you can code that up easily enough as the plugin can use the IDataManager interface to get the IGame interface of the title in question and then play it.

It sounds like Fursphere is considering a setup with two machines and launching a game on one machine would also launch the same game on a second machine. I guess. It sounded like they are thinking a plugin on machine 1 would implement the ISystemEvents or IGameLaunching plugin to get triggered when a game is launching and then call some home built API running on machine 2 to say hey, this game just launched. Then the API on machine 2 would like to launch the game in big box on machine 2 so that the game launches with all the configurations that it should have on both machines. It sounds like a pretty big project to undertake and I’m not sure of another good way for one machine to launch a game in big box on another machine using the IDataManager interface. I mean I totally recognize that once a plugin code is executing, you can use IDataManager to get a handle on a game a launch it. Maybe I’m over complicating the design?  

Link to comment
Share on other sites

I guess an alternative design could be a plugin on the second machine that runs in the background and watches for a file or something that has a game ID. The plugin on the first machine could write a file on the second machine whenever a game launches and Whenever the file appears, the plugin on the second machine could find the game,  Launch it, and remove the file. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...