Level editing

From Elma Wiki
Jump to navigation Jump to search

Using the editor

A screenshot of the editor

This is what the buttons in the left-side menu does, some of them are obvious:

  • Exit - Exits the editor and returns to Elma.
  • New - Closes current level and resets the contents of the editor.
  • Open - Opens another level.
  • Save As - Save the level with a new name.
  • Save - Save the level.
  • Save and Play - Save the level and test it. Also checks the topology (see below).
  • Check Topology - Checks if there's any errors in the level. Possible errors are:
    • Two lines (of non-grass polygon(s)) are intersecting eachother.
    • The start or exit objects are in the ground.
  • Properties - Set the level properties:
    • Foreground texture
    • Background texture
    • Level Name
    • LGR File - Which set of graphics to use for the current level.
  • Zoom Out - Zooms out a bit to show more of the level.
  • View Options - Choose what to display in the level:
    • View Polygons
    • View Grass
    • View Pictures
  • Help - Displays some basic help.
  • Move - Move a vertex, start, exit, apple, killer or picture.
  • Zoom In - Lets you draw a rectangle over the part you want to zoom in on.
  • Create Vertex - Start drawing a polygon, or add to an existing one.
  • Delete Vertex - Delete a point of a polygon.
  • Delete polygon - Delete an entire polygon. Be careful with this!
  • Create Food - Place an apple in the level.
  • Create Killer - Place a killer object in the level.
  • Delete Object - Delete apples or killers.
  • Create Picture - Place a picture or texture element in the level.
  • Delete Picture - Delete a picture or texture element.

Making grass

When you have drawn the polygon that should have grass on it, draw a new polygon under the edge of the first polygon in the shape you want the grass to have, like this:

Making grass.gif

In this case the shape of the grass polygon follows the shape of the normal polygon, which is the most common way to do it.

What has been drawn in the image is all you should draw, it's a common beginner mistake to also draw above the original polygon. The editor draws the grass texture between the lines of the grass polygon and the normal polygon, and draws the tiny "edges" of the grass under the grass polygon's lines. There is one exception though; nothing is drawn around the longest line (in the horizontal direction) of the grass polygon.

This means that if you draw parts of the grass polygon above the normal polygon, Elma will put grass there too if there's any ground nearby. And the longest line might be one of the lines in the ground where you wanted the grass, but since it's the longest line Elma will ignore it and not put any grass there.

When you have drawn the grass polygon properly, turn it into grass by clicking the "Move" button and then right-clicking any point on the grass polygon. Then you will get a dialog where you can choose "Grass polygon". Done!

Changing gravity

Gravity is made by modifying apples (food). Select "Move" and right-click on an apple. Now you get a menu where you can choose the direction of the gravity the apple should set.

The "Food anim number" option doesn't change the gravity, it just sets which angle the apple has.