Chapter2: The Base Structure: SpriteSheet
The first foundational structure of our game engine is the SpriteSheet
. A SpriteSheet is an efficient way to pack multiple images, or frames, into a single image file. This can drastically reduce the overhead when rendering multiple similar objects, such as characters or tiles.
texture
: The Texture field represents the texture image that makes up the SpriteSheet. This will be a loaded image file containing all frames of the sprite.frame_width
andframe_height
: These fields define the dimensions of each frame within the SpriteSheet.
Last updated