Save a Level to Disk.
HOW TO:
Save a Level to Disk
====================
There are a number of files that AB3DII uses when loading a level, and so saving levels to disk is not
such a simple proceedure. Here is a list of all the files involved in a level:
TWOLEV.BIN
TWOLEV.GRAPH.BIN
TWOLEV.MAP
TWOLEV.FLYMAP
TWOLEV.CLIPS
TWOLEV.DAT
TWOLEV.OBJ
TWOLEV.LINKS
And these are the files actually loaded by the game when you play it:
TWOLEV.BIN
TWOLEV.GRAPH.BIN
TWOLEV.MAP
TWOLEV.FLYMAP
TWOLEV.CLIPS
The rest are files used by the level editor and AI-Linker.
Here's a quick run-down of what is stored in each file:
TWOLEV.BIN
Data about the physical shape of the level and objects within it. This file is created by
the level editor AUTOMATICALLY when you save a level, and is loaded by the game when you run it.
VERY IMPORTANT: THIS FILE *MUST* BE PACKED BEFORE THE GAME CAN BE RUN! SEE BELOW FOR DETAILS!
TWOLEV.GRAPH.BIN
Data about the graphical appearance of the level; for example which textures appear on which walls,
instructions to draw water and so on are. This file is created by the level editor AUTOMATICALLY
when you save a level, and is loaded by the game when you run it.
VERY IMPORTANT: THIS FILE *MUST* BE PACKED BEFORE THE GAME CAN BE RUN! SEE BELOW FOR DETAILS!
TWOLEV.MAP
This file tells walking aliens how to get around the level you have designed. They use the info
in this file to trace the sound of your gunfire, follow you around corners and all the rest.
This file is generated by the LINKUP program, which uses the TWOLEV.LINKS file to generate it.
This file can be packed to save space, but it is not necessary to test the level.
TWOLEV.FLYMAP
Similar to the above, but for flying aliens (which can obviously get across gaps walking aliens
can't).
This file can be packed to save space, but it is not necessary to test the level.
TWOLEV.CLIPS
I can guarantee that this file will cause you more grief than any of the others, because it
certainly gave me more hassle than anything else in the entire game! Put simply, the .CLIPS file
contains all the information about lines of sight, obstructions and other important stuff. Creating
this file takes a LONG time; for a large level it can take several minutes on even an accellerated
computer. Before you complain, the equivalent file for Quake takes 4 hours on a network of super-fast
power computers, so count your blessings!
On the plus side, this file only needs recalculating under certain circumstances. If you run the
game, then change the level, you only need to recalculate the clips file if:
1. You have added one or more zones to the level
OR
2. You have moved one or more points which lie on the border of zones
You DO NOT have to recalculate the clips file unless you have donw one of the above since last
playing your level. Changing floor and ceiling heights, adding water or objects, changing the
lighting in zones or changing the graphics on walls and floors does NOT require recalculating the
clip file before you can play the level.
It is therefore a very good idea to plan your level on paper, then put as much of it in as you
can in one go, then calculate the clip file, then save the level to disk, then run the game to
test it.
NB: If you recalculate the clip file, you MUST save the level afterwards. Failure to do so will
result in a corrupted display in the game, and mean you have to waste time calculating the clip file
AGAIN, then saving the level.
VERY IMPORTANT: THIS FILE *MUST* BE PACKED BEFORE THE GAME CAN BE RUN! SEE BELOW FOR DETAILS!
TWOLEV.DAT
This is the file where the level editor stores its working copy of all the info in the .BIN
and .GRAPH.BIN files. DO NOT LOSE THIS FILE! It is not necessary for it to be included with levels
for playing the game, eg if you pass your levels on to friends, but without it you cannot edit the
level using the editor!
TWOLEV.OBJ
This is the file where the level editor stores a working copy of the object positions and stats for
the level. DO NOT LOSE THIS FILE EITHER! It is not necessary to include this file with levels
you pass on to your friends, but without it you won't be able to edit the level anymore!
TWOLEV.LINKS
This is the file containing the raw data about which parts of the level are accessable directly from
one another. YOU CAN LOSE THIS FILE IF YOU WANT, but if you do, you'll have to go back and link up
all your control points again, which is very dull, so TRY NOT TO!
PACKING FILES
=============
Three of the five files loaded by the game MUST be packed before they can be used. These are
the TWOLEV.BIN, TWOLEV.GRAPH.BIN and TWOLEV.CLIPS files.
To speed up this process, a number of scripts have been thoughtfully included with your editor pack.
These are:
PG Pack the .BIN and .GRAPH.BIN files ONLY.
PGC Pack the .BIN, .GRAPH.BIN and .CLIP files.
PM Pack the .MAP and .FLYMAP files only.
USAGE: Type 'pg A' to pack the files in level A, for example.
IMPORTANT: DO NOT pack files twice. This most often happens accidentally when you load and save a level
in the editor without having to recalculate the .CLIPS file, then type 'pgc A' rather than 'pg A'.
Since the .CLIPS file has not been changed the packer will attempt to pack it a second time, get a bit
confused and the result will be a currupted display in the game. Unfortunately, the only way to
recover from this is, you guessed it, recalculate the clips file, save the level, then 'pgc' it!
CREATING THE MAP and FLYMAP FILES
=================================
If you have put aliens in your level along with control points, you will need to generate the MAP and
FLYMAP files. Use the LINKUP program, entering the level letter when prompted. If you have a slow
computer and a complicated level, this might be a good time to make some tea, watch some telly or
perhaps look for an alternative hobby. Sorry about the time it takes, but there's a lot of raw info
to assimilate.
================
SAVING PROCEDURE
================
Note: To find out how to calculate the Clip file, go back to the Index and
select the Topic on Starting Up, to test the example level. Read the
steps on how to start up a test of the example level for an illustration.
1. Have you just added one or more zones, or moved any points?
YES: RECALCULATE THE CLIP FILE
2. Save the level by pressing 's', then typing the letter of the level you are saving and pressing RETURN.
3. Quit the level editor with CTRL-C.
4. Did you recalculate the clip file before saving?
YES: type 'pgc' then the letter of the level you just saved.
NO: type 'pg' then the letter of the level you just saved.
5. Are there any aliens in your level?
YES: Have you put any control points in your level?
YES: Type 'linkup' and enter the letter of your level at the prompt.
6. You are now ready to play the game!
HTML Conversion by AG2HTML.pl V2.941126c, perl 5.003 & witbrock@cs.cmu.edu