I made this separated topic to make things more clean. Here i'll post the things I make for other modders and some minecraft fixes(if I make any). My modding topic is here.
Updates: 20/03/2011 - Created topic with AnimTex Framework v1.0.
Back to Top
I made this framework for easy-to-use texture animation. With this, modders can easily create animated textures for mods. Users should download this too. Credits to UltraMoogleMan to AnimFilmStrip that I used as a base. Requires ModLoader. Video:
AnimTex:
Basically, AnimTex has two functions(yet). One is the animated frame texture, so each texture frame is rendered in different Minecraft game ticks. The other one is the spinning texture, that rotates the main texture each tick, but it requires a overlay in the borders so there'll be no rendering glitches.
Read: The methods return the indexes(int) to use with your block/item.
Example mod, with sources(MCP and OBF): http://goo.gl/A0fMk
Functions - Animated Frame:
Basically, each tick will render a different frame, calculated by the width and height of the specific image. So, if the image is 64x16, it'll have 4 frames(64/16=4). Let's take the following image:
It's 512x16, so it'll have 32 16x16 frames. This is the image used on the second block of the video.
Methods:
Functions - Spinning Texture:
Showed on the first and third part of the video. Basically rotates the main image in a configurable speed and direction. Requires a overlay(that doesn't rotates) to prevent crashes.
Image example:
(main image) + (overlay) =
Methods:
//For Blocks (terrain.png)
AnimTex.SpinningTerrain(String image, String overlay_image, int speed, int direction);
//For Items (items.png)
AnimTex.SpinningItem(String image, String overlay_image, int speed, int direction);
Args:
image -> main image;
overlay_image -> overlay image;
int speed -> rotation speed, 1 is default;
int direction -> rotation direction, 1 is right(->), -1 is left(<-) and 0 is no rotation at all.
Please talk to me in #Risucraft or PM me if you, modder, didn't understand.
Very interesting and I can imagine quite a few things to build. However, do you have plans to allow users to set the start frame of the animation or change the rate after the block is placed? Whether it is right click or redstone that controls the two is debatable.
I am thinking of giant barber poles of simply a moving block such as where 1 block is black, others are white. Use the animation to simulate the black block is moving around a loop. Mix it with lights in a giant column/tunnel and wow.
20/03/2011 - Created topic with AnimTex Framework v1.0.
Frameworks:
- AnimTex Framework -
I made this framework for easy-to-use texture animation. With this, modders can easily create animated textures for mods. Users should download this too. Credits to UltraMoogleMan to AnimFilmStrip that I used as a base. Requires ModLoader.
Video:
Download v1.0: - Link -
-------------------------------------------
I am thinking of giant barber poles of simply a moving block such as where 1 block is black, others are white. Use the animation to simulate the black block is moving around a loop. Mix it with lights in a giant column/tunnel and wow.