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

Modding

As mentioned before, every level is defined in a level%%.txt file.

Tile graphics are located in Set1, Set2, Set3, Set4 and Set5 bitmap files.

Background graphics are located in BackImg1, BackImg2, BackImg3, BackImg4 and BackImg5 bitmap files.

Heros.bmp contains five sprites of hero characters.

User can modify caverns by altering level text files.  To add or change sprites user must alter bitmap Set files.  Title menu graphics are stored in Title.bmp and TitleBack.bmp.
By altering CCavern.cpp or even replacing it with own class a completely different 2D DirectX game could be created.

Inside StdAfx.h multiple constants are defined:

// initial vertical speed of the killed hero
#define DEATH_JUMP_INITSPEED -10

// change in speed of the killed hero, after he is killed
#define DEATH_JUMP_SPEED  1

// max number of surfaces added by DDCreateSurface
#define MAX_SURFACES   16

// max number of pick items
#define MAX_ITEM_COUNT   100

// max number of guardians in every caveryn
#define MAX_GUARDIANS_COUNT  100

// game tile width and height
#define TILE_SIZE    12

// number of lifes on the level start
#define DRDOBBS_LIFES_LIMIT  5

// dimension of the background image
#define BACKGROUND_IMAGE_WIDTH 320
#define BACKGROUND_IMAGE_HEIGHT 208

// number of sprite frames for every hero
#define HERO_FRAMES_CNT   6

// duration of the game loop frame
#define FRAME_MS    60

// when hero jumps, that's his vertical vector speed
#define HERO_JUMP_INITVECTOR -7.5

// number of levels
#define MAX_LEVEL_NUMBER  36




DDJ