Godot Version
v4.4.1.stable.official [49a5bc7b6]
Question
I can’t share too much info because of NDA.
I currently have a SpriteFrames
resource which is being played by an AnimatedSprite2D node.
However, because I only need ONE animation per game (because the game is different every time you play it), and because we want to keep the size of the game as minimal as possible, I need to dynamically load the Spritesheets necessary, then using those, create the SpriteFrames
resource when the game starts.
Each spritesheet file looks like this (this would therefore be loaded from an external URL)
I know that every single spritesheet is 3200x2520
in resolution, I know that every full animation requires exactly 12 spritesheets
, and I know that each spritesheet contains 10 frames
, I know that each frame should be exactly 800x840
in resolution, and I know that each final SpriteFrames
resource should contain a total of 120
frames.
Question is, how could I do this? I know how to load an image from a URL, but how do I “cut it up” into individual frames programatically, and add each frame to a newly created SpriteFrames
resource?
Thank you for your help.