Skip to content

Level Mapping

Raluca D. Gaina edited this page Feb 12, 2018 · 2 revisions

This page describe the LevelMapping section in the Game Description File. Level Mapping is a list of symbols and the corresponding one or more sprites. The main usage of LevelMapping section is to help VGDL engine to parse the Level Description Files.

The LevelMapping section is written in the following format:

LevelMapping
    symbol_1   >   sprite_1
    symbol_2   >   sprite_2 sprite_3

where symbol_1 and symbol_2 can be any single character while sprite_1, sprite_2, and sprite_3 must be sprite names defined in the SpriteSet section. The number of sprites on the right hand side can be any amount of numbers.

Avatar types must be represented by an uppercase letter. All other non-avatar objects must not use uppercase letters.

Examples:

Here is a LevelMapping section from a game called WaterGame.

LevelMapping
    A > avatar
    w > wall
    x > water
    b > box
    e > exit

The following is from another game called Defem where multiple sprites have a single representing symbol.

LevelMapping
    A > avatar cannon
    r > spawnRandom cannon
    c > spawnChase cannon
    . > cannon

Table of Contents:

Clone this wiki locally