Open briaguya-ai opened 8 months ago
My first thought would be to agree with downloading it at runtime, if it doesn't exist, in case people make modifications themselves, so they don't lose them.
I was thinking we still just ship one with the build, but have the option to pull a new one down at runtime
The problem is that we still tell people to extract everything, with good reason. But that means overwriting their GCDB, and if they made changes, needing to map again. Would be easier to download at runtime than to put "Don't extract your GCDB file if you added your own mapping" in the update instructions and trust that they'd read and understand that.
And there's no guarantee we'll get everyone who needed to map to submit their mapping strings.
the issue i have with not shipping one is that we'd then be requiring the game have network access (at least once) for controllers to work
Then how about we have the one it ships with in a different directory from where it ends up being used from, and if it's not present on a fresh install, we can just copy the one it shipped with?
Directory or name could possibly work
Or, maybe, we could have a dummy file in the main directory that goes unchanged except by the user, and load both that one and the shipped one, with the user one taking priority?
we'd need to look into how possible loading multiple files is but maybe
after seeing https://github.com/HarbourMasters/Shipwright/issues/3879#issuecomment-2002552704 i decided it's probably a good idea to write down some thoughts around gamecontrollerdb issues
the main issue is id conflicts. there are multiple controllers that end up with the same id for gamecontrollerdb. the upstream repo refuses to replace existing mapping strings, and even if they did that wouldn't be a good solution because it would mean other controllers are broken
one potential solution would be to move away from using SDL gamecontroller, and just use joystick instead. i don't think this is a good solution to this problem as it would complicate a lot of the gamecontroller stuff we take for granted. we'd basically need to create the joystick and then try to create a gamecontroller to support gyro etc. and if that doesn't work fall back or something. we'd also lose the ability to know button names when in joystick only mode. overall this would move the complexity into a place that feels hard to maintain.
i think there are a few things we can do to provide a solution that works
maintain our own fork of gamecontrollerdb, and ship our db text files from there
i think this could change the support flow from player my controller isn't working (turns out it's not in the db or has the same id as a different controller in the db) support: ask player to do the thing to make a mapping string and share it player: makes mapping string, gets it working in game after manually changing file, sometimes shares string back so it can be PRd to the db support: tries PRing string to upstream DB, maybe gets it accepted maybe doesn't
to
player: controller not working support: get mapping string from player, updates fork of db, any other players with the same controller can now just hit the update db button in game to get a db that works for them
closing thoughts