-
Notifications
You must be signed in to change notification settings - Fork 10
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
[RFC] Prototyping speed improvements #18
Comments
first! |
Bump ! |
I'm fine with this, but please don't use external libraries which are unreleased (and not even close to complete) as the main example. |
Oops, wrong button. |
Just a personal opinion on this, but I would never use |
Not even for your prototypes? |
Not even for my prototypes. |
No, it should not. It's a fallback for when a texture handle is invalid and the user may provide it. Also, a constant would need late initialization (and yeah involve global state, probably not work with multithreaded tests, ..). |
Thinking of adding it in amethyst_input/src/utils.rs instead of amethyst_utils. ps: I removed the material defaults part. |
Sounds like an excellent location. |
Hmm I'm not sure, creating a convenience function for everything might obscure things too much. |
So, who wants to have this: https://github.com/jojolepro/amethyst-extra/blob/master/src/lib.rs#L193 (lines 193 to 257 included into the engine, and who doesn't? I don't mind keeping it external, but integrating it would make the examples cleaner. |
I agree there shouldn't be a function for everything, but this qualifies as extremely common. I say we should add it. |
Generating a quad and handling basic events should be part of the engine, I'd agree it's okay to add it. As long as we keep @torkleyy's concerns in mind for other (less integral) features. |
Well, I think it would be nice to have a more concise match event {
Event::KeyPressed(KeyCode::Escapce) => blah,
} That would make things a lot nicer. |
That's why I'm still in favor of exposing our own event type instead of |
Why not expose both? |
Exposing just our own type allows us to upgrade winit without breakage. Additionally, if we convert winit events into our own type, I don't see any need to interface with the |
Having two ways of dealing with the problem would be confusing IMO. |
That's fair. I was mostly thinking of people who might want to use winit events to interface with other winit compatible crates, but I'm not sure I have any good examples at this time. |
I do that, I convert winit events myself into other events. |
I do think we can add a system event for the things that are hard events |
What do you understand by that? |
Window close, resize etc, things that you usually don't rebind. |
I'm not sure I understand what you're suggesting, sorry. |
I'm not even sure I do myself :P My current gripe with the current The problem however is that input events can roughly be divided into two groups of events:
I'm not sure I even have a proposal right now, just some gripes. |
Is this issue up-to-date ? |
@AlmightyScientist Yes, this issue did not change a lot. I'll go through all the RFCs soon and make sure they're all discussed properly. |
Should we use the |
Those that don't should have a |
Transferring to RFC repo |
Problem
Prototyping in amethyst is slow.
100 lines of code seems to be the minimum to make the smallest of game. While its not a lot, it definitely is more than necessary.
Source
I'm taking https://github.com/amethyst/amethyst/blob/develop/examples/sphere/main.rs as a model
Lack of good defaults for generic types.
Imports
Lack of handle_event utils for simple cases -> Quit on any key, quit on some key, is key pressed.
Propositions
Adding sensible defaults as type alias for generics.
Example:
amethyst_input/src/default.rs
Expand the prelude to include as many common types as possible. I'm not too sure how much this slows down compile time when using the prelude, but I do have performance degradation in one of my project where I was using only preludes.
I already implemented it inside of a custom project, currently debating if this should be inside of the engine.
The text was updated successfully, but these errors were encountered: