Lunar Rescue :: Level Editor
Here is where you get to muck about with your own custom levels!
Installation
This program does not require installation, just click on the link below to launch the editor within your browser. It requires Java 1.6 or newer to be installed.
Basic Editing
When the editor starts, you will be given a very basic level to work with. It has walls. It has a launch pad. What you need to do is make the walls a bit more interesting with bits jutting out to present a challenge to the player, as well as people to rescue. You will be able to add or remove things from the scene to make the level more interesting. These include:
Finish Pads
If one of these is present, then it becomes the target for the level. All the player needs to do is land on the finish pad to complete the level. If other objects exists (such as rescue pads) then interacting with them is optional. If no finish pad exists, then the player must rescue everyone in the level to complete it.
Rescue Pad
Each one of these starts with a rescuee, which is a little space-person strolling from left to right. The player must land on it (at which point the rescuee jumps on board) and return them to the launch pad.
Obstacle
These are static lumps that aren't attached to a wall, and can be any size or position - even overlapping each other. They currently do not move.
Moving Stuff
In order to move something that is already a part of the "scene", just left click and drag. Walls can be moved by left-clicking close to a line to select it, then dragging. The same applies to the end points of lines (ie. vertices). These can be dragged anywhere, even off-screen. If this happens it is still possible to drag one of the adjacent lines back into the screen.
When the mouse is close to an object that can be selected for moving, the object will be highlighted green. If the object is selected and can be dragged, it will be highlighted red. If multiple objects are selected then they will all be highlighted and can be moved together. This can be achieved by holding down the control key when clicking, or left clicking then dragging over the required objects.
Holding down the control key when dragging will cause the cursor to snap to the nearest grid coordinate. This is useful for consistent positioning and spacing.
Adding Stuff
Right-clicking the mouse anywhere in the scene will insert a new object. The type of object inserted depends on the current mode as well as the location you click. The mode toolbar at the top as four buttons:
- Point - Inserts a point between the end points on the nearest line, unless you aren't currently close enough to a line. This applies to the main boundary that you start with, as well as any obstacles created.
- Finish Pad - Inserts a Finish Pad at the cursor.
- Rescue Pad - Inserts a Rescue Pad at the cursor.
- Obstacle - Inserts an Obstacle at the cursor.
The basic level template you start with isn't quite enough to make a working level. You will need to add at least one completion target to the level, such as Finish Pad or Rescue Pad. Each level needs at least one of these.
Deleting Stuff
Almost anything that is highlighted can be deleted by pressing the delete key on the keyboard, include multiple selections. The exception is of course the Launch Pad as you must always have exactly one per level.
The outer boundary must have at least three points. Any attempt to delete the remaining three will be ignored. If you delete enough points from an obstacle so that it has less than three remaining, the remaining points will also be deleted. Obstacles are effectively removed this way.
Play Testing
I haven't yet implemented a way to load your own custom levels into the game, but it is possible to play the level within the editor. This is where the play menu is used. It has the following controls:
- Play - Start the level within the editor.
- Pause/Resume - Pause the game. You can't edit the game in this mode, but can take your time to get a closer look at what's going on, take screen-dumps etc.
- Stop - Finish playing the level and return to editing mode.
Sharing Levels
As mentioned before, there is no way to load these custom levels within the game however you can save them locally and distribute them to others for editing. The file toolbar is used for this.
- New - Create a new level.
- Open - Open an existing level file.
- Save - Save the current level to a file.
Keep in mind that the editor is running within the Java Web Start sandbox environment, and as such does not have permission to read and write files on your local file system until you explicitly grant it access to a file. This is why the file open/save dialogs seem to have extra security warnings. It's just a safeguard to make sure applications such as this don't write anything to your computer without permission from you.