SpriteSheet animations?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Shadowblitz16
Citizen
Posts: 73
Joined: Wed Oct 28, 2015 11:18 pm

SpriteSheet animations?

Post by Shadowblitz16 »

does anybody know how to do sprite sheet animations?

I know not all sprites are the same size so I was thinking using an external .json to define the entity's animation

for example

the function being animation(player.animation)

and the player.animation being
[spoiler]
{
"animations" :
{
"default" : "idle",
"idle" :
{
"transition": "idle",
"frames": [
[0,0,16,16],
[1,0,16,16]
]
},
"damaged" :
{
"transition": "idle",
"frames": [
[0,1,32,32],
[1,1,32,32],
[2,1,32,32],
[3,1,32,32]
]
}
}
}
[/spoiler]

with the frames being x,y,width,height
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 47 guests