NovaViper Posted September 14, 2015 Posted September 14, 2015 Hey, I'm not really sure where to start off with making an animation api similar to what this modder has done. Anyone has any tips for me about making one? Quote Main Developer and Owner of Zero Quest Visit the Wiki for more information If I helped anyone, please give me a applaud and a thank you!
larsgerrits Posted September 14, 2015 Posted September 14, 2015 When I make an API for a mod, I don't start of with the intention of making it an API. Make a system to animate your mobs, generalize it with interfaces, abstract classes and registries. Test your API, export it and release it. As a side note, you, the creator of the API, should also use the API to make sure the API works as intended. Quote Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
NovaViper Posted September 14, 2015 Author Posted September 14, 2015 Ok.. I started listing out some variables (this is btw my FIRST time designing an API so this is new to me) about what entities I want to animate and the yaw and pitch and timing varaibles controlling the animation time and yaw and pitch times. Im kinda stuck on how to list the methods Quote Main Developer and Owner of Zero Quest Visit the Wiki for more information If I helped anyone, please give me a applaud and a thank you!
larsgerrits Posted September 14, 2015 Posted September 14, 2015 Ok, let's start from the beginning. You want to make an API for animating entities. Why? Because you think it would help others out with animating their entities, or you want to make it easier for yourself in the future. In either case, try making a system for animating entities on your own entity, and if that works as intended, start to apply it to other entities as well. Then you start the clean-up progress: - Duplicate code can be put in a static method or a method in a general super-class. - If you need data from an Entity, make an interface defining the methods for getting that data, and use that instead of harcoded values. - (Optional) Make registries for registering an entity using your animation API, so you have control of all the entities that use the API, and control them in any way. That's basicly what I do, and it works for me. Quote Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
NovaViper Posted September 14, 2015 Author Posted September 14, 2015 Basically, my reason to make an API for animating entities because to it easy on myself on making animations for my entities (mine only) and have them in one place where I can access and control them all Quote Main Developer and Owner of Zero Quest Visit the Wiki for more information If I helped anyone, please give me a applaud and a thank you!
jabelar Posted September 16, 2015 Posted September 16, 2015 I think the first thing to consider is what type of entities and animations you're doing. For something stiff, simple and robotic or cyclical you can get by just doing same thing that vanilla entity models to -- use a bit of trigonometry to move things based on the swing progress parameter passed into the set rotation angles method. For anything that is more complex, I like to do it like real animators -- they don't use math but instead create a number of "keyframe" poses in an animation program and then let the computer figure out the "tweens" (the positions in between as it moves). I'm helping a big mod team with creating such a system. I've used Tabula to create a bunch of poses, and then put them in as assets then read them into an array. I have another array that indicates the order the poses should happen and the number of ticks it should take to move between the poses. Then each tick I have methods that calculate the amount of adjustment of rotation, position and offset for each block in the model. I'm hoping to write a tutorial on this at some point, but basically I hope you get the idea. Such a system can allow much more complex and natural animations than doing math can do. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
NovaViper Posted September 17, 2015 Author Posted September 17, 2015 Thats what I want to do, I want to make keyframes for advanced animations like a stationary one (similar to what JurrasiCraft has) to make it look like the creature is breathing. I have no idea how to acutally develop keyframes though Quote Main Developer and Owner of Zero Quest Visit the Wiki for more information If I helped anyone, please give me a applaud and a thank you!
NovaViper Posted September 21, 2015 Author Posted September 21, 2015 I used something called MCA Animator but causes a lot of errors and it is difficult for me to start and stop animations once I made them Quote Main Developer and Owner of Zero Quest Visit the Wiki for more information If I helped anyone, please give me a applaud and a thank you!
Abastro Posted September 22, 2015 Posted September 22, 2015 Do you have problems with interpolations? Or is it totally another thing? Quote I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
NovaViper Posted September 22, 2015 Author Posted September 22, 2015 Everything about it basically.. I never tried animations advanced like this before but I have done walking animations Quote Main Developer and Owner of Zero Quest Visit the Wiki for more information If I helped anyone, please give me a applaud and a thank you!
Abastro Posted September 22, 2015 Posted September 22, 2015 So what format do you want to follow. Quote I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.