Where To Go From Here?
Well, what seemed like a pretty daunting task — adding a level editor to your game — turned out to be relatively straightforward job.
While your level editor looks pretty complete, there's still a few things missing. The numerical properties to control the damping of the pineapple and sagginess of the rope can't be set through your editor. One way to implement this is to create a second popup menu with a slider that allows you to set the damping and sagginess properties.
As well, you should probably create a tutorial or help file on how to use all of the controls in your editor. How meta — a tutorial that creates an editor that contains a tutorial! :]
Hopefully this tutorial has helped you with some ideas for creating a level editor in your own game. Just remember to follow the same basic steps in all parts of this tutorial:
- Define a file format
- Write load and save methods for your files
- Run your game with information from the level file
- Create the editor
- Design user interactions
- Display the level
- Add menus for navigation
- Implement object manipulation methods for:
- Creation
- Modification
- Deletion
- Make sure only valid levels can be created
- Improve it!
Here is the sample project with the completed project from the tutorial series.