0 votes

Hi,

I am playing around with AnimationPlayer to create basic movement/attack animations for my character (Changing the texture and frame property of a Sprite child). I was wondering if I should split my spritesheet into multiple png files (one for movement, one for attack, etc) or should I just use one for each character ?

I guess having one big spritesheet occupies more RAM and switching the texture all the time affects the cpu performance, am I right ?

Which of these two options is more preferable ?

Thanks!

in Engine by (17 points)

1 Answer

+1 vote

I'd recommend using one big sprite sheet for each character and just change the displayed region during the animation. This will give you better performance. Also there are no disadvantages over using multiple images that come to my mind.

However, in that case I would use an AnimatedSprite instead of AnimationPlayer, this should server your purpose better.

by (18 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.