Article Index
Introduction
Game Engine
Game Logic
Bitmap Font
Sprites
The CCavern Method
Level Files
Sound And Input
Class Summary
Modding

Game Logic

The game starts when the game thread calls CGame::Run():

CTitleMenu is created, where the background animation, logo and menu are shown.

When user select 'Start game' CGame::StartGame() is called, and:

The CCavern object is created, and CCavern::LoadLevel(..) is called with the level number. The LoadLevel method creates all sprites, guardians, tiles and items, by reading the level??.txt file.

Every level consists of 12x12 tiles, every guardian and hero is 24x24 pixels wide/high. This simplifies game logic and level design.




DDJ