Level Design

The Level Design in Chaos Projectile is heavily influenced by classic video games like the Metroid series by Nintendo. Unlike the 2D-adventures of Samus Aran, the screen in Chaos Projectile is fixed on the main character. This way she will always stay in the center of the screen.

WIP_Screenshot2

Though the source code is rendering the level and is calculating the collision of the main character with the platforms, since the graphics are tile-based, we use the external Map Editor Tiled. This software has all the features we need for conveniently setting up the levels. The .tmx-file for example can store several layers in which we can place foreground and background graphics. These layers than get interpreted by the source code, which renders the graphics accordingly. Have a look at the file over at gitHub. We use the following layers

    characters
    decoration front
    decoration behind
    walls
    bg

As you can probably guess, the layers decoration front, decoration behind and bg hold all the tiles which get rendered before or after the main character. Also there is no collision detection with these layers. That all happens on the layer walls. Thats where all the tiles belong with which the main character is supposed to collide. The layer characters just for defining the posistion of enemies, heal pots etc. and is invisible in the editor.

The spritesheets are larger than initially necessary. This way we can add more tiles into the spritesheet later without messing up the editor-file.

Also, some of the tiles have properties. With these properties the source code can interpret the max HP of the main character. This way, i can change these and similar stats without the need to open and alter the source code itself.

Tiled_kacheleigenschaften

Please hop over to gitHub and have a look into all the work-files yourself!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s