Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up[RFC] Prototyping speed improvements #582
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
first! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
majstudio
commented
Feb 26, 2018
|
Bump ! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Feb 26, 2018
Member
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.
|
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. |
Rhuagh
closed this
Feb 26, 2018
Rhuagh
reopened this
Feb 26, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Oops, wrong button. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Feb 26, 2018
Member
I mean, when is a normal user going to use something else, except in an extremely low amount of edge cases?
Just a personal opinion on this, but I would never use String.
Just a personal opinion on this, but I would never use |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Not even for your prototypes? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Not even for my prototypes. |
Xaeroxe
added
diff: easy
type: feature
pri: normal
type: RFC
project: workflow
status: ready
good first issue
labels
Apr 18, 2018
jojolepro
changed the title from
[RFC] Defaults
to
[RFC] Prototyping speed improvements
May 2, 2018
torkleyy
added this to In progress
in Make the engine more data-driven
May 17, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
May 19, 2018
Member
MaterialDefaults is a resource, I think it should be a constant.
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, ..).
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, ..). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jojolepro
May 19, 2018
Collaborator
Lack of handle_event utils for simple cases -> Quit on any key, quit on some key, is key pressed.
I already implemented it inside of a custom project, currently debating if this should be inside of the engine.
Thinking of adding it in amethyst_input/src/utils.rs instead of amethyst_utils.
Would that make sense @torkleyy ?
ps: I removed the material defaults part.
Thinking of adding it in amethyst_input/src/utils.rs instead of amethyst_utils. ps: I removed the material defaults part. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Sounds like an excellent location. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
May 19, 2018
Member
Hmm I'm not sure, creating a convenience function for everything might obscure things too much.
|
Hmm I'm not sure, creating a convenience function for everything might obscure things too much. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jojolepro
May 19, 2018
Collaborator
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.
|
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Xaeroxe
May 19, 2018
Member
I agree there shouldn't be a function for everything, but this qualifies as extremely common. I say we should add it.
|
I agree there shouldn't be a function for everything, but this qualifies as extremely common. I say we should add it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
MrMinimal
May 19, 2018
Contributor
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.
|
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
May 19, 2018
Member
Well, I think it would be nice to have a more concise Event type. It should just be
match event {
Event::KeyPressed(KeyCode::Escapce) => blah,
}That would make things a lot nicer.
|
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
May 19, 2018
Member
That's why I'm still in favor of exposing our own event type instead of winit::Event.
|
That's why I'm still in favor of exposing our own event type instead of |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Why not expose both? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
May 19, 2018
Member
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 winit version.
|
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 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Having two ways of dealing with the problem would be confusing IMO. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Xaeroxe
May 19, 2018
Member
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.
|
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I do that, I convert winit events myself into other events. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I do think we can add a system event for the things that are hard events |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
What do you understand by that? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Window close, resize etc, things that you usually don't rebind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I'm not sure I understand what you're suggesting, sorry. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
May 19, 2018
Member
I'm not even sure I do myself :P
My current gripe with the current handle_event function calls are that there's absolutely no control from the users perspective what events get propagated there. For the most part if you want input in a usable manner today you'd request access to an EventChannel manually, and just ignore what comes to handle_event. Somehow I guess to basic use case for it was the ability to get easy access to input events.
The problem however is that input events can roughly be divided into two groups of events:
- What I call hard events - Close, Resize, Focus etc - Things that are never rebound, just acted upon
- Rebindable events - Mouse, Keyboard, Touchpad etc, i.e. actual input events, which are most likely passed through some kind of rebinding and transformed into an event structure specific to each game.
I'm not sure I even have a proposal right now, just some gripes.
|
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. |
jojolepro commentedFeb 26, 2018
•
edited
Edited 5 times
-
jojolepro
edited May 19, 2018 (most recent)
-
jojolepro
edited May 2, 2018
-
jojolepro
edited May 2, 2018
-
jojolepro
edited Mar 21, 2018
-
jojolepro
edited Feb 26, 2018
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.