2D Game Programming Concepts Flashcards
6 cards from real 2D Game Development practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 2D Game Programming Concepts flashcards as text
What is the 'game loop' in 2D game development?
Answer: The continuous cycle of processing input, updating game state, and rendering each frame
The game loop is the central execution cycle that repeatedly handles input, updates all game objects, and renders the scene to produce each frame.
What does 'delta time' (dt) represent in 2D game programming?
Answer: The time elapsed since the last frame
Delta time is the duration of the previous frame in seconds; multiplying movement speeds by delta time ensures consistent behavior regardless of frame rate.
What is the 'Entity-Component System' (ECS) pattern in game development?
Answer: A data-driven architecture where entities are IDs, behavior is added via components, and systems process them
ECS separates data (components) from behavior (systems) and avoids deep inheritance, leading to better performance via cache-friendly data layouts.
What is 'object pooling' in 2D game programming?
Answer: Reusing pre-instantiated objects instead of creating and destroying them repeatedly
Object pooling reduces garbage collection overhead by recycling deactivated objects rather than allocating new ones for frequently spawned items like bullets or particles.
What is an 'event system' (or message bus) used for in 2D games?
Answer: Decoupled communication between game systems without direct references
An event system lets game systems publish and subscribe to messages, removing tight coupling between classes and making the codebase more modular.
What is the 'Singleton pattern' commonly used for in 2D game development?
Answer: Ensuring only one instance of a manager class exists and providing global access to it
The Singleton pattern is used for manager classes (GameManager, AudioManager) that should have exactly one instance accessible from anywhere in the codebase.