"TerraScape: Breakdown Velocity"
Source Codes
Package created: 03.01.2004
by Pieslice Productions

This package contains all Quickbasic, C and Assembler modules for
TerraScape: Breakdown Velocity, compiled C and Assember OBJect
files and compilation BATch files. If you want to compile the game
yourself, you will also need CosmoX Game Programming Library by 
CosmoSoft and ModeX library by Danny Gump. The slived LIBs of these
libraries are included in this package.
This package also includes both the MAP editor and the TERRAIN editor 
for TerraScape: Breakdown Velocity.
With a little patience you can create your own campaign, but if you
distribute it, you must tell people that your version of TerraScape:
Breakdown Velocity is modified. Read further for the details of the
level design.

The files in the package are:

Quickbasic modules:
GAME.BAS - The game loop main module
GAMESUBS.BAS - The game loop general subprograms
AI.BAS - The game loop AI/Logic subprograms
MAINMENU.BAS - Main menu of the game
MENUSUBS.BAS - Main menu subprograms
BRIEFING.BAS - Mission briefing
INTRO.BAS - Game intro
OUTRO.BAS - Game outro
SOUNDSYS.BAS - Ds4QB2 Calls
LAUNCH.BAS - Game launcher utility

Other modules:
RENDER.C - The advanced graphics renderer
SHADRECT.C - Translucent rectangle code
TRIFB.ASM - Translucent triangle code

Include files:
OBJTYPES.BI - Object descriptors
SLIVEDCX.BI - Slived cosmoX header
MODEXLIB.BI - ModeXlib header

Other files:
.MAK QuickBasic Makefiles
.OBJ Compiled C and Assembler code (by Pieslice Productions)
.LIB Compiled Assembler code (not created by Pieslice Productions)
.BAT Compilation batches
MAPEDIT.EXE - Map editor
TERRAG.EXE - Terrain creator
TEXTUREG.EXE - Terrain texture creator

.....IMPORTANT
In order to make your compiled game run, you must rename your EXE files
to the following. (This is because the XBN multimodule technology 
created by Pieslice Productions. XBN stands for Executable Binary)

LAUNCH.EXE -> TERRA.EXE
GAME.EXE -> SCAPEZ01.XBN
MAINMENU.EXE -> SCAPEZ02.XBN
BRIEFING.EXE -> SCAPEZ03.XBN
INTRO.EXE -> SCAPEZ04.XBN
OUTRO.EXE -> SCAPEZ05.XBN

These files are all independent programs which need each other to run
correctly.

sorry, the code isn't commented at all. hope you'll still benefit from
it.

LEVEL DESIGN:

The level design in TerraScape: Breakdown Velocity is rather difficult,
and I didn't plan to release any editors for it, but I thought that
it could be cool to release the editor with the source code package.
First of all, the terrain is nothing more than one 256x256 grayscale 
raw bitmap for bumpmap and another 256x256 grayscale raw bitmap for
surface texture. I used the two plasma generators (which are included
in this package) to create raw version of the landscape, and LAYERBLU to
smooth them. You can use also for instance Paint Shop Pro 8 to create
some additional details to landscapes. You just need to load them as 
RAW files.
The final terrains are HFIELDxx.LSG and GNDTEXxx.LSG files, you just
have to rename the .RAW files into them.
To make your new terrain appear in MAPEDIT, overwrite the 
EDITBUMP.RAW file.
Remember that the bumpmap is negative-image ie. black is the highest
point.
Terrain and sky colors are hard coded into the GAMESUBS.BAS module into
the CreateTerrainColors SUB.

The level editor is rather easy to use. You just need to draw objects
with the mouse. You can select an object with right click and deselect
it with right click off it.
Left click over selected object opens the object properties window.
Do not use fighters in your levels, because they're generated 
automatically.

The keys in the editor are:
Arrows - Scroll
Comma, Period - Shift object
A/Z - Set Y hook of the object. The Y hook is the altitude where
      the next object will be placed. You'll more likely want to put 
      buildings on ground. (xcept Mars Hover Station)
F9 - Open task sequence editor. This window has a bug, so don't scroll
     the task list.
F2 - Save level.
F3 - Load level. The level files are named MAP00x.DB

yeah, the editor sucks big time. but it was sufficent for us, so
it'll have to be sufficent for you too.

Check out the MOD folder for how to customize your models.

Pieslice Productions
pieslice_product@hotmail.com