Level Info
location:
all files in the directory
cfg/levels/...
contains multiple <level> tags on base
<level>
Level info represents a single level in the game.
Example configurations:
<level id="0" type="PHASES">
<phase type="ALL_KILLED">
<moon lengthRange="2-3" startAt="0.2" delay="0" quantity="2"/>
<asteroid lengthRange="2-3" startAt="0.5" delay="3" quantity="3" ttr="5"/>
</phase>
<phase type="ALL_KILLED">
<moon lengthRange="2-3" startAt="0.2" delay="0" quantity="3"/>
<moon lengthRange="2-3" startAt="0.5" delay="3" quantity="3"/>
</phase>
</level>
Attributes:
id
: unique id for the level.
type
: This shows the level progression.We get to know it from the Type enum in LevelInfo, with options PHASES
and AI_ENDLESS
.
possible values for type
:
AI_ENDLESS
: A mode where gameplay continues indefinitely.
PHASES
: A mode divided into phases, each with specific spawn events and end conditions.
Example
<level id="0" type="PHASES">
<!-- phase config goes here -->
</level>
<phase>
phase defines a phase in the level where certain conditions are there asteroids aspawning is set like from where enemy should come , at what speed , quantity etc.
Attributes:
type
: defines how the phase should end
possible values for type
:
BOSS_KILLED
: Ends when the boss is defeated.
ALL_KILLED
: Ends when all enemies are defeated.
TIME
: Ends after a set time.
duration
: for TIME
type, defines how long the phase should run
Inside phase, we define spawn info for obstacles using the tags defined below
Obstacle Spawn Info
Attributes
these attribtues define how the obstacle will be spawned, and are part of each of the obstacle tag below
lengthRange
: size range for asteroid, e.g., "2-3"
method
: Defines how the obstacles will be spawned
possible values for method
:
TIMED
: spawn obstacle after specfied time, if delay
is 3, 1 obstacle will spawn every 3 secondsecond.
ONE_AFTER_ANOTHER
: spawn obstacle only after the previous one is killed
delay
: for TIMED
method, spawn obstacle after x seconds.
<moon>
Specifies the spawning of moon..
Attributes:
quantity
: Number of asteroids to spawn. (optional) if not defined, infinite astroids spawns
startAt
(default: 0.5): value (0 to 1) determining where the spawn should start.
<vulcanianMoom>
same attributes as moon
<cryogenicMoon>
same attributes as moon
<asteroid>
same attributes as moon with addition of following:
ttr
: Time to reach, representing how long the spawn should stay active.
<gargantuanAsteroid>
same attributes as asteroid
<vulcanianAsteroid>
same attributes as asteroid
<cryogenicAsteroid>
same attributes as asteroid