Right now you're staring at a blank editor window. It's solid black, except for a green vertical line and
a red horizontal line. There are some words on the sides and bottom. Clicking them expands tabs, but you
don't know what any of them are for. You just want to make a map.

First we'll need some ground for the player to walk on. Press alt+e. This creates an entity - it appeared
right under your mouse, and now it's selected. There's some words floating around it, but don't worry
about them just yet.

Press alt+p. This created a polygon. A polygon can only exist as part of an entity. Since you had an entity
selected, the polygon has been added to it. Creating the polygon automatically selected it. Clicking on an
item selects it, clicking on nothing will select nothing. If multiple objects cover the same space,
clicking in the same spot will cycle through them. If you clicked on nothing and de-selected the polygon,
you probably discovered you couldn't just click on the polygon again to select it. You have to select the
entity that owns it first, then you can select the polygon.

Which the polygon selected, press and hold shift, then left click and drag on the map. This is the translate
tool, and it works for just about everything in the editor. Now click on one of the polygon's verticies. If
you've selected it, it will turn gold. Hold shift and drag the verticies around to reshape the polygon. If
you can't see what you're doing because it's too small, hold ctrl and right drag. This zooms the camera.
Right dragging without holding ctrl pans the camera.

By default, the new polygon was a triangle. To add new verticies, hold ctrl and left click while a vertex
is selected. The vertex will allways be added right after the selected vertex. To delete a vertex, select
it and press delete. (You can delete anything selected that way.) The editor will let you delete all the
points in a polygon, but this can make them somewhat challenging to select, and it might break the game. You
can also select items from the tree view on the 'Entities' tab.

So create a box to be the ground, and position it somewhere below the origin. Notice that if you drag the
entity, all the geometry attached to it moves too. Since this is ground, it should be solid. So we need to
give the entity a physics component. Select the entity, and press alt+c. Expand physics and double click
'Polygon Physics'. The new component is created right on top of the entity, so the first thing you should do
is hold shift and drag the component to the side so you can see it. It will be connected to the entity by a
red line.

With the component selected, expand the properties tab. Set the collision group to world and the type to
static. Now the polygon will be an immovable piece of the world in the game.

If you follow the Map to Game tutorial now and load your map up inside Antioch, all you'll see is the box. Not
that exciting. Lets get a player character in there. The Antioch project is a single player platformer. If you
haven't already configured the editor to use the Antioch project go do that now. (ConfigureEditor) Save your map first! Once the
editor is setup properly, we can use Antioch's custom components and script nodes.

Antioch already includes a map that describes the player object, called (Surprisingly) player.map. All we need
to do is spawn it. So in the editor, press alt+s. Double click AntiochSystem/SpawnPlayer. Your new script node
will be selected automatically. Expand the properties tab, and set 'TemplateName' to 'player', and
'EntityName' to 'player' as well.

Now you just need to make sure that script node gets fired. Select the world entity, the one you attached that
box to. See that green circle, labelled 'OnSpawned'? Hold shift and click-and-drag that circle; a yellow line
should follow the mouse. Drag it over to the SpawnPlayer script node, until it snaps onto the red circle there.
Let the mouse go, and the terminals will be connected.

Now when you load the map in Antioch, when the world entity is spawned, it will fire it's OnSpawned terminal,
which in turn will fire the SpawnPlayer node, which will spawn a player - which you can control!

Last edited Jun 27, 2010 at 12:19 AM by Blecki, version 1


No comments yet.