Jump to content
LaunchBox Community Forums

stigzler

Members
  • Posts

    55
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

stigzler's Achievements

16-Bit Artificial Intelligence

16-Bit Artificial Intelligence (4/7)

22

Reputation

  1. Hi all, This is a bit of a technical one. I am designing a plugin to place additional info on additional displays (WYSIWYG user editable game controls, game info etc). It requires quite a complex db backend and I normally use LiteDb for this (very successfully with other apps I've designed). Sadly, there is something about trying to raise a Shared connection to a LiteDb database when it runs within the domain of Launchbox. 'Direct' connections work fine. I have tested shared connections on a test app using the same Framework and LiteDb version and shared connections work fine. I basically get a Mutex error: I've tried placing the LitedDb database file outside of the Launchbox directory, but still get the same error. There's something about running LiteDb in the Launchbox/Plugin environment that is causing LiteDb to choke. I'm afraid the stack trace/debugging is beyond me. Would be happy to share the solution, but it might be tricky (or not - dunno) setting it up to develop being a plugin. 🤷‍♂️ It's brought my dev to a bit of a standstill - so any help anyone can offer would be appreciated. 😔
  2. Thanks all - will take a butchers. I was hoping there'd be a setting in LB if the facility is there in code, but 🤷‍♂️
  3. Hi folks, I know both formats work with lb, but is there any way to force lb to save images as rom name rather than as the game name?
  4. Hello folks. I have 3 displays on my cab - the main screen, a top display for marquees and a bottom one for game information. I see there's a way to customise the GameMarqueeView as per this video, but is there a way to do exactly the same for display 3 to make the game info layout? Thanks
  5. For those of you looking for a down-n-dirty helper class: public class SettingsManager { public FileSystemWatcher GeneralSettingsFileWatcher = new FileSystemWatcher(); public XDocument SettingsXDoc; public XDocument BigBoxSettingsXDoc; private static string ApplicationPath = Path.GetDirectoryName(new DirectoryInfo(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName).Parent.FullName); private static string SettingsFile = $"{ApplicationPath}\\Data\\Settings.xml"; private static string BigBoxSettingsFile = $"{ApplicationPath}\\Data\\BigBoxSettings.xml"; public SettingsManager() { GeneralSettingsFileWatcher.Path = Path.GetDirectoryName(SettingsFile); GeneralSettingsFileWatcher.Filter = Path.GetFileName(SettingsFile); GeneralSettingsFileWatcher.NotifyFilter = NotifyFilters.LastWrite; GeneralSettingsFileWatcher.Changed += GeneralSettingsFileChanged; GeneralSettingsFileWatcher.EnableRaisingEvents = true; ReloadSettingsXDocs(); } private void ReloadSettingsXDocs() { SettingsXDoc = XDocument.Load(SettingsFile); BigBoxSettingsXDoc = XDocument.Load(BigBoxSettingsFile); } private void GeneralSettingsFileChanged(object sender, FileSystemEventArgs e) { try { GeneralSettingsFileWatcher.EnableRaisingEvents = false; // this controls for double firing // Ensures XDocs are always up to date ReloadSettingsXDocs(); } finally { GeneralSettingsFileWatcher.EnableRaisingEvents = true; } } public string GetSettingsStringValue(string key, SettingsType settingsType) { IEnumerable<string> returnValue = null; switch (settingsType) { case SettingsType.General: returnValue = from xmlElement in SettingsXDoc.Root.Descendants("Settings") select xmlElement.Element(key).Value.ToString(); break; case SettingsType.BigBox: break; default: break; } if (returnValue != null) { return returnValue.FirstOrDefault().ToString(); } else { return null; } } public enum SettingsType { General = 0, BigBox = 1 } } Unfinished, but will give you something to work from.
  6. Awesome reply as ever, @JoeViking245 - thanks. 👍 10 print "JoeViking Rocks OK" 20 goto 10 Now that is an awesome mindful bit of coding by Jason. Great futureproofing/flexibility. Now I can mould LB a bit, looking forward to getting stuck in properly. You seem quite active in the plugin development front, Joe. Are there others who are into it? It's just really helpful.
  7. Hi all. Currently developing a Swiss army knife plugin where one of its features will be a full media management system, including choice to download media from an alternative scraper api. Part of this involves understanding how Launchbox names its media files. I know how to access all the game/system objects through the PluginHelper Class. I'm assuming this data is pulled from the relevant .xmls in <root>\Data Examining a pre-populated media set, I see games named thusly (game on Atari 7200): Tomcat_ The F-14 Fighter Simulator-01.jpg the only two game fields that could possibly be linked are: <ApplicationPath>S:\Unversioned\Projects\ArcadeAssets\ROMS\Atari 7800\Hyperspin Ready\Tomcat - The F-14 Fighter Simulator (USA).7z</ApplicationPath> <Title>Tomcat: The F-14 Fighter Simulator</Title> I am deducing, therefore, that the media name is derived from <Title>, as presumably underscore replaces the colon, and the result would not fit the pattern of the rom name. The question is, what is the replacement algorithm for all invalid filename chars? I.e. "\ / : * ? " < > |" Also, if there's two "Pong_01.png" and Pong_01.jpg", which is given priority? Lastly (for Bully's special prize), is there any way to set the image name in the database manually? For example, if I wished the media name to be the rom name? PS. Wot, no syntax highlighting? 😞
  8. It's hard to know where you're starting from, but I wrote this getting started in terms of setting up VisualStudio for a .net or .framework plugin. Super-dooper-guide If you're below this (how to code etc) then can't help you with that, I'm afraid. You'll need to start from basics.
  9. This can speed up your dev cycle: https://marketplace.visualstudio.com/items?itemName=vsdbgplat.MicrosoftChildProcessDebuggingPowerTool2022 You can find a setup guide here: The Secret Sauce
  10. Not quite sure what you're saying, but the likely answer is yes.
  11. Here's a video showing my prototype in action. It shows how you setup controls for cabs and gamepads, map them to emulators and how MAME mappings work. It's a bit long as it's a tutorial, but you could skip through to get an idea: I wrote it essentially as a prototype for the bigger project. I'm really deliberating over the best approach to authoring a specific tool. The ultimate goal will be to build and display game controls layouts for all games on all systems (including different modes within each game (eg. walking, flying, in menu etc) and maybe special moves sets for things like Tekken etc). The database would be community populated. I'd also like to future-proof it. Those of you who have been around in this hobby long enough know that things come and go, but well designed things last (like poonga's controls.ini/dat/xml for MAME) so that has me thinking about the best approach to giving it longevity. The other thing that would be desirable would be that any controls layout display software would also integrate any other game/system specific assets in an integrated fashion (as per the vid above) - so it would need to integrate seamlessly with any source software. The benefit Sir Poonga had with Controls.dat was that Mame had standardised names for mameroms (essentially, each mame game has a standardised unique reference). These don't exist of course for games more widely, of course. So what I'm considering is this. Games will have a new unique ID (I know, I know) for the Game Controls Database. However, each will also have a list of known roms gleaned from the excellent Screenscraper database, the Launchbox game ID if it has one and any other Front End ids. I would link with Launchbox as the main front end for its development and invite community development of the Games Controls Database. There would be a plugin for Launchbox which would communicate with the stand alone application, share data with it such as the rom filename, LaunchboxID, assets etc etc etc which could then construct controls displays on the fly from the game controls database. For those of you who don't know Screenscraper's work, check this link here. They basically catalogue all known roms for all games, alongside game descriptions and titles and numerous other metadata for regions etc. A truly great archiving effort: https://www.screenscraper.fr/gameinfos.php?gameid=19939&action=onglet&zone=gameinfosroms I'll give you an example of why this might be necessary in practice. I have the rom "100 Star (Europe).rar" in my Playstation collection. Launchbox does not scrape this correctly and thus does not give it a launchbox ID. However, if you search this on Screenscraper.fr, then it is identified as "Popstar Maker" Now, there's two things here. I could author the plugin to update Launchbox from Screenscraper to the new details (bonus!). But, also, I now know that the Launchbox ID for Popstar Maker (if I've pre-scraped the Screenscraper db). Thus, syncing two databases. There would be a piece of publicly available software for updating the Game Controls Database so it can be updated as new roms are discovered/released. It would be up to the community to version control this (insert inane laughter here) I don't know if that makes any sense. Essentially, I think it would be best to make any Game Controls database front-end agnostic whilst still offering the best outcomes to those who would contribute the most. Thus the intention to develop this first for Launchbox user via the Launchbox plugin which would interface with the stand-alone application. I'd welcome people's ideas
  12. You're right. In all reality, it'd be building the default system, default system controller, default system controller controls and default system controller game functions (including game modes) databases from scratch. Thus the need for true community collaboration from the start. Eg. System: Sony PlayStation Controller: DualShock V1 Controls: Cross,Circle,Triangle,R3 (etc) Tekken 3: GameMode: Fight Control: Cross Function: Low kick GameMode: Menu Control: Cross Function: Select
  13. Ah yeah. I wasn't really expecting much time/participation from them and tbh I'm more of a solo flier anyway. However, I am a believer in smart collaboration and for a bit of this at the start planning dovetailing of this into any future plans of theirs could benefit lunchbox largely (eg. I think there's some kind of controller function in lunchbox? Thus preserving ids etc). After all, it could be of commercial interest to them whilst I would be providing something potentially of value for nothing (not that I'm expecting anything for that, just making a point why a consideration of a post at this stage may be helpful). I'd do know how busy they are with dev and keeping the community happy, though. The barest minimum that would be helpful to me is a straight yes or no about whether they are planning on developing this themselves in the future, saving me a lot of work. Even if just via IM. However, also realise future feature releases may be super secret! I realising I'm writing cheques without any credit in the lb community ATM, so will post some vids of the prototype in action over the next couple of weeks when I get chance in between work. My other option is to make it stand alone and generic and to work off rom names alone using the screenscraper database ids as the standard game reference which would x ref rom names (which would also loose the launchbox systems and game standard by default). So many design choices! Thanks for the offer of beta testing. Always deffo needed and will take you up on it!
  14. The prototype I've just written can do this. It leverages controls.dat, pulls from the default mame controls layouts, pulls from controls.dat and then generates all the mame game layouts (+ button colors if you want them). It can also do a bunch of other stuff like choosing which default group control you want to show (e.g. driving games can have paddle or spinner etc). The per-game controls is easily coded - can't remember exactly now, but mame store per-game configs in a folder - the app would jsut read from these for each game and remap controls - the ore code is already there. As above, I'll post some vids of it in action when I have more time. I'm keen to start developing something over the winter, but want to get it done properly - so would want to scope this out fully with the launchbox community first - e.g. futureproofing + integration (e.g. with the launchbox database).
×
×
  • Create New...