Celeste64
Celeste64 copied to clipboard
Adds Controls Config file as a JSON
Adds a controls config file as a JSON. Tested against Windows 10 with Controller and Keyboard Supports deadzones for joysticks/triggers Please send feedback if you have concerns
Hey thanks for writing this all out! This is a great start, but I also agree with steviegt6 on a few issues:
- Using null checks/handling null is better than using pragma's to ignore them. Ideally (aside from external libs) we wouldn't ignore any warnings.
- I think creating a typed class to automatically serialize into might be worth doing. It might also make parsing the end data a lot easier. Since we're trimming the exe it will need a JsonSerializerContext but that's fairly trivial to do (see how Save.cs does it)
just tested this out, seems like the pause menu isn't working at least for keyboard
a quick look through the changes I'm not quite sure what the issue is
I have tried both a debug build and a release build on linux and both can't open it
Regarding this, I think in order to use a Json-deserializing structure it would require rewriting things in terms of solely buttons, similar to the structure within Celeste itself, i.e.:
"MoveUp": { "Controller": ["LeftStickUp", "DPadUp"], "Keyboard": ["Up"] }
I'm going to rewrite it terms of that but I'm not sure whether or not I should then include Deadzones for things like Joystick/Triggers edit: I'm going to add it as a "ControllerDetail" property and rewrite the structure a bit.
You can write your own (de)serializers.
I ended up doing an implementation getting it working, based on the ideas here! Appreciate the first pass that was done, thank you!
It's still missing Mouse to aim, but I think that could be added as a separate PR (and probably part of Foster somehow).