Writing a sprite batcher: from one draw call per sprite to one
A sprite batcher in three versions: naive quads, a shared vertex buffer, then instancing, with texture atlases and sorting by layer and texture explained.
by Odalys Brisco
A reading room for people who build games close to the code. How small engines are put together, Rust patterns that survive a real game loop, wgpu and shaders explained from the first triangle, pixel art that reads at a glance, and the checklists between a jam prototype and a release.
Fixed updates, variable rendering, and a little interpolation to hide the seams. The full walkthrough explains each line.
use std::time::{Duration, Instant};
const STEP: Duration = Duration::from_millis(16);
fn main() {
let mut world = World::new();
let mut last = Instant::now();
let mut lag = Duration::ZERO;
loop {
lag += last.elapsed();
last = Instant::now();
while lag >= STEP {
world.update(STEP.as_secs_f32()); // the same tick on every machine
lag -= STEP;
}
world.draw(lag.as_secs_f32() / STEP.as_secs_f32());
}
}A sprite batcher in three versions: naive quads, a shared vertex buffer, then instancing, with texture atlases and sorting by layer and texture explained.
by Odalys Brisco
Five borrow checker errors every Rust game hits, and the patterns that fix them: indices over references, split borrows, command queues and honest RefCell use.
by Kasimir Lund
How to pick a tile size, store a map in chunks, write simple autotiling rules and keep collision on its own layer, with a small Rust tilemap you can grow.
by Jun Takemura
A step by step build of 2D collision detection: AABB and circle tests, the separating axis theorem, pushing overlaps apart and stopping fast objects tunnelling.
by Tendai Mukwena
Game audio basics for small 2D games: where to find sound effects, licences to check, mixing levels, pitch variation, music loops and playing sound in Rust.
by Felicity Marrable
How to release an indie game on Steam, step by step: the Steam Direct fee, when to open the store page, wishlists, builds and depots, review, and launch day.
by Felicity Marrable