Animated Tilesets for All-Stars Resource Packs

This PR adds animated tilesets! I spent the day working on these, and it wasn't easy. This is primarily to help animate the All-Stars' grass tiles. You should be able to animate the other tilesets as well, but I haven't tested them.

JSONs are provided in the assets for Conveyer Belts and Liquids. There's two ways to animate the tilesets. The first is by the traditional way as used by `AnimatedSprite2D`, and the other is by how Godot animates tilesets normally as seen with the conveyer belts and liquids.

The last thing is that while doing this, I actually managed to fix the Resource Pack bug where reloading also reloads the blocks! It was surprisingly straightforward. I just edited the `BlockClass.gd` file to erase the cells when a block is hit or destroyed.

Let me know if you have any suggestions for things I should change or fix.
This commit is contained in:
KirbyKidJ
2025-09-30 00:04:03 -07:00
parent 9311424f55
commit 8b5d9afba9
14 changed files with 332 additions and 34 deletions

View File

@@ -1,6 +1,86 @@
{
"animations": {
"default": {
"Tile:0": {
"frames": [
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
}
],
"mode": 0.0,
"speed": 20.0
},
"Tile:1": {
"frames": [
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
}
],
"mode": 0.0,
"speed": 20.0
},
"Tile:2": {
"frames": [
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
}
],
"mode": 0.0,
"speed": 20.0
},
"Tile:3": {
"frames": [
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
}
],
"mode": 0.0,
"speed": 20.0
}
}
},
"variations": {
"SMB1": {"source": "ConveyorBelt.png"},
"SMBS": {"source": "ConveyorBeltSpecial.png"}
"SMB1": {
"source": "ConveyorBelt.png"
},
"SMBS": {
"source": "ConveyorBeltSpecial.png"
}
}
}
}

View File

@@ -1,6 +1,86 @@
{
"animations": {
"default": {
"Tile:0": {
"frames": [
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
}
],
"mode": 0.0,
"speed": 30.0
},
"Tile:1": {
"frames": [
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
}
],
"mode": 0.0,
"speed": 30.0
},
"Tile:2": {
"frames": [
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
}
],
"mode": 0.0,
"speed": 30.0
},
"Tile:3": {
"frames": [
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
},
{
"duration": 1.0
}
],
"mode": 0.0,
"speed": 30.0
}
}
},
"variations": {
"SMB1": {"source": "OnOffConveyorBelt.png"},
"SMBS": {"source": "OnOffConveyorBeltSpecial.png"}
"SMB1": {
"source": "OnOffConveyorBelt.png"
},
"SMBS": {
"source": "OnOffConveyorBeltSpecial.png"
}
}
}
}

View File

@@ -1,4 +1,68 @@
{
"animations": {
"default": {
"Tile:0": {
"frames": [
{"duration": 1.0},
{"duration": 1.0},
{"duration": 1.0},
{"duration": 1.0}
],
"mode": 0,
"speed": 8.0
},
"Tile:1": {
"frames": [{"duration": 1.0}],
"mode": 0,
"speed": 1.0
},
"Tile:2": {
"frames": [
{"duration": 1.0},
{"duration": 1.0},
{"duration": 1.0},
{"duration": 1.0}
],
"mode": 0,
"speed": 8.0
},
"Tile:3": {
"frames": [{"duration": 1.0}],
"mode": 0,
"speed": 1.0
},
"Tile:4": {
"frames": [
{"duration": 1.0},
{"duration": 1.0},
{"duration": 1.0},
{"duration": 1.0}
],
"mode": 0,
"speed": 8.0
},
"Tile:5": {
"frames": [{"duration": 1.0}],
"mode": 0,
"speed": 1.0
},
"Tile:6": {
"frames": [
{"duration": 1.0},
{"duration": 1.0},
{"duration": 1.0},
{"duration": 1.0}
],
"mode": 0,
"speed": 8.0
},
"Tile:7": {
"frames": [{"duration": 1.0}],
"mode": 0,
"speed": 1.0
}
}
},
"variations": {
"default": {
"Day": {"source": "Liquids.png"},