-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove petitset dependency #400
Conversation
For the input binding menu, I think it's ok to let that fire burn for now. This always struck me as more of a menu logic thing anyway, not really an input mapping problem. We may be proven wrong in the future, but I'm not too worried for the time being. |
I also think it's ok that chords are stored as |
Conclusion on the design questions above:
|
Restating here for documentation. The failures are due to With an enum like this: #[derive(Actionlike, PartialEq, Eq, Clone, Copy, Hash, Debug, Reflect)]
enum AxislikeTestAction {
X,
Y,
XY,
} It only checks the variant For this enum, I added inputs for Jump and Run, but not A. enum Action {
Jump,
A,
Run,
} The result was Jump worked but Run did not as A blocked of any lower actions for some reason. |
* Update for Bevy 0.12 (#408) * Update to git * forgot a configure_set * Update examples * Update Bevy to 0.12 release * Bump versions * Disable failing test * Remove bevy_egui so we can ship * Update release notes --------- Co-authored-by: Tomato <67799071+100-TomatoJuice@users.noreply.github.com> Co-authored-by: Alice Cecile <alice.i.cecil@gmail.com> * Add back `bevy_egui` to LWIM 0.11 (#409) * Update to `bevy_egui` 0.23 for Bevy 0.12 * Bump to 0.11.1 * Update RELEASES.md * Switch `A::variants()` to `self.iter()` --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Alice Cecile <alice.i.cecil@gmail.com>
There are still quite a bit of |
Let's pull that out into a separate PR and merge this now :) |
While this set / map crate is well-suited to our needs in several ways, it's not ideal as:
UserInput
's memory footprint is hilariously large, as it must store an array-like type.petitset
is a nonstandard (if small) dependency.This PR explores replacing it completely, using HashMaps (currently a MultiMap).
There are several drawbacks to this however:
HashMap<A, Vec<Option<UserInput>>
in our input maps (😩) or an explicit slot-like design with a fixed number of possible bindings.Open Questions
petitset
, and use it only for chords? This allows us to retain uniqueness guarantees but doesn't help our memory footprint.a) Give up, this is a dumb thing to try and model, it should be built into your menu logic not the input map.
b) Store a map of maps
c) Store an array of maps
d) Store each map as a different field
e) Abandon this PR completely