09/09/05
Alien Breed 2005 Obliteration - Level Building - flashjesterpunk
I havent covered everything so
feel free to ask any questions.
Note. Apart from the minimal testing and bug fixing while
I've used the editor its still susceptible to crashing on unexpected circumstances
in data, so I recommend against working on anything in the background and to
save often.
1.
The editor is built into the game
executable, make sure you have build 09/09/2005 or later (it will show in the
title bar)
Unzip this file to your alien breed directory
maintaining the directory structure, this should create a folder named data
with 3 files inside.
.til files store the map tile data, this is editable in the editor.
.lev files store unit, level and player data, this is mostly editable in the
editor but you will also need a text editor like notepad
2.
There should be a config.txt in
your alien breed folder, adjust the following parameters accordingly or add
if they are not present (1 to enable and 0 to disable):
EDITOR enabled=1
this will enable the editor
SCREEN fullscreen=0
optional, you may find it easier, you can alt+tab anytime you wish to swtich
between them
CHEATS enabled=1
optional, useful for play testing
AUDIO music=0
optional, turns off the music on the main menu
3.
The editor has several screens,
screens can be accessed pressing F1-F12 keys, some of them require a map/level
to be loaded, or files to exist before you can use them.
F1 - Level Select - lists level
files in 'data' for selection and loading (only if theres some there)
F2 - Game Mode - the actual game running, if you switch to the game while editing
remeber it will change level & unit information so you must save the level
before hand and load your level after to get your settings
F3 - Map Editor - Edit the map tiles, floor/wall etc, this data does not change
if you switch to game while editing
F4 - Game Data View - Shows currently loaded units and cycle animations, but
you dont need this
F5 - Unused
F6 - Main Menu - short cut
to the game main menu, I doubt youll use this when editing
F7 - Cheat Screen - its a bit basic but usefull when play testing a level, use
up/down then left/right keys or return
F8 - Intex Menu - short cut to intex menu, not needed for editing but intex
radar maybe useful for a map overview
F9 - Load Menu - for save games, not needed for editing
F10 - Level Edit - used to create\position\remove units
F11 - Story Screen - displays the level mission description, useful to see how
story text is displayed
F12 - Unused
Building a level is split into two
jobs, 1 make a map, 2 place units (keys/ammo/doors/alien spawns/etc)
We will examine making a map first.
Basic Map Tiling
4. Start the game, it will load
up as normal.
Press F1 for level selevt you will see one level in the data directory, (and
is already selected) press return. 'level loaded' should display at the top.
Press F3 for map edit mode,
You can move around the map putting the mouse near a screen
edge in the direction you want to move
To use the menu (to the left) up/down arrow keys moves the selector and return
to select
5. click and hold right mouse
button, you will see all selection of tiles, PAGE UP/DOWN keys to see more
Hover the mouse over several tiles and look top right to what tile will be selected
hover over a tile you want to use and release the right mouse button, thats
how you select a tile.
6.now press left mouse button anywhere on the map,
the tile is placed onto the map, you can also hold down the left mouse button
and tiles will be placed where you move the cursor so you can fill in seveal
at a time
7. using the arrow keys move the
arrow selector on the left menu to [Load Map] and press return, this will reset
your changes to the last saved version
8. For now we are only intrested in floor, wall/obstruction and computer tiles.
placing computer tiles will give the player access to the intex terminal menu
wall/obstruction tiles define the play area and where the player cant go on
the map
use arrow keys to select [Clear
Map] and press return
9, To make a wall, hold RMB (right
mouse button) and press PAGE DOWN key until you see wall tiles, select a wall
tile (make sure the tile type says obstruction), move the mouse to scroll the
map down a little (by moving the mouse to the bottom of the window) make an
outline of a square about 10 high 10 wide pressing left mouse button (LMB)
10, now select a floor tile (make
sure the tile type says floor), and fill in your 10 *10 box with that tile (remember
to hold left mouse button down)
11.on the left menu use arrow keys
to select [AutoGenerate Floor] and press return, see how the floor tiles change?
If not you may have selected a file thats not flagged as a floor tile, try again
witha different floor tile.
this is useful and takes the time out of doing the floor and shading under walls.
12. you can select and place some computer tiles if you like
13. use arrow keys to select [Save Map] and press return to save your changes
Copy Paste
14. Now move the mouse to the top/left of your room at the first wall tile and
press and hold the middle mouse button, see a green square appear around a tile?
15. Move your mouse down and right by about 5 quares and release middle mouse
button. You have just copied that area to the clipboard, a tempory area
16. now move your mouse to middle of the room and press & hold left mouse
button and without moving the mouse down press the middle mouse button aswell
then release both, that should have pasted the clipboard to the map.
The copy/paste saves time building
maps.
More Features
18. On the menu there is Flip Selection and Mirror Selection, these just change
the order of the tiles in the clipboard and not the images which you will need
to alter.
19. Go ahead and fix the walls of your room using the right tiles so you get
nice looking walls.
20. There are two layers to place tiles on, a lower which is most used, and
an upper which is used for tiles that have transparency, for example:
To use the angled wall tiles, put a floor tile down first, select an angle wall
tile, press & hold the left control key to access the upper layer and place
the tile above the floor tile you placed.
This has been done to reduce the tile count and increase tile combinations
21. Dont worry about tiles 2-6 they
are just for the game to show debug or map information.
22. Tile 1 is a blank tile that
can be used to clear any unwanted tiles on the lower or upper layer.
23. remember to save your map regularly
so you dont loose changes, and you can use load map to discard any changes since
your last change.
24. Maps are 100 tiles width by
100 tiles height.
Notes:
Only obstruction tiles on the lower layer are seen
Pressing shift exploses the lower layer only, usefull if you have tiles on the
upper layer and wany to see whats underneith.
tiles which have UP.L written on them show theres a tile on the Upper layer
loading a bitmap
in as a map
this is a neat feature that allows you to use MS Paint to knock up a map layout
and import it
//must already have a map loaded
//bitmap must be 100*100 pixels
//must be 8 bit (256 colours)
//must have a black value of rgb 0 0 0 in palette (any index with black will
appear as a wall)
//put your bmp map in \data\ folder
//load your level in F1,
//press F3 for map edit,
//move menu select down to [Convert BMP Map],
//press return,
//type your filename like: filename.bmp
//press return
//map should be converted
Level Editing (job 2)
How to place items on your map.
1. make sure a level is loaded press
F10 for level edit
2. Be carefull when you enter level
edit that you have not played the game since loading the level or else when
you come to save you will save the in game data with it and the game will start
in that state, ie some doors will be open if the player has gone through them
and aliens if theyve spawned
I use the term 'unit' for entities ie the player or a piece of ammo/key etc
to select a unit LMB click on it, the position may jump if you dont click in
the top tile,
To move a unit, hold LMB and
move the mouse, then let go
to remove a unit press RMB on the unit.
to create a new unit press RMB on a space where theres no unit.
3. use the arrow up/down keys to move the menu selector to [Clear All Units]
and press return
4.move
the menu selector to Object and press return.
5. move the mouse to where you want
to create a unti and press RMB, a list of all the possible object types appears,
using the arrow keys move down to 'Player1' and press return. The player wil
appear.
6. The player is a special unit like the boss, so move the selector to [Special
Unit], then left/right arrow keys until 'Player' appears and press return, without
this the game doesnt know which unit to control for the player. Most of the
units dont need to be specified like ammo/keys/doors etc.
To add your next unit, go to Object and press return which will take you to
the next free slot, press return and select 'pickupammo' then RMB on a clear
area, you can create another piece of ammo repeating this or more easier would
be just to press RMB where ever you want to creat ammo, basically what ever
object is currently selected will be created, if the object says 'doesnt exist'
then your given a chance to load something new in.
Go ahead and add some money keys too.
6. So the game now knows of a player
(which we only want one of), keys and money, more objects can be placed this
way so experiment,
If you select the object loading menu accidently and dont wat to select an object
to load just press F10 again to go back to the editor.
7. (repeating above )say we have several objects laoded now and want to go back
and add another key somewhere, either LMB select an existing key to select that
as the cuttent object type to place or use left/right arrow keys to select the
key object type on the Object menu item, with the key object selected press
RMB as normal.
9. The same process is used to add
doors, fans, barrels, vents, etc.
10, Aliens are spawned dynamicly by the game so you just place spawn points
named 'spawnerXX'. xx=alien number
11. There can only be one boss, when you place him set [Special Unit] to boss
12. The level story/description
is set using notepad or similar app, just load the .lev file and change it.
the .lev file is simlar to XML,
most lines will have the format <TYPE parameter=value>
use "" double quote marks for any text - especially with spaces in,
use <> brackets for any items - especially spanning multiple lines.
be careful hand editing the .lev
file as it can take a while to figure out if suddenly it wont load.
13. The game state and loading next
level is triggered by a responce set on the boss or lift items,
see levels I have included for examples, I havent covered this bit yet so feel
free to ask how to do stuff
14. So far I think theres 6 objectives
to my game
1. destroy something and get to the lift
2. kill the boss and get to the lift
3. get to another lift
4. kill the eggs and get to the lift
5. kill the prisoners and get to the lift
6. kill the domes and get to the lift
Adding Aliens
The spawning of aliens is controlled by the code, so place
spawners for the aliens you want.
At this time the code will control up to 8 aliens at any time. (spawners are
not limited to this)
The spawners spawn at random times (i forget how long but its pretty balanced),
the game will look at a half screen section around the screen for any spawners
ready to produce an alien.
Units
Maximum Number of units you can place in the level editor is 480, 32 are saved
by the game (512 in total)
Ship Collision
I placed wall/obstruction tiles underneith the ship on the map.
The collision works with circles, then pixel bit checking, as the ships requires
a big
circle it would have done lots of bit detection on it which isnt needed
so i decided not to do any as it only appears once in the game
Dont place units on top of other units, there should never be a need to and
it will create more collision checking for the game causing a slight slow down.,
For example make sure theres never a door/spawner or key etc on top of each
other.
Player Stats
The first level is special in that it contains the line
starting players stats like number of lives etc,
PLAYERSTATS can include any of the following with values next to them:
Note that some states should not appear in level files after the first level
or else they will reset the player stats, ie ammo lives etc
If you want the player to start with 0 anything, you can either set it to 0
or remove the item completely as the game sets everything to 0 before loading
the first level.
"Ammo", - 50 rounds per
clip, 50 rounds is represented by 16 bits on the hud i think
"Keys", - number of keys starting with
"Money", number of credits starting with
"Lives", number of lives
"HasScanner", - for save game, whether player has hand scanner tool
"CountDownDelay", - to delay the onset of level destruction count
down
"CountDownTimer", - for save game, level destruction timer
"LevelState", - "Normal", "Boss", "CountDown",
"Destruction", "EndGame", - use normal,
"InvunerableTimer", only used by save game
"CurrentWeapon", - - for save game players current weapon - must be
listed in the weapons the player has
after the stats is a list of weapons
in the save game, but machinegun does appear in the level stats
the guns should only be listed with =1,
"MachineGun",
"TwinFire",
"FlameArc",
"PlasmaGun",
"Flamethrower",
"Sidewinders",
"Lazer",
Level Story Text
Load the .lev in notepad and
edit, load the level with F1, use F11 to see the text as it will be seen
Next Level/Map
When you want to make more maps just create a copy of the .lev and .til in windows
explorer and rename them,
to mylevelname02.til mylevelname02.lev (mylevelname = what ever you want to
name them) In the .lev file find MAPTILEDATA file=oldlevelname01.til and change
it to your new coresponding .til file (mylevelname02.til)
the .lev should appear in the F1 level select menu.
dont use level1.til or .lev to level15.til
/lev as the game will pick up my levels instead ;)
Play Test
To test your level press F2, but make sure to save your changes first using
[Save Level] or else when you play
the game will change the states of items. And use F1 load your level again when
you go back to editing.
When the game detects a .lev file with 01 at the end it will insert a select
campaign screen after you start a game from the main menu so you can choose
to play your set of levels from the start.
Anything else
Theres a whole ton of stuff I#ve
not had time to include but if you ask how to do seomthing I'll do my best to
answer asap and update this.