My favorites | Sign in
Logo
                
Search
for
Updated Jun 25, 2009 by torbjorn.maro
Labels: Phase-Implementation
CreatingNewGameLevels  
This page describes how to create or modify game levels.

Introduction

Game levels are stored as embedded resource files in the Snookiepoof.Game assembly. Expand the Levels folder in the project, and you'll find them as text files.

How to create a new level

The level language

The levels are described in a domain specific language, and will be compiled by the game engine when a user asks to start the specific game. Here is a description on how to get started writing levels. For further help, see the existing levels.

Required statements

Each level need a Title. It's normally the same as the name (in the resource file name). Specify the title like this:

Title=The Übercool game level

The level should also have an introduction text that will be displayed when the level starts. Specify the introduction like this:

Intro=This is the introduction.

Locations

The game world consist of locations, and as a minimum you need to provide one location to start in. Specify the location like this:

Location=the office

The name should be as it would appear in the middle of a sentence (lower case if that makes sense). You can also define a longer description for the location by passing an extra argument, like this:

Location=the office|You've entered your nice office. It has a big window to the east. Your computer stands on your desk in the corner.

You also need to set the location where the game should start. This is done with the CurrentLocation statement. You need to have defined the location prior to setting it as the current location.

CurrentLocation=the office


Sign in to add a comment
Hosted by Google Code