NiGHTS tutorial (UDMF)

From SRB2 Wiki
Jump to navigation Jump to search
This article or section is incomplete. However, Sphere has requested that this article be untouched until it's completed. Please discuss this article on its talk page.
To do
Take new screenshots/make new images

Welcome to the NiGHTS tutorial for UDMF. 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.

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

The parts of an Axis Point.

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 third argument, labeled Radius. For example, a value of 512 creates a circle with a radius of 512 fracunits. If you are using Ultimate Zone Builder, you will notice that a circle appears around the Axis Point if you set its Radius 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, when the player switches from one Axis Point to another, their orientation should change – 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 flip the orientation of an Axis Point by changing its fourth argument, labeled Direction, from Counterclockwise to Clockwise.

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 allow the player to switch from one Axis Point to the next.

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 allow the player to travel between two Axis Points in a straight line.

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 second argument, labeled Order, of the Things that you placed.

Axis Points

Setting the order for the Axis Points is simple: Give the first Axis Point in your track an Order value of 0, and then increase it by one for each following Axis Point. So the second Axis Point has a value of 1, the third Axis Point has a value of 2, 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 Order value as the Axis Point it transfers the player to. For example, the Axis Transfer that connects the first Axis Point (Order value 0) and second Axis Point (Order value 1) should have a value of 1.

Note that the game will always attempt to transfer the player to the Axis Point that the Axis Transfer shares its Order 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 Order 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 an Order value that is one greater than that of the last Axis Point. For example, if the last Axis Point has a value of 8, the last Axis Transfer should have a value of 9, even though there is no Axis Point with the 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 Order values for Axis Transfer Line are set up slightly differently: If the Axis Point where the Axis Transfer Line starts has a value of n, the Axis Transfer Line Thing that starts the line should have a value of n+1. The Axis Transfer Line Thing that ends the line should have a value of n+2, and the Axis Point it lies on should also have a value of n+2. For example, if the Axis Transfer Line starts at an Axis Point with value 1, the first Axis Transfer Line Thing must have a value of 2, and both the second Axis Transfer Line Thing and the Axis Point the line leads to must have a value of 3.

As you can see, whenever an Axis Transfer Line is used, the Order values of the Axis Points that it connects skip one value. Essentially, the Axis Transfer Line can be interpreted as its own Axis, whose Order 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 value as it. The second Axis Transfer Line Thing transfer the player to the next Axis Point, and therefore should have the same value as it.

If you are using Ultimate Zone Builder, after you have set the 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

File:Nights fullpath.png
The layout of a complete NiGHTS track, including items.

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 first argument, labeled Time Limit, 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 set the fifth argument, labeled Die upon time up? to Yes, 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 spheres in the Ideya Capture to break it, 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 sphere requirement is set by the Ideya Capture's second argument, labeled Required spheres. The typical requirement for a single-mare NiGHTS track is between 50 and 100 spheres, 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 (Thing type 1713) – 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. By default, a hoop has a radius of 96 fracunits, which can be changed through its first argument, labeled Radius.

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. While maintaining a continuous link throughout the entire stage is usually not very important, it is still recommended to 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, while Thing type 611 allows for customizable item circles. In a typical track, both the standalone items and the circles are used. Thing type 600 through Thing type 603 can also be used to place diagonal or vertical rows of rings, while Thing type 610 allows customizable item rows. In general, rows of 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 sphere 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 Ultimate 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 angle 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 angle value controls the horizontal direction that your hoop faces, which is north, south, east, west, or something in-between. In UDMF, these values can both be set through the Thing's basic properties.

By default, a hoop is orientated horizontally and facing north, with both its pitch and angle values set to 0. To help visualize a hoop's orientation based on its pitch and angle values, think of the pitch value as pointing from a hoop's center towards its "top", and the angle value as pointing to its "side". For example, changing a hoop's pitch value to 90 will orientate it vertically, while changing it to 45 will orientate it diagonally. For the angle value, it is recommended to make it point towards where the player's camera will be, as this makes editing the pitch value more intuitive.

In Ultimate Zone Builder, there is an easy way to rotate hoops around an axis. First, place the hoop objects on the axis, for which it is recommended to use Draw Ellipse Mode with the Place Things option enabled in the toolbar. Then, select the hoops, move the cursor over the Axis Point, and use the Point to Cursor action (bound to Shift + L by default). Depending on the way the player traverses through the axis, the hoops can then be rotated 180 degrees so that their angle values face the camera.

NiGHTS development mode

A screenshot of 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 first argument, labeled Mare. The numbering starts at 0, so the Things that make up the first mare have a Mare value of 0, the Things that make up the second mare have a Mare value of 1, and so forth.

Designing multimares

File:Nights multimarestart.png
The starting point of a multimare map. All mares must start at the same point.

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

To do
Mention UZB's Thing filters being capable of distinguishing between each mare track.
  • 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). Usually, a mare's radius is somewhere between 512 and 2048.
File:Nights irregularplacement.gif
An example of "irregular" Axis placement, found near the end of Alpine Paradise Zone Act 2. Note how the first and third Axes are on the 32 fracunit grid, while the second is independent of it. (anigif)
  • 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 MARE1AMARE8A). 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 2.5D 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

To do
Add UDMF sample maps

See also