IntroductionGame 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- Create a new text file in the Levels directory. The name of the file will be used as the name of the level (visible to the user). Replace spaces with underscores, and give it a .txt extension.
- Set the Build Action of the file to Embedded Resource.
The level languageThe 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 statementsEach 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. LocationsThe 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
|