NiGHTS tutorial
Welcome to the NiGHTS tutorial. This tutorial teaches you how to make a NiGHTS map, focusing mostly on the technical aspects of how to make a NiGHTS map.
For advice on how to make your NiGHTS map fun to play, see Level Design 101/NiGHTS.
Also see this video tutorial series by mazmazz.
Components of a NiGHTS map
A NiGHTS map consists of a 3D environment and a 2D track placed inside that environment, which the player flies along. The 2D track consists of the following elements:
- An arrangement of Axis Points which define the layout of the track
- An accompanying arrangement of Axis Transfers placed along the track which controls where the player switches from one Axis Point to another
- An Ideya Drone, which acts as the starting and ending point for the track and is where players transforms into their NiGHTS form
- An arrangement of items placed along the track, including spheres, rings, hoops and power-ups
- An Ideya Capture, which must be destroyed by depositing spheres in order to complete the level
Laying out the 2D track
After creating a basic 3D layout for your map, the next step is to set up the 2D track that the player will fly along. Three different Thing types are used to define the track: Axis Points (Thing type 1700), Axis Transfers (Thing type 1701), and Axis Transfer Lines (Thing type 1702).
Axis Points
Axis Points (Thing type 1700) define the outline of the NiGHTS track. An Axis Point is essentially a circle: the position of the Axis Point Thing defines the center of the circle, and the perimeter of the circle forms the path that the player can fly on. The radius of the circle (in fracunits) is set by the Axis Point Thing's Angle value. For example, an Angle value of 512 creates a circle with a radius of 512 fracunits. If you are using Zone Builder, you will notice that a yellow circle appears around the Axis Point if you set its Angle value; this circle is the path that the player will fly on.
A full NiGHTS track consists of a sequence of Axis Points, where the circle perimeter of each Axis Point intersects with the circle perimeter of the next Axis Point in exactly one point. At this point, the player will switch from one Axis Point to the next, forming a curved path for him to follow. The track ends where the last Axis Point connects with the first, forming a loop.
Inverted Axis Points
By default, the player travels around an Axis Point in counterclockwise orientation. However, as shown in the image to the right, when the player switches from one Axis Point to another, their orientation changes – therefore, both counterclockwise and clockwise Axis Points are needed to form a NiGHTS path. An Axis Point with clockwise orientation is called an inverted Axis Point. You can invert an Axis Point by adding 16384 to its Angle value. For example, an inverted Axis Point with a radius of 512 fracunits needs an Angle value of 16896.
Usually, a NiGHTS track alternates between regular and inverted Axis Points. The only exception to this is if Axis Transfer Lines are involved, which will be discussed later.
Axis Transfers
Axis Transfers (Thing type 1701) tell the game where to switch from one Axis Point to the next. They are placed at the points where the circles of two consecutive Axis Points intersect. Once the player comes across an Axis Transfer Thing, they are transferred to the next Axis Point. Without Axis Transfers, the player would be stuck on the first Axis Point.
NiGHTS development mode demonstrates how Axis Transfers work: The game creates an imaginary line that passes through the current Axis Point and the Axis Transfer that will transfer the player to the next Axis Point. Once the player crosses that line, they are transported to the next Axis Point. Because of this, the Axis Transfer doesn't actually need to be placed exactly on the point where the Axis Points intersect – as long as the intersection point lies on the aforementioned line, the transfer will work correctly.
Usually there's no reason not to place the Axis Transfer directly on the intersection point. However, if the Axis Points intersect at unusual angles, the intersection point might lie outside the 1-fracunit grid, so it won't be possible to place the Axis Transfer directly on the intersection point. In this case, place it as close to the intersection point as possible, and it should still work.
Axis Transfer Lines
Axis Transfer Lines (Thing type 1702) are used to connect two Axis Points whose circles don't intersect. Instead of switching from one Axis Point to the next at the intersection point, the player is transported from one Axis Point to the next in a straight line. An Axis Transfer Line is created by placing two Axis Transfer Line Things: one somewhere on the circle of the first Axis Point and another on the circle of the second Axis Point. The player will then travel on a straight line between these two points.
The Axis Transfer Line Things can be placed anywhere on the circles of the Axis Points, but you should usually place them so that the path transitions smoothly between the circle of the Axis Point and the Axis Transfer Line, and doesn't make a sharp bend.
Defining the track order
After laying out the 2D track with Axis Points and Axis Transfers, the next step is to tell the game in which order the player should fly through the track. This is done with the flags value of the Things that you placed. If you're using Zone Builder, you will see that the "Flags value" box below the checkboxes for the flags changes its name to "Order" when you select an Axis Point, Axis Transfer or Axis Transfer Line. This box is where you must enter the order information.
Axis Points
Setting the order for the Axis Points is simple: Give the first Axis Point in your track a flags value of 1, and then increase it by one for each following Axis Point. So the second Axis Point has a flags value of 2, the third Axis Point has a flags value of 3, and so forth. This continues until the last Axis Point in the track, which should be connected to the first Axis Point, so the track forms a loop.
Axis Transfers
An Axis Transfer should have the same flags value as the Axis Point it transfers the player to. For example, the Axis Transfer that connects Axis Point 1 and Axis Point 2 should have a flags value of 2.
Note that the game will always attempt to transfer the player to the Axis Point that the Axis Transfer shares its flags value with, even if they are not directly connected. This may lead to strange behavior such as the player being teleported to the next Axis Point. If an Axis Transfer is not working even though it is placed correctly, check its flags value and make sure it refers to the right Axis Point.
For the last Axis Transfer of the track, which connects the last Axis Point to the first, use a flags value that is one greater than that of the last Axis Point. For example, if the last Axis Point has a flags value of 8, the last Axis Transfer should have a flags value of 9, even though there is no Axis Point with the flags value 9. When that occurs, the game assumes that the player has reached the end of the track and transfers the player back to the first Axis Point.
Axis Transfer Lines
The flags values for Axis Transfer Line are set up slightly differently: If the Axis Point where the Axis Transfer Line starts has a flags value of n, the Axis Transfer Line Thing that starts the line should have a flags value of n+1. The Axis Transfer Line Thing that ends the line should have a flags value of n+2, and the Axis Point it lies on should also have a flags value of n+2. For example, if the Axis Transfer Line starts at Axis Point 1, the first Axis Transfer Line Thing must have a flags value of 2, and both the second Axis Transfer Line Thing and the Axis Point the line leads to must have a flags value of 3.
As you can see, whenever an Axis Transfer Line is used, the flags values of the Axis Points that it connects skip one value. Essentially, the Axis Transfer Line can be interpreted as its own Axis, whose flags value lies between those of the two Axis Points it connects. The first Axis Transfer Line Thing transfers the player to the Axis Transfer Line, and therefore should have the same flags value as it. The second Axis Transfer Line Thing transfer the player to the next Axis Point, and therefore should have the same flags value as it.
If you are using Zone Builder, after you have set the flags values for the Axis Transfer Line Thing, you should notice that a yellow line is drawn to connect them. This is the path that the player travels on the Axis Transfer Line.
Item placement
Once you have created a track layout that forms a closed loop, the next step is to place items.
Layout of a typical NiGHTS track
Every NiGHTS track starts and ends at the Ideya Drone (Thing type 1703). It needs to be placed somewhere on the track of the first Axis Point. The Ideya Drone itself is invisible most of the time; it only displays a bouncing Super Sonic sprite before the player has transformed, as well as a goal sign once the Ideya Capture has been broken. To make it easier for the player to find, you should build some sort of sector-based structure around it.
The Ideya Drone's Angle value is used to set the time requirement of the NiGHTS tracks, in seconds. If you leave it at 0, it will default to 120 seconds (2 minutes). If you check the Ambush flag on the Ideya Drone, the player will automatically die if they run out of time on the track instead of switching back to regular 3D gameplay. This is useful in levels without a playable 3D environment, like SRB2's Special Stages.
In addition to the Ideya Drone, you also need to place a Player 1 Start where the player spawns. If your levels has a playable 3D environment, you can place it anywhere on the map, although it should probably be fairly close to the Ideya Drone. If you want the player to transform into Super Sonic right away, place the start directly on top of the Ideya Drone.
Another essential object that needs to be placed is the Ideya Capture (Thing type 1710). The goal of the stage is to deposit enough rings in the Ideya Capture to break it and then return to the Ideya Drone to end the level. The Ideya Capture is typically placed somewhere in the second half of the track, not too far from the Ideya Drone, but still with a bit of track left. The ring requirement is set by the Ideya Capture's Angle value. The typical requirement for a single-mare NiGHTS track is 80 rings, but feel free to use whatever requirement you want.
On the rest of the track you should place collectible items. There are three types of items:
- Blue spheres (Thing type 1706) – These are needed to destroy the Ideya Capture. At the end of the stage, the player also gets an additional score bonus for every sphere carried back to the Ideya Drone.
- Rings (Thing type 300) – Unlike spheres, rings do not count towards the sphere requirement. In a typical NiGHTS track, spheres and rings will be present in about equal amounts.
- Hoops – By flying through hoops, the player can replenish their Drill Dash meter. They are also useful for guiding the vertical direction of the track, telling the player where to move. There are two Thing types for hoops: Thing type 1705 creates a hoop with a fixed radius of 96 fracunits. With Thing type 1713, the radius can be configured through the flags value.
All three item types also give the player between 10 and 100 points when collected; the exact number of points depends on the player's link, which is a counter that indicates how many consecutive items the player has collected. If the pause between two items is too long, the link is reset to 0. The key to getting a high score in NiGHTS is to maintain a continuous link throughout the entire stage, so you should place your items in a way that makes that possible.
In addition to the standalone items for spheres and rings, they can also be placed as parts of circles. Thing type 604 through Thing type 609 are used to place ready-made circles of various sizes and item constellations. In a typical track, both the standalone items and the circles are used. Rows of individual items are useful to guide the player through the track, whereas circles should be placed in areas where the path is clear.
On top of the regular items, there are also five types of NiGHTS power-ups. These are typically placed in the center of a circle of spheres and/or rings. The power-up will be invisible at first, but once a player performs a paraloop around the circle, the power-up will appear. If the Ambush flag is checked, it will appear right away. If the Special flag is checked, the power-up item will only appear if the player has already destroyed the Ideya Capture and is in bonus time. The following power-ups are available:
- Super Paraloop (Thing type 1707) – Temporarily doubles the radius in which items are attracted after performing a paraloop.
- Drill Refill (Thing type 1708) – Refills the player's Drill Dash meter.
- Nightopian Helper (Thing type 1709) – Temporarily increases the radius in which items are attracted while flying through the track normally.
- Extra Time (Thing type 1711) – Adds 30 seconds to the track's time requirement.
- Link Freeze (Thing type 1712) – Temporarily preserves the player's link, even when not collecting items.
Another object that is used on NiGHTS tracks is the NiGHTS Bumper (Thing type 1704). When the player flies into a bumper, it will propel them into the direction it is facing. Bumpers are useful for guiding the layout of the track and for giving the player occasional speed boosts.
The typical gameplay of a NiGHTS track is as follows: In the section before the Ideya Capture, the focus is on getting enough spheres to break the Ideya Capture. You should usually provide slightly, but not excessively more spheres than necessary for the sohere requirement, to make the player work for it. After destroying the Ideya Capture, the player is in bonus time, where the score for each collected item is doubled. In this phase, the focus is on getting as many points as possible. The level ends when the player touches the Ideya Drone again. If the player flies over it instead, all items except power-ups will respawn, allowing the player to complete another lap around the track and collect more points.
Technical advice
All items must be placed as close as possible to the curved NiGHTS track so that the player can collect them. This will be difficult when working on a typical 32- or 64-fracunit grid in the map editor, but there are several ways to accommodate these conditions.
In Zone Builder, you can set the grid size in the status bar at the bottom of the screen, next to the zoom settings. For optimal control, switch to a 1-fracunit grid. The track will only occasionally line up exactly with the grid, but as long as you place items within 1 fracunit of the track, Super Sonic will be able to collect them. If you want to keep a larger grid but still place items, you can also switch off the "Snap to Grid" option in the toolbar. This will allow you to place items anywhere, independent of the grid. Right next to the "Snap to Grid" option is the "Dynamic Grid Size" option. When enabled, the size of the grid will automatically adjust itself according to your current zoom level. This way, you can work on a small grid while zoomed in, but automatically switch back to a larger grid while zoomed out.
To get a feeling for the vertical positions of the items in your track, you can switch to 3D mode. You can easily adjust the height of any Thing by pointing towards it with your cursor and then using the mouse wheel to move it up or down.
Placing hoops
There are two values that control the angle of a hoop: the pitch value and the yaw value. The pitch value controls the vertical angle of the hoop. It can be completely horizontal, completely vertical, or some diagonal combination of the two. The yaw values controls the horizontal direction that your hoop faces, which is north, south, east, west, or something in-between. The pitch value is a number between 0 and 255. The yaw value is calculated in multiples of 256 and can span a range of -32768 to 32512. To set the angle of the hoop, add both values together and set them as the Angle value of your hoop. Below are a few example values for pitch and yaw:
Pitch value | Direction |
---|---|
0 | Forward |
32 | Diagonally up |
64 | Up/down |
224 | Diagonally down |
Yaw value | Direction |
---|---|
-32768 | South |
-24576 | Southeast |
-16384 | East |
-8192 | Northeast |
0 | North |
8192 | Northwest |
16384 | West |
24576 | Southwest |
The following are a few examples of common hoop types and the Angle values needed to place them:
- Completely vertical hoops – These are the easiest to place, since the yaw value is irrelevant. The pitch value should be 64, so simply use 64 as the Angle value and the hoop will be completely vertical.
- Completely horizontal hoops – The pitch value for these should be 0, but now you need to set the yaw value as well. For a hoop that faces south, for example, use an Angle value of -32768. For a hoop that faces northeast, use an Angle value of -8192.
- Diagonal hoops – For these hoops, you will need to set both a pitch value and a yaw value. For example, for a hoop that goes diagonally upwards and faces west, the pitch value will be 32 and the yaw value will be 16384, so the resulting Angle value will be 16416.
NiGHTS development mode
While flying around the track, NiGHTS sports a special function when devmode 32
is enabled: It provides a visual cue – a Rail Ring shot, essentially – of where the next Axis Transfer of the track is located in relationship to the Axis Point that the player is currently on. Once the player touches the Rail Ring shot, they will be transferred to the next Axis Point and the game will print "Transfer!" in the center of the screen. The number of the current Axis Transfer and the Axis Point is being transferred to is printed in the console.
NiGHTS development is useful for checking if your track is laid out correctly. If an Axis Transfer has the wrong number or isn't lined up correctly with the Axis Points it connects, the player won't be able to touch the Rail Ring shot and transfer to the next Axis Point. By making the Axis Transfers visible, NiGHTS development mode allows you to identify problems more easily. Note that the player actually gets hurt by the Rail Ring shots, so you should enable god
mode to allow for fluid movement through the track.
Multimares
While SRB2's Special Stages all have only a single track, SRB2 also supports a multimare setup, where there are multiple tracks with their own Ideya Captures in the same map. The individual tracks are called mares. The player goes through the mares in order, so after finishing the first mare and touching the Ideya Drone again, they are transferred to the second mare, and so forth. This is the setup used in the original NiGHTS into Dreams, where each level had four mares. In SRB2, it is used by Dream Hill Zone and Alpine Paradise Zone Act 2. Up to 8 mares are supported in a map.
Setting up multimares
All mares must start and end at the same Ideya Drone, but in between their tracks can differ and each mare has its own Ideya Capture. The first mare is set up just as described above. For the additional mares, the setup is slightly different: The mare number for an Axis Point, Axis Transfer, Axis Transfer Line or Ideya Capture is determined by the Thing's Parameter value. The numbering starts at 0, so Things on the first mare have a Parameter value of 0, Things on the second mare have a Parameter value of 1, and so forth.
Zone Builder provides a separate field next to the Thing type number where you can specify the Parameter value. In older map editors, such as SRB2 Doom Builder, you have to multiply the Parameter value by 4096 and add it to the Thing type number. For example, an Axis Point for the first mare has the Thing type 1700, while an Axis Point for the second mare has the Thing type 5796 and an Axis Point for the third mare has the Thing type 9892. The configuration file for SRB2DB list the Thing types for each mare separately, so you don't need to calculate the values yourself and can simply pick them from the Thing type list.
A list of values to use for each mare is below:
Mare # Parameter Axis Point Axis Transfer Axis Transfer Line Ideya Capture 1 0 1700 1701 1702 1710 2 1 5796 5797 5798 5806 3 2 9892 9893 9894 9902 4 3 13988 13989 13990 13998 5 4 18084 18085 18086 18094 6 5 22180 22181 22182 22190 7 6 26276 26277 26278 26286 8 7 30372 30373 30374 30382
Designing multimares
Since the individual mares in a multimare map are typically shorter than a full single-mare track, the sphere requirements for each mare should be lower. In SRB2's official multi-mare levels, each mare requires 20 spheres to destroy. The mares don't have to be equally long or have the same sphere requirements, however.
Keep in mind that all mares have to start and end at the same Ideya Drone. This is where the player switches from one mare to the next. Make sure that the Ideya Drone is easy to see so that the player doesn't accidentally fly over it and does another lap on the same mare as before.
When designing a multimare map, you may run into situations where Axis Points of different mares need to overlap. This is especially common at the Ideya Drone. Overlapping Axis Points are perfectly fine, but they will obscure each other in the map editor, so keep in mind that some parts of the track might not be visible in the 2D view.
Other tips
- It's perfectly acceptable for Axis Points to deliberately overlap, even in single-mare levels. There is actually a design limitation put in place: Only half of an Axis Point can be used until the game expects an Axis Transfer. If there is no Axis Transfer by the end of the circle half, the player gets stuck. To bypass this limitation – for example, to make the player revolve around a circle completely – you can place a second Axis Point at the same position, put an Axis Transfer at the halfway mark of the circle, and then set it to transfer the player to the second Axis Point. This approach is used in the flamethrower room of Magma Caves Zone, for example, to allow the player to complete a full circle around the room.
- Axis Points don't all have to have a 512 fracunit radius, contrary to what the example maps may suggest. They can be of any radius up to, theoretically, 16383 (although an Axis this big will be glitchy). The most common sizes are 512, 1024, and 2048.
- Axis Points don't have to intersect strictly at the 90° points. As long as the circles touch, they can intersect anywhere. Alpine Paradise Zone Act 2 makes heavy use of this fact and features many Axis Points that intersect in "irregular" places. However, when doing this, you must be very careful to make sure that the Axis Points actually intersect and that the player will actually cross the invisible wall created by the Axis Transfer (as shown in NiGHTS development mode) that leads to the next Axis Point. This can be verified by zooming into the map very closely, even as much as 2000–4000%. Also, it's useful to have the first and last Axis Point of such an irregular arrangement both on the standard grid of the map, so that the layout for the rest of the track will remain easy to place.
- Interesting effects can be made by triggering linedef executors with the Trigger Linedef Executor (NiGHTS Mare) sector special, especially when used in a multimare map. A notable example is being able to use the mare indicator signs (wall textures
MARE1A
–MARE8A
). Once an Ideya Capture is destroyed, the game assumes to be "in the next mare" (though it actually transfers to the real mare once the Ideya Drone is touched); therefore, it's best to place the triggering sector near the Ideya Drone, so that the indicator signs don't change too early.
- The player cannot drown in NiGHTS levels. This makes large underwater sections possible, like in Flooded Cove Zone.
- The 3D movement part of the gameplay has its importance in addition to the 2D flying gameplay. Environments should accommodate players who are exploring the map in 3D, for example by providing springs to make areas accessible as Sonic. It is often a good idea to make it possible (though not necessarily easy) for players to collect the rings required to destroy the Ideya Capture solely in 3D movement. Dream Hill Zone and Alpine Paradise Zone both allow for this possibility.
Samples
Sample 1
- Example file: example_nights-path.wad (MAP01)
- An example of a single-mare NiGHTS track.
- Play this map in Single Player mode.
How to use |
---|
|
Sample 2
- Example file: example_nights-multimare.wad (MAP01)
- A simple example of a multimare NiGHTS map.
- Play this map in Single Player mode.
How to use |
---|
|