Page 1 of 1

Animated textures

PostPosted: Thu Aug 01, 2013 19:37
by LionsDen
I did a search but didn't find anything relevant so here goes.

I have created a mod that has animated textures on one node. The problem is that sometimes the animation starts at a different frame than the first frame. Sometimes it is one the middle frames and sometimes the last frame. It seems to be hit and miss. I am playing in single player and reloading the game will change the animation start position. Sometimes it will change to the beginning where it should be and sometimes some random frame is the start frame.

My operating system is Windows XP, I am using PilsAdam's 2013-07-24 version of minetest and the game mode is the regular minetest.

Here is the node definition from my mod just in case I have something set wrong in there as this is my first node with animation.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_node("negabomb:active", {
     description = "Active Negabomb",
     tiles = {{name="negabomb_animated.png", animation={type="vertical_frames",
          aspect_w=32, aspect_h=32, length=8}}},
     groups = {not_in_creative_inventory=1},
     light_source = 5,
     drop = "",
     can_dig = function(pos, player)
          return false
     end
})


You can find the level 4 debug text here, it had the problem happen but it doesn't crash the game.

http://www.mediafire.com/?hzfhgrux3a5xdu0

PostPosted: Thu Aug 01, 2013 21:18
by PilzAdam
You cant rely on a specific start point of the animation.

PostPosted: Fri Aug 02, 2013 17:12
by LionsDen
Hybrid Dog wrote:The problem exists for the water textures. The animation doesn't support chunk corners.


What do you mean by chunk corners?

PostPosted: Fri Aug 02, 2013 18:40
by kaeza
Hybrid Dog wrote:
LionsDen wrote:
Hybrid Dog wrote:The problem exists for the water textures. The animation doesn't support chunk corners.


What do you mean by chunk corners?
I mean the transition between the chunks. In every chunk the animation is loaded in a different time.

It is most evident with lava.

PostPosted: Fri Aug 02, 2013 20:28
by PilzAdam
Hybrid Dog wrote:
LionsDen wrote:
Hybrid Dog wrote:The problem exists for the water textures. The animation doesn't support chunk corners.


What do you mean by chunk corners?
I mean the transition between the chunks. In every chunk the animation is loaded in a different time.

desynchronize_mapblock_texture_animation = false in minetest.conf makes it synchronized for mapblocks, but its slightly slower.