Yeah, I was getting pretty desperate with the Notch thing. I just wanted an answer...
Yeah, I see how it works now. Basically, the textures underlie the normal heart/food textures, and are activated upon hit or regen. (That's right, right?) Anyways, thank you so much for answering!
Yep thats right. You could also remove them, and get nothing behind the health/hunger, but then it can be tricky to see when your max XD
A good trick to get a better understanding of it:
Delete the normal full hearts.
Number the blank 'underline' hearts.
Go into a world on peaceful, and jump off a hill. See what the back side changes to on hit, and regen. and you'll get fully just how it works.
Yep thats right. You could also remove them, and get nothing behind the health/hunger, but then it can be tricky to see when your max XD
A good trick to get a better understanding of it:
Delete the normal full hearts.
Number the blank 'underline' hearts.
Go into a world on peaceful, and jump off a hill. See what the back side changes to on hit, and regen. and you'll get fully just how it works.
Haha, I did that even before I made this post. I understand it all now; and thanks to you, I'm submitting it. Thanks again!
Steelfeathers is taking a long time, but at least she acknowledged it. She's probably really busy with life or something. These things happen, not everyone has time to be an internet all day.
I have a question: At what point should I start making a changelog for my pack? How far back should that extend? And is there an acceptable or best way to format that?
After figuring out how this works, I had a small party, then wrote this thing so I could share this valuable knowledge.
The following guide embeds 11 images.
A Guide to Animated Textures
by Popcorn Insomniac
With the upcoming release of Minecraft Release 1.5 approaching, there are some new features in texture packs. Other guides may cover those features, but this is a guide for animated textures.
As you may already be aware, because of the new minecraft.jar and texture pack format, you are now able to change the clock, compass, water, lava, fire, and nether portal textures, which was previously impossible with vanilla Minecraft.
You are also now able to animate any block or item, except for blocks whose textures are in the items folder. Basically, anything underneath the 'textures/' directory can be animated. This may change eventually.
Simple Blocks
Let's start by animating a regular block. I chose to animate the front of a lit furnace. I want it to look like this:
I could have made a more complicated animation, but I chose something simple for the purpose of showing how to animate the textures.
The first step is to find the texture for the block. For the most part, blocks are under 'textures/blocks/' and items are under 'textures/items'. I found the lit furnace texture under 'textures/blocks/furnace_front_lit.png'.
The texture should look like this:
Now that I have my texture, I'll open it with my favorite image editing program such as Adobe Photoshop, GIMP, PaintTool SAI, or Paint.NET. The first thing I'll want to do is make my texture file taller. You will want to multiply the amount of frames by the resolution of your texture pack. I want my animation to be 8 frames long, and my texture pack will be 16x, so that's 8×16, or 128. This number, 128, is the height, in pixels, for me to make my image. The width should stay as the width for your texture pack resolution, so my width will stay at 16 pixels.
The image is now 16 pixels by 128 pixels, but it's a bit hard to tell looking at it on your browser because it's transparent.
Notice that I only made the image taller underneath the original texture. Doing that is different from program to program, so if you don't know how to do it, just nudge the first texture to the top after extending the height.
The next step is to draw the new textures, which are called frames. I'm not going to show you how to do that, because everyone makes different animations.
The texture should now look like a stack of slightly different lit furnaces, or whatever you are retexturing.
And you're done! This texture should work at 1tpf, which is one tick per frame. A tick is every 20th of a second.
If you want to change the framerate, or optimize duplicate frames, look at the next section.
Framerate and Filesize Optimization
You may notice that by default, some of the textures have a .txt file next to them. This plaintext file defines special framerates or repeated frames.
To make one of these, all you have to do is open a simple text editor, such as Notepad or Text Edit.
The first step is to specify your frame number. Although the animation I will be using, the lit furnace from the previous section, has 8 frames, the last frame is called frame 7. That is because the first frame is called frame 0.
Let's say I wanted to make the framerate be 3tpf, just like the flowing lava texture. I just have to type this:
0*3
1*3
2*3
3*3
4*3
5*3
6*3
7*3
But what does that mean?
The numbers on the left are the frame number, starting at frame zero, ending at frame 7. After that, the animation loops. There is no way to make the animation not loop, so the animation shouldn't tell a story. If you want to tell a story with animations, don't do it inside Minecraft textures. That's a waste of your talent. BUT, I DIGRESS.
The asterisk (the *) serves to separate the two numbers.
The numbers on the right side of the asterisk are the amount of ticks that the frame lasts for, That means that you can make frames vary in length, so you could have a regular frame last for 1200 ticks, or one minute, then have a frame right after it be a ghost or somehting, to scare the user. Don't do that. It's an evil prank.BUT, I DIGRESS.
Do not assume that these numbers are written in hexadecimal. They aren't. Don't try writing 1F instead of 32. It won't work.
If you don't know what hexadecimal is, ignore the previous sentence.
Now, you may have noticed that the sixth, seventh, and eighth frames in my lit furnace animation are repeats of the fourth, third, and second frames respectively. There is a way to get rid of those while leaving the animation intact, but still reduce the filesize.
The first step is to make an animation plaintext file for it. I'll have to call this one 'furnace_front_lit.txt', and put it in the same directory as my 'furnace_front_lit.png', or whatever other texture I'm animating. The new plaintext file should look like this:
0*1
1*1
2*1
3*1
4*1
3*1
2*1
1*1
They all end in *1 for safety, but you might be able to get away with not putting tick counters at all. Don't try it though, because It probably won't end well.
Notice that I'm referring to the frames numbered 3, 2, and 1 instead of 5, 6, and 7 now. That was because they were identical to the frame numbers that I replaced them with. That means I get to remove them from the image. The new image will look like this.
By doing this, you're only saving a few kilobytes at most, but they really do add up! if all of your textures were animated and all of your textures had extra frames, if you saved one kilobyte per texture, you would be saving about half of a megabyte!
Make sure to accompany it with its plaintext file when you zip up your texture pack!
Animating Flowing Water and Lava
Animating Stillstanding water and lava is simple, you just have to do what was explained in parts 1 and 2. That also applies to nether portal and fire animations.
But what's up with those flowing water and lava textures? Are they a higher resolution or something? What?
Stop. Before you keep speculating and confuse yourself more, this is how it works.
Their frames are 32x for a reason, and it's still considered to be 16x. The width and height of flowing liquid frames is twice the width of other things in your texture pack.
The first thing you have to understand is that the frames are all square. I will be demonstrating with the flowing lava texture.
Below left: Flowing lava texture. Below right: Flowing lava texture with frames outlined.
Notice that if one were to use the rightmost one in their own texture pack, it would not show any changes.
Now I'm going to draw some checkers over the part of flowing lava that you don't see all the time.
I'm going to run Minecraft and look at some flowing lava from this texture.
As you can see, the falling lava uses the top-right corner of the texture, while all sideways planes on top of flowing lava use a centered version of this texture, but with the extra size of the texture image as buffer on the corners since it needs to flow linearly.
Simply put, the corners are filled because sideways squares are not square.
That should clear up all the confusion as to why lava and water flowing textures are extra large.
Clock and Compass
Clocks and compasses work differently than you would expect.
Instead of being an image with a magenta mask in it (as the old gui/items.png and misc/clock.png file would hint at), the images for compass and clock were hidden in the same way water, lava, portal, and fire were hidden.
The way they were hidden does not matter.
What matters is that you can edit them now. Let's look at the clock texture.
Simple, right? 24 textures for the 24 kt (Kiloticks) that make up the minecraft day cycle!
WRONG. Those are 64 frames, but if it made more sense to you, you could change the amount of frames to be 24, 48, or even 96. You could even try to make it look like an actual clock, or a digital clock. Minecraft is cool about it, because instead of only using these exact 64 frames, it uses however many frames you want, just like the other animations. Unlike the other animations, you cannot optimize duplicate frames with a plaintext file. All that would do is not work and maybe even crash your game.
Now, technically, this isn't really an animation. It's just a bunch of frames that point to a time of day. If you have 2 frames, it will show frame 0 for daytime and frame 1 for sunset, night, and sunrise. If you have 4 frames, frame 0 will show the first half of the day, frame 1 will show the second half of the day, frame 2 will show sunset and the first half of night, and frame 3 will show the rest of night and sunrise. You should probably have at least 12 of these.
The compass texture works similarly, but it has the amount of frames being directions instead of times.
If you have 2 frames, frame 0 has spawn behind you, and frame 1 has spawn in front of you. If you have 4 frames, then frames 0, 1, 2, and 3 will have spawn be behind, to the left of, in front of, and to the right of you, respectively.
Although compasses point to spawn by default, some servers lie to your game about which way spawn is, and nothing in a texture pack will ever change that. If anything, it's there to help you.
Dude!
Someone should make a clock texture that (with mathematics) tells you the exact time in minecraft. time=0 should be like 8:00 and then every minute ingame (8 and a third seconds) it would change, like a real digital clock.
Someone should make a clock texture that (with mathematics) tells you the exact time in minecraft. time=0 should be like 8:00 and then every minute ingame (8 and a third seconds) it would change, like a real digital clock.
Dude!
Someone should not quote the whole huge post!
And the clock will always do that. If you had a 2 texture clock, it will always pop noon, and midnight, it will auto scale.
Yeah, but you have to remember, COMPASSES POINT AT SPAWN. Also, remember that the first frame has spawn directly behind you. Good luck.
Do you intend on doing it in 16x? I'm sure it would be awesome if you put the numbers on a separate layer so everyone could use it, if you were okay with it.
Yeah, but you have to remember, COMPASSES POINT AT SPAWN. Also, remember that the first frame has spawn directly behind you. Good luck.
Do you intend on doing it in 16x? I'm sure it would be awesome if you put the numbers on a separate layer so everyone could use it, if you were okay with it.
DAMNIT! I forgot about how compasses work. Well, I guess I could do how many degrees AWAY spawn is.
What? Of course I wouldn't give away 24 hours of work... they must suffer.
Indeed, it is. In fact, I was doing this tutorial from one of my development laptops (which is running Windows XP and using Java 1.6.xx.
ALWAYS make a backup of minecraft.jar before mucking with it, though!
Thanks for the kudos, btw. I'll be fixing the missing graphics (photobucket delete = my fault) and adding more for terrain/textures.
The community has given me so much that this is the leasssssst I can do!
Your tutorial is flawed. NEVER EVER -EVER- replace the files that are in the minecraft.jar. ALWAYS make the new files into a texturepack. Elsewise you can muck things up and some files can appear screwed up badly by editing them, resulting in blank blocks and what not. We just had to resolve an issue with another user whos graphics were screwing up/not working, because he placed them into the jar and not as a texture pack.
On top of that, there is already a section of the guide that tells you how to properly pull the files from the minecraft.jar, and properly repack them as a texture pack. Because of that, and the fact you're telling people to place their textures in the jar, over writing the default textures, I highly doubt it would get approved.
Yep thats right. You could also remove them, and get nothing behind the health/hunger, but then it can be tricky to see when your max XD
A good trick to get a better understanding of it:
Delete the normal full hearts.
Number the blank 'underline' hearts.
Go into a world on peaceful, and jump off a hill. See what the back side changes to on hit, and regen. and you'll get fully just how it works.
Haha, I did that even before I made this post. I understand it all now; and thanks to you, I'm submitting it. Thanks again!
Dude!
Someone should make a clock texture that (with mathematics) tells you the exact time in minecraft. time=0 should be like 8:00 and then every minute ingame (8 and a third seconds) it would change, like a real digital clock.
Dude!
Someone should not quote the whole huge post!
And the clock will always do that. If you had a 2 texture clock, it will always pop noon, and midnight, it will auto scale.
He meant one with 1440 (24 x 60) textures, but it should start at 6:00 am, because that makes sense in terms of Bukkit.
I thought of that too, but it would be incredibly tedious. Anyone want to do it?
I might do it.
I might also do a digital compass with 360 frames.
Do you intend on doing it in 16x? I'm sure it would be awesome if you put the numbers on a separate layer so everyone could use it, if you were okay with it.
DAMNIT! I forgot about how compasses work. Well, I guess I could do how many degrees AWAY spawn is.
What? Of course I wouldn't give away 24 hours of work... they must suffer.
HTH.
Please update your texture packs.
Yup -- I wanted to ensure I followed the rules about posting (for review and inclusion).
Hth!
Thanks - I just noticed some photobucket images are lost... drat! I will update those references.
Indeed, it is. In fact, I was doing this tutorial from one of my development laptops (which is running Windows XP and using Java 1.6.xx.
ALWAYS make a backup of minecraft.jar before mucking with it, though!
Thanks for the kudos, btw. I'll be fixing the missing graphics (photobucket delete = my fault) and adding more for terrain/textures.
The community has given me so much that this is the leasssssst I can do!
Your tutorial is flawed. NEVER EVER -EVER- replace the files that are in the minecraft.jar. ALWAYS make the new files into a texturepack. Elsewise you can muck things up and some files can appear screwed up badly by editing them, resulting in blank blocks and what not. We just had to resolve an issue with another user whos graphics were screwing up/not working, because he placed them into the jar and not as a texture pack.
On top of that, there is already a section of the guide that tells you how to properly pull the files from the minecraft.jar, and properly repack them as a texture pack. Because of that, and the fact you're telling people to place their textures in the jar, over writing the default textures, I highly doubt it would get approved.