Managing the vast number of objects in your game could be time consuming. Especially when you have short-lived objects in your game like particles, bullets, and animations. This article discusses a method which utilizes arrays to store Entities and storing Entities in layers.
Entity – something that could be drawn, is updated, and can expire.
To design a simple Entity list which handles updating, drawing, and pruning expired entities.
To design a class for storing layers of entities to control drawing and update order.
Welcome to my first article! This article will discuss game loop theory and implementation. This should be valuable if you’re new to game programming, useful if you’re working on a game engine, and might be interesting even if you’re a seasoned programmer! I’ll touch on the common implementations, add functionality to them, and introduce new concepts! (I think?)
To design a simple game engine with flexible game loop configuration.
To have working code with various game loop implementations.
To implement smooth drawing for fixed time-step game loops.