Tag Info

New answers tagged


Use a queue structure to represent the on-screen terrain; this approximates an infinite "ring-buffer". Psuedo-code: float maxCount = 20; //enough "terrainBlocks"(Sprites?) to fill the screen //I only call this a "queue" because we add/remove from opposite ends float Array<TerrainBlock> queue; void fillQueue() { while (queue.count < maxCount) { ...

Top 50 recent answers are included