-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
No UI Animation System (Required for Terasology/Breathing#4 and #1639) #2271
Comments
Interesting suggestion. In my opinion, such a formal specification would be overdoing it, though. I'd rather define a set of Java classes that define basic animations and put that in Such animators exist already for in-game entities: https://www.youtube.com/watch?v=0sAIA1eaUPQ I might be able to help working on the specifics. |
Trying to work this out in my head - the health bar currently shows changes as the player gains / loses health. Is that just a UI element that's updating or an animation? Once upon a time in legacy @small-jeeper had added a decoration where the toolbar would roll out (with some cogs on the side and everything!) into the full inventory. Was pretty neat but pre-NUI so it didn't get converted. Is that more of an animation than a simple update in the UI? IIRC you can bind UI elements to a backing data element so they get updated automatically. I don't actually know off-hand how the health bar updates, either in Core or the hunger/thirst in Josharias Survival or Throughout the Ages. Would animation be more for taking updated data (say 1-10 for health) then mapping each value to a specific state of a custom UI element like a paperdoll representation of the player's health? Sort of like you say specifying stages in a JSON file? |
There would be default time and value interpolators for traversing animations, and the json file would describe starting and ending conditions. The health bar currently just renders whole or half icon images without transition. |
Based off the ideas on Android's Animating Resources FrameComponent (basically a component that changes):
Frame:
Base Animation Mutator (Transitions between 2 or more frames):
|
Hmm .. interesting. A simple specification in JSON UI files and implementation in Java might have some potential. I think the referenced objects shouldn't be Maybe you can try that out along one or two simple examples: UI buttons fading in/out when a screen opens or HUD elements moving in/out from the border (remember Warcraft 3 menus?) |
Component in the generic sense of the word and not any sort of existing Component implementation. I mean components like rotation, translation, color, alpha, size, etc. |
@Cervator Should I open a pull request (that shouldn't be merged until its finished) so that we can view the animation code? |
@viveret If you've already got some code to review (cool!) then sure :-) |
Closing as complete! Go forth and animate all the things! :D |
There is not any UI animation system (to my knowledge) to support these features / fixes, which would be required by Terasology/Breathing#4 and #1639. What can we do about it?
I'm thinking something along the lines of Android's method of animation using a formatted text file (like JSON) to specify animation details.
The text was updated successfully, but these errors were encountered: