Resource icon

The Starters Guide to Axis2D get three dimensional

Hey kids :threat:

In case you aren't somehow aware, my entry for the OLDC: Ante-Station Zone, takes advantage of a neat lua for its central gimmick.

Said lua is called "Axis2D" and it's a resource that allows 2d mode to free itself from the boundaries of a single line and go all over place klonoa-style.

This guide will teach you how to map for axis2d, and take advantage of all its wonderful features.

Just some disclaimers before we start:
We're going to assume you already know how to use Zone Builder and make a map.
We're also going to assume you know how to make and use Linedef Executors.

If you don't know how to map for SRB2, you should start here
On top of that, linedef executors are integral when it comes to mapping for axis2d, if you don't know how to use them, you really should.

Also, download axis2D if you haven't already. It's a part of Varren's github that also has a few other luas and resources and stuff for mappers.

Finally, Axis2D for 2.2 is a little different from Axis2D for 2.1, Axis2D for 2.2 keeps all of the legacy functions around for backwards compatibility with older axis2d maps, we won't be talking about them nor how to set them up in this guide.

anyway, enough of the preamble, let's get started :welcometoreleases:


After you've downloaded said lua, putting it in your stage is as simple as drag n dropping the lua into your pk3 (or wad) of choice!


Make sure its either within a seperately loaded pk3, or within the map wad itself, so you don't have to add it everytime you wanna test the stage.

Now it's time to get into the basics.

Axis2D primarily restricts the player to a track, with a camera pointed at the player with a distance of 448mu (camera also no-clips, so keep that in mind when making axis2d stages).

Said track is made up of two types of elements. Lines, and Axes.

They're self-explanatory.
Lines are, well, lines.
and Axes are circles.
Sound simple? Good. Let's learn how to set them up.


Let's start by making a little area to let the player run around in.

We'll use this small area as an example

Sonic must go from his starting position to the signpost by just holding right, with normal 2d mode, this is impossible, but with axis2d, this is very possible.

Let's start by setting up a line.
We can do this, by setting up a linedef executor.
The trigger linedef can be either "Each Time" or "Continuous", and the trigger sector must have "Trigger Linedef Ex. (Anywhere in Sector)".


For the linedef executor in question, we're gonna use Call Lua Function (Linedef Type 443). This will be the main linedef that controls the attributes of said Line a/or Axis.

The tag should be the order number the line or axis will have.
"Order number?" Basically, lines and axes uses an ordering system seperate from tags. Kinda like a polyobject ID!
Okay so put that in, and if there any textures on the linedef, get rid of them (important!), and put "P_AXIS2D" as the Upper Front Texture.
After that there are some attributes we can edit by checking some flags, but we'll get into those later.

Now that we got the linedef executor set up, we can get the actual line into the game.

Go ahead and place an Axis Transfer Line (Thing Type 1702) into the stage.
The Angle will determine where the line will go; aka where "right" is. Make sure to place it to the far-left camera-wise, where the player cannot feasibly a/or theoretically reach it, or else some jank sliding will occur.
The Flags Value will determine its order number, labeled for your convenience.~

When all that is said and done, save and playtest the map, and you should be in 2D, exactly as intended.

Now with that out of the way, we now need to make Sonic turn the corner and run straight towards the goal.


To continue where we left off, we're gonna repeat everything we did in step 1, except change the tag and order number for obvious reasons.

Now, we gonna make an axis.

Start off by placing, well, an Axis (Thing Type 1700).

The Flags Value is the same as before.
The Angle determines how big the circle will be.

As you can see, Zone Builder is helpful and will draw a yellow circle to help us out.
Keep in mind Sonic will run directly on the yellow line shown, so raise the size of said circle appropiately; Make it seamless!

After running around said circle, we now need to get Sonic back on a line.
Repeat everything from step 1 a-- You're obviously not gonna do this every time, so you can just copy paste the control sector housing the linedef executors as well as the various things n shit and change their tags appropiately.

If you did everything right then:


holy shit i cant believe its not 3d :wow:

(If you didn't get any of what i explained above, there's an example wad attached here as well as some more example stuff over on github. Hell, I'll give you permission to dissect my oldc entry to see how it ticks, on the condition that you don't repackage, port, or edit my map in any way, and if I find out you did so anyways, then say goodbye to your fucking kneecaps)


Keep in mind Zone Builder may make other yellow lines that don't seem to make much sense.
Don't worry about it, Zone Builder is just confused that you aren't using Axis Transfer Lines the way the game typically intends them to be used, which is in NiGHTs mode.


Anyways, like I said earlier, the Axis2D "Call Lua Function - Linedef Type 443" linedef has some flags. Let's go over them as reference.

SLOPE SKEW (E1): Determines the camera distance from the player via the front floor sector's height. (Default: 448mu)

NO MIDTEXTURE SKEW (E2): Determines the height of the camera relative to the player via the back floor sector's height. (Default: 0)

PEG MIDTEXTURE (E3): Determines the horizontal angle of the camera via the front texture x offset.
NOT CLIMBABLE: If this is checked the angle is absolute, otherwise said angle is relative to the player.

SOLID MIDTEXTURE (E4): Determines the vertical angle of the camera relative to the player via the front texture y offset; Negative numbers meaning the camera will aim down, Positive numbers meaning the camera will aim up.

Now for disclaimers!
At the time of this writing: Dashmode does not work with axis2d and Custom characters won't have the best results on axis2d either.

Axis2D should never be on at the same time as normal 2D.
You can turn off Axis2D by giving the lua linedef tag 0.

You can change the axis in mid-air by tagging the linedef executor to the control sector of an invisible, intangible FOF.

aaaaaaaaaaaaaand that is about it.

Nothing much else to say other than.

Axis2D is based
Go make axis2d level if you want to,
aaaaaaaaaand don't fuckin steal my level unless you want a solid kick to the shins; reusing assets are aight tho.

That finishes up
  • 1624080902905.png
    38.5 KB · Views: 171
  • 1624080912768.png
    38.5 KB · Views: 155
  • 1624080985028.png
    38.5 KB · Views: 185
Extension type
File size
8.1 KB
MD5 Hash
First release
Last update
4.50 star(s) 2 ratings

More resources from Twins'R'Okay

Share this resource

Latest reviews

This is a great guide teaching the designer how to use Axis-2D correctly in Zone Builder. I would say to watch it with the swears though, 10/10.
Upvote 0
Welcome to releases!
Upvote 0