goku
goku game engine_en
goku game engine_en
  • Chapter 1: Introduction to SDL2, Rust, and goku
  • Chapter2: The Base Structure: SpriteSheet
  • Chapter 3: Animated Textures
  • Chapter 4: Handling Textures: TextureManager
  • Chapter 5: Bringing Textures to Life: GameObject
  • Chapter 6: The Foundation: Tile System
  • Chapter 7: Moving the View: Camera
  • Chapter 8: Particle System
  • Chapter 9: The User Interface Layer
  • Chapter 10: The Button Element
  • Chapter 11: The Text Box Element
  • Chapter 12: The Checkbox Element
  • Chapter 13: The Slider Element
  • Chapter 14: The Audio System
  • Chapter 15: The AI System
  • Chapter 16: The Window System
  • Chapter 17: User Input Handling
  • Chapter 18: Rendering a Parallax Background
  • Chapter 19: Timing and Frame Rate Management
  • Chapter 20: Conclusion
Powered by GitBook
On this page

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 and frame_height: These fields define the dimensions of each frame within the SpriteSheet.

PreviousChapter 1: Introduction to SDL2, Rust, and gokuNextChapter 3: Animated Textures

Last updated 1 year ago