Managing Entities

  1. Summary
  2. Definitions
  3. Objectives
  4. Article
    1. Theory
    2. The Entity
    3. The EntityList
    4. Making EntityList extensible
    5. EntityLayer & EntityLayers
    6. Alternative Data Structures
  5. Expanding
  6. Code Download
  7. Applet
  8. Next Article

Summary

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.

Definitions

  • Entity – something that could be drawn, is updated, and can expire.

Objectives

  • 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.

Continue reading

Generic Game Loop

  1. Summary
  2. Objectives
  3. Article
    1. What is the game loop?
    2. Variable and Fixed time step
    3. Defining Game, GameState, and GameInput
    4. GameLoop interface
    5. GameLoopVariable implementation
    6. GameLoopInterpolated implementation
    7. GameLoopFixed implementation
    8. Smooth drawing technique
  4. Expanding
  5. Code Download
  6. Applet
  7. Next Article

Summary

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?)

Objectives

  • 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.

Continue reading