Game Development Concepts & Theories

Game Loop

A game loop is the core of any game program. It's a sequence of processes that run continuously as long as the game is running. The game loop typically involves three main processes:

  1. Input: This is how the player controls the game, through devices like a keyboard, mouse, or gamepad.
  2. Update: This process involves updating the game state, which includes game logic, object movements, interactions, and other game mechanics.
  3. Render: This is where the game draws the updated game state to the screen for the player to see.

The game loop is referred to as a ‘loop’ because the program keeps looping through these processes infinitely until the game is manually stopped or exited. It ensures that the game progresses frame by frame, providing a seamless interactive experience for the player. Each iteration of the loop is typically one frame of the game, and the speed at which the loop runs is measured in frames per second (FPS).

In essence, the game loop describes the repetitive activities that a gamer will engage in, from the moment the game starts until it ends. It's the main mechanic that players are introduced to upon booting up a game. For example, in a shooter game, the gameplay loop might involve spotting an enemy, aiming, shooting, and then moving on to the next target.

Systems

The main components of a simple and lightweight 2D game engine typically include:

  • Scene Management: This involves managing various scenes within a game, such as levels or menus.
  • Resource Management: Efficiently loading and managing game resources like textures, sounds, and other assets.
  • Sprites and Tilemaps: For rendering 2D images, animations, and creating the game world with tile-based maps.
  • Particle Systems: To create effects like fire, smoke, or explosions.
  • Sound/Music Handling: Managing audio playback for sound effects and background music.
  • Input Handling: Processing input from the player through keyboard, mouse, or gamepad.
  • Collision Detection/Physics: Determining interactions between game objects and implementing the laws of physics.

Math

  • Vectors
    • Component Form
    • Polar Form
    • Resolving Into Components
    • Position
    • Resultant
    • Magnitute
    • Scalar Product
    • Add & Subtract
    • Direction Angles
    • Dot Product
    • Cross Product
  • Matrices
    • Add & Subtract
    • Scalar Product
    • Multiplication
    • Transposition
    • Transformations
    • Invertable & It's Inverse
    • Determinant
    • Eigenvalues and Eigenvectors
    • Perspective Matrix
    • Camera Transform

Physics

Algorithms