| |
This
file describes all the specifics about a level.
For example, where powerups are located, how much
gravity a level has, scoring information, starting location,
etc.
Shown
below is a sample Level Description File.
The Description File is still under development at this point,
so this is really just an example of the type of file
necessary to describe level specifics.
[map,the
moon] // Will load the moon.jpg for level
image,
the moon.png for level mask info
[fuel,100] // initial fuel value (as a percentage)
[shield,0] // initial shield value (as a percentage)
[start,275,100,0,50,0] // start x (0-749), start y (0-749), x velocity (-511-+511),
y velocity (-511-+511), sprite (0-35)
[popcolor,100,100,255] // Red, Green, and Blue values of special effects for the level.
[gravity,4] // Gravity. Large=more gravity. Zero=no gravity
[nextlevel,mars] // Filename of next level
[req_powerup,6,2] // Exit Requirement
[req_powerupmes,Rescue Astronauts]
[exit,0,0,750,20,0] // Level Exit Location
[powerup,0,610,650] // fuel barrel
[powerup,1,393,363] // deflector shield
[powerup,8,84,581] // fuel system upgrade
[powerup,6,346,511] // astronaut
[powerup,6,366,511] // astronaut
[demolish,62,591,109,617,1,40,2,0,0] // Information to make areas of the level break away, etc.
[demolish,346,221,381,239,1,40,2,0,0]
[demolish,495,200,530,225,1,40,1,0,0]
[demolish,540,240,627,284,1,40,1,0,0]
[demolish,664,280,694,326,1,40,1,0,0]
[demolish,303,473,330,490,1,40,1,0,0]
[demolish,639,507,687,534,1,40,1,0,0]
[demolish,666,651,690,678,1,40,1,0,0]
[demolish,313,503,340,521,1,40,1,0,0]
[demolish,197,477,217,515,1,40,1,0,0]
[demolish,354,671,369,702,1,40,1,0,0]
[demolish,130,691,191,712,1,40,1,0,0]
[demolish,305,558,430,590,2,40,2,0,0]
[demolish,556,366,680,459,2,40,2,0,0]
[demolish,110,613,210,647,2,40,2,0,0]
[demolish,386,279,425,354,2,40,2,0,0]
[demolish,320,390,470,432,2,40,2,0,0]
[environment,3,508,124,597,255,5,65535,0] // one of many environmental effects
[enemy,34,25,672,1] // enemy type, enemy skill level, enemy weapon & location
[end] // End of level description file
Here
is a breakdown of the commands:
[sprites,filename]
this will force the game to use an alternative sprites file
image for the level. This will allow you to change the
look of the sprites. The game will look for filename.PNG
when loading the file. [backdrop,filename]
this will force the game to use an alternative backdrop file
image for the level. This will allow you to change the
top & bottom bars as well as the fuel, shield, repulsor,
and phase gauges. Also located in this image are the
look of the upgrade screen and the look of the bosses.
The game will look for filename.PNG when loading the file.
[forceload]
this forces reloading the same map if two sequential
maps use the same map file.
(default will be to just keep the same map image &
debris without reloading a clean map)
[inventoryadjust,
item, amount] this
will adjust the amount of an item in your inventory at the
beginning of the level.
[inventoryset,item,amount]
this will set the amount of an item in your inventory
[gravity,
amount] sets gravity (range 0-200)
[fuel,amount]
sets fuel (0-100) at the beginning of the level (percentage).
do not include this line if you want the current fuel
to carry over from the previous level.
[shield,amount]
sets shield (0-100) at the beginning of the level
(percentage). do
not include this line if you want the current shield to carry
over from the previous level.
[timelimit,
amount] sets a timelimit for the level in seconds (0-3600)
[popcolor,R,G,B]
(r,g,b 0-255) sets effects color for level.
[bonuslevel,1]
sets level as a bonuslevel...first death ends level.
[nextlevel,levelname]
sets name of next level
[map,
name] name of map to use for level
[map,
lava] (example) This
describes the filename both the Level Image File and the Level
Mask File. In
this example the Level Image File is named "lava.jpg"
and the Level Mask Image File is named "lava.png".
As a side note, the Level Description File can be named
differently than the Level Image & Mask Files.
This is done so that multiple levels could use the same
Level Image & Mask files--in the event that you like to
have several different game level situations on the same level
image. The Level
Description Image File is named similar to the Level
Description File. Example:
If the Level Description File is named "Lava.txt"
and located in the Custom level directory, in the Custom Level
Section of the game, "Lava" will appear as an
option. When you
click on Lava it will search for and display a Level
Description Image File named "Lavainfo.jpg".
Once the custom level begins, if the description file
included the entry [map,lava], then the game will load the
lava.jpg and lava.png Level Image & Mask files and begin
to play the custom level.
[req_minlandings,amount]
sets requirement for minimum number of landings
[start,x,y,dx,dy,spr]
sets start location for ship x & y 1-748, dx & dy -511
to 511, spr 0-35. (spr=direction
angle/10 look at sprite file)
[starto,x,y,dx,dy,spr]
sets start location for ship after a death or after Jump Gate
to the level (start command cancels this one) x & y 1-748,
dx & dy -511 to 511, spr 0-35.
(spr=direction angle/10 look at sprite file)
[powerup,number,x,y]
x&y 1-748, r (0-30 may
increase)
[powerup,number,x,y,minlevel,maxlevel]
will only put on map if the difficulty is between minlevel
& maxlevel.
[enemy,type,x,y,skill
level] enemy
type, location, and skill level
type
list:
20's
= saucer (24, for example, is a saucer that shoots
lasers, 20 is a saucer with no weapon)
30's
= glowing orb
40's
= Enemy Flier
50's
= Stationary Invisible Target (can be attached to anything on
the map (for example gun turrets)--use demolish to destroy map
under it, and enemy will die)
60=boss
1 (launches all types of 40's Enemy Flier)
70=boss
2 (launches all types of 20's Enemy Flier)
80=boss
3 (like boss 1 with different look)
[enemy,type,x,y,skill
level,minlevel,maxlevel]
enemy type, location, and skill level
[environment,xmin,ymin,xmax,ymax,speed,type,variable1,variable2]
speed
0-255 (255 means
once every frame, 0 means never)
[exit,xmin,xmax,ymin,ymax,landed]
sets exit location (landed=1 for must be landed in area to
exit level else 0 for unlanded)
[demolish,xmin,ymin,xmax,ymax,type,give,grab,shot,variable1]
[demolish,xmin,ymin,xmax,ymax,type,give,grab,shot,variable1,score,requirement]
sets
location, type, score, etc. for a destroyable part of the map
shot:
number of time you have to hit the spot to make it explode
score:
how much it's worth
give:
how many additional pixels away from the area the explosion
can be and still set the demolition off.
grab:
where the routine grabs the pixels from to create a background
for what's behind the map in the demolition area. (varies from
one type to another)
requirement:
set to 1 to keep track of how many things are blown up for a
level requirement, otherwise 0.
variable1:
reserved at this point
typelist:
1=typical
exploding stuff like in demo
grab
for 1: 1=above,
2=below, 3=left, 4=right
2=put
this where there is land on the upperhalf and air on the lower
half...it will create "dust" when a rocket hits the
ceiling there. You
can see this in the demo in several places.
[req_droplocation,xmin,ymin,xmax,ymax]
describes the area of where powerups must be if you want to
have a requirement of this type.
For example: you want the player to move something to a
different part of the map.
[req_powerup,number,
amount] add a requirement for a specific powerup
[req_powerup,6,2] would mean you want to require there are at
least 2 astronauts
[req_powerupkill,number,amount]
add a requirement that a certain powerup be killed amount
times.
[req_powerupdrop,number,amount]
in conjunction with req_droplocation.
[req_kills,amount]
require a certain number of kills.
[req_demolish,amount]
require a certain number of "demolish"es.
[req_pickupmes,string]
string=30 characters or less. message to say when you haven't
met pickup requirement.
[req_killmes,string]
string=30 characters or less. message to say when you haven't
met kill requirement.
[req_demolishmes,string]
string=30 characters or less. message to say when you haven't
met demolish requirement.
[req_powerupdrop,string]
string=30 characters or less. message to say when you haven't
met powerupdrop requirement.
[req_minlandingsmes,string]
string=30 characters or less. message to say when you haven't
met landings requirement.
[pickupvalue,amount,amount,amount,amount.....30
amounts total] assign values to each powerup for post level
score.
[end]
have this at the end of the file
[multi_powerup,num,x,y,respawn]
powerup type, location, and respawn time in seconds for a
multiplayer game. (50 max)
[multi_spawn,x,y,dx,dy,spr]
start location for multiplayer game (20 max)
In
addition to the main 4 files needed to create a custom level,
the user will also be able to include a custom sprites file
and backdrop file. This will give the level designer the ability to
change virtually all the graphics used in a level, including
the powerups, the ships, the enemies, etc. The
following are the final commands that have been included in
RocketElite:
[multi_demolish,xmin,ymin,xmax,ymax,type,give,grab,shot,variable1]
multiplayer only demolish locations.
[multi_demolish,xmin,ymin,xmax,ymax,type,give,grab,shot,variable1,score,requirement]
sets
location, type, score, etc. for a destroyable part of the map
for multiplayer games.
[req_clean]
requires that all enemies are killed before level can be
completed. (adjust text requirement message with [req_killmes]
[levelencrypted]
the first time you play this map, every character after the [levelencrypted]
command of the info file will be encrypted. This will
protect it from modification. Lines above the [levelencrypted]
line can be added in plain text.
[turbo,turboup,turbodown]
This adjusts the thrust generated by the ships thrusters by a
fraction: turboup/turbodown. For example, to make
the ship have 20% more thrust use [turbo,6,5]
[version,version]
sets the minimum version of the game the level will run
on. [version,110] means that the level will only work on
version 1.10 of the game and above.
[upgrades,fuel,shield,beam,weapon,defense]
resets the ship upgrades to a minimum value of whats
specified, if the ship is already upgraded beyond the
specified values the ship upgrade value will remain unchanged.
[sprites,filename]
will force a new set of sprites for the current level.
[backdrop,
filename] will force a new backdrop for the level as well as
adjust gauge looks.
Stationary
Targets
You
make anything on the map an exploding scorable target. Simply
attach a demolition tag to the area and give a score or
requirement if you want.
Stationary
Enemies
Keep
in mind that you can draw any kind of stationary enemy, such
as a gun turret. Attach any of the stationary invisible
enemies and assign a demolition tag to the area. When
the level is demolished where the stationary enemy is, the
enemy will die.
Custom
Campaigns
Also,
if you want to make a custom campaign and want to hide levels
of the campaign so that the player can't jump directly to that
level simply start the name of the info & description
image file with a dash (-). For example if you had a
level mars.txt. You would name the level -mars.txt to
hide the level and the description image would be -marsinfo.jpg
Developer
Mode
You
can toggle into developer mode while playing the game by
pressing down on the gamepad during play of a custom
level. When you're in developer mode, enemies are
frozen, fuel & shield are maximized, gravity is
non-existent, and the level mask image is shown rather than
the level image. In addition, your absolute ship
coordinates are shown in the upper left part of the
screen. You can freeze your position by holding up on
the gampad. While frozen, the game will report the
absolute location of the stylus. This will help you
locate coordinates for the level description file.
There
are also numbers by the demolition areas. This will help
you locate where in the file there is an error. If the
number is "2" on a problematic demolition area, just
go into the level description file and count starting at 0 the
lines of [demolition], #2 will match up with the label area on
the screen.
Remember
you need to enable Developer Mode from the options screen
before you can enter developer mode during the game.
Custom
Campaign Completion Image
If
you would like to add an "end campaign image" to
your custom campaign, in the text description of the final
level include a [nextlevel,filename], then include a file
named: filenameeg.jpg. The game will load that image
when you complete the final level of the custom campaign
before jumping to the high score entry screen or the main
menu. This was just one final thing added simply to make
your custom campaigns even better ;o) If I can do it at
the end of the single player game, you should be able to have
an end game screen also!
Level
Info Editor
Below
is a link to the executable and Visual Basic 6 source code of
a simple level editor to help people design their
levels. It is not complete, but it does do a good job
simplifying the creation of the info files. I would
encourage people to build on the source and improve it.
Other developers, Curt Tooley is one such developer, are
working on more complete level and campain design
environments.
leveledit.zip
(17kb) (Visual Basic 6 runtime not included)
Level Editor v2.4
(22kb) (Nice work, Brazillian!)Good
luck designing your levels. I would like to encourage
people to help develop this design information as well as
great new levels and campaigns for everyone to play! -Douglas
Beck
|