← All 2D Game Development Flashcard Decks

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
  1. What is the purpose of a 'finite state machine' (FSM) in 2D game AI?

    Answer: Modeling entity behavior as a set of states with defined transitions between them

    An FSM organizes AI behavior into discrete states (patrol, chase, attack) and defines the conditions that cause the AI to switch between them.

  2. What is 'lerp' (linear interpolation) commonly used for in 2D games?

    Answer: Smoothly transitioning a value between a start and end point over time

    Lerp calculates intermediate values between two points based on a 0–1 parameter, used for smooth camera follow, UI transitions, and object movement.

  3. What is 'input buffering' in 2D action games?

    Answer: Recording a player input slightly before the action is valid so it executes at the earliest opportunity

    Input buffering stores a recent input command for a brief window so it triggers as soon as the relevant condition is met, making controls feel responsive.

  4. What is 'scene management' in a 2D game engine?

    Answer: Loading, unloading, and transitioning between different game screens and levels

    Scene management handles loading level data, transitioning to new scenes (menus, levels, cutscenes), and cleaning up previous scene resources.

  5. What is 'data serialization' used for in 2D game development?

    Answer: Converting game state to a storable format (JSON, binary) for saving and loading

    Serialization transforms runtime objects (player stats, level state) into a storable byte format that can be written to disk and deserialized to restore the game state.

  6. What is 'coroutine' or 'async function' commonly used for in 2D game scripting?

    Answer: Pausing execution over multiple frames to spread out work or create timed sequences

    Coroutines yield execution back to the game loop for a frame (or a set time), enabling sequences like fade-outs, countdowns, and wave spawning without blocking.