05-03-2020, 03:46 PM
This release doesn't introduce new features, but enhances existing ones.
Revamped animation engine
Prior to this release, animation engine was a globally slotted one, in the same way as sprites or layers. Each animation of any kind required a slot that had to be managed. That was tricky with tileset animations, where slots had to be allocated beforehand without having knowledge of how many slots was going to need. This was cumbersome to say the least.
No more.
Sprite and tileset animations are self sustained: they don't use slots anymore, using them is straightforward:
Now it's possible to have a tileset animation where one of the frames can be the same as the tile being animated, it's usual to do this way by map creators. You can now do this:
In this example, tile 47 is both the tile being animated, and one of the frames of the animation.
Enhanced asset packer support
Previous version of asset packager format had a flaw where improbable -but possible- hash collisions weren't handled properly. That could lead to loading a different asset than intended. ResourcePacker has been updated without this flaw, and its loader is now integrated in this release. I also allows unlimited password length. Upgraded packer can be downloaded at itch.io: https://megamarc.itch.io/resourcepacker
Enhanced .tmx loader
It now supports up to 64 layers per .tmx file, and tilesets are cached. If multiple layers use the same tileset, only one copy of the tileset is loaded and animated, shared between all the tilemaps using it.
Updated examples
All examples are updated to be compliant with the new API changes. In addition "forest" sample now accepts optional command-line parameters to load assets from password-encrypted asset pack. For example:
Starts forest example with assets being stored inside "assets.dat" encrypted with password "my_password"
Revamped animation engine
Prior to this release, animation engine was a globally slotted one, in the same way as sprites or layers. Each animation of any kind required a slot that had to be managed. That was tricky with tileset animations, where slots had to be allocated beforehand without having knowledge of how many slots was going to need. This was cumbersome to say the least.
No more.
Sprite and tileset animations are self sustained: they don't use slots anymore, using them is straightforward:
- Tileset animations are started automatically when setting up a layer that has animated tileset
- Sprite animation just require the index of sprite to animate.
- Tilemap animations were a legacy feature don't used anywhere, removed
- Slotted animations are now only used by palette animations (color cycles).
- Removed `TLN_SetTilesetAnimation()` and `TLN_SetTilemapAnimation()`.
- Removed parameter "index" from `TLN_SetSpriteAnimation()`, requires only sprite number.
- Replaces `TLN_DisableAnimation()` with `TLN_DisablePaletteAnimation()` and `TLN_DisableSpriteAnimation()`
Now it's possible to have a tileset animation where one of the frames can be the same as the tile being animated, it's usual to do this way by map creators. You can now do this:
Code:
47 <- [47, 49, 50, 53]
In this example, tile 47 is both the tile being animated, and one of the frames of the animation.
Enhanced asset packer support
Previous version of asset packager format had a flaw where improbable -but possible- hash collisions weren't handled properly. That could lead to loading a different asset than intended. ResourcePacker has been updated without this flaw, and its loader is now integrated in this release. I also allows unlimited password length. Upgraded packer can be downloaded at itch.io: https://megamarc.itch.io/resourcepacker
Enhanced .tmx loader
It now supports up to 64 layers per .tmx file, and tilesets are cached. If multiple layers use the same tileset, only one copy of the tileset is loaded and animated, shared between all the tilemaps using it.
Updated examples
All examples are updated to be compliant with the new API changes. In addition "forest" sample now accepts optional command-line parameters to load assets from password-encrypted asset pack. For example:
Code:
forest assets.dat my_password
Starts forest example with assets being stored inside "assets.dat" encrypted with password "my_password"