Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)(-2)

Awesome!... But how do I use tilesets like this? I'm just starting to learn game programming, and only know how to use individual .png files

(+1)

Most frameworks have some form of class that lets you handle spritesheets with methods for displaying the needed frames and thus animations. 

For example in python & pygame: https://www.pygame.org/wiki/Spritesheet

In Godot you use a Sprite2D Node and a AnimationPlayer node to use sprite sheets directly. 

In Rust and Bevy you load in your sprite sheet and then layout it: https://bevy.org/examples/2d-rendering/sprite-sheet/

let texture = asset_server.load("textures/rpg/chars/gabe/gabe-idle-run.png");     
let layout = TextureAtlasLayout::from_grid(UVec2::splat(24), 7, 1, None, None);    
let texture_atlas_layout = texture_atlas_layouts.add(layout);        
let animation_indices = AnimationIndices { first: 1, last: 6 };