Wednesday, March 1, 2017

If tiles animate automatically, they must continue to animate

Today I helped a new NetKeen modder with their first map. Upon entering their level and after a tiny delay, NetKeen would freeze solid. It couldn't be level set corruption, since it displayed fine and all the other levels in the set had no problems. I didn't see any obvious mistakes in the level, and the Level Inspector reported no issues. I could add a new map to the level set just fine, so I decided to copy over tiles type by type to see which one caused things to break.

Sure enough, when I introduced a certain foreground tile, the freezing started. Looking at its properties, I noticed that it had an animation delay and offset configured when it definitely didn't need one. The tile that it animated to had no animation properties set. Clearing the animations on the source fixed the problem.

I conclude that if a tile automatically animates (i.e. it has an animation target set and doesn't wait for a switch to flip it), it must animate in a continuous cycle. The Tile Property Modifier's inspection mode doesn't check for this; I will see about adding logic for it.

No comments:

Post a Comment