Respawn Point

From Custom Mario Kart
Jump to navigation Jump to search

A Respawn Point defines an area, where players restart the race after falling down. It is defined in the JGPT section of the KMP.



Introduction

If a player falls down or touch some special KCL types like a fall boundary, it must restart its race at a defined point. Also, if computer drivers can't find a way, they are respawned.

While racing, each driver enters check points defined by KMP/CKPT. Each check point supports an index into the KMP/JGPT table. This table defines list with respawn points. So the last entered check point selects the current respawn point.

12 respawn slots

12 respawn slots

An interesting aspect is: How does the Wii avoid collision conflicts, if 2 or more players are respawned at the same point at same time? The answer is very easy: There are 12 different respawn slots for each by KMP/JGPT defined respawn point.

At the beginning of the race, each player gets an unique ID. Assuming, this ID is in the range 1–12, each player is respawned at his own respawn slot. Respawn slots are defined relative to the defined respawn point using the 3D position vector and the 3D rotation vector of KMP/JGPT.

See the image at the right side: The green big point is the respawn point and the arrow its direction. The slots are placed in 3 rows and 4 columns. The slot positions are relative to the respawn point. The red and blue numbers are the distances in game units related to the black points, which are the mid points of the slots and the cyan rectangles around are the slots itself.

Respawn areas

In real, KMP/JGPT defines not respawn points, but respawn areas related to a point. A respawn area is a rectangle with about 1200*900 game units. To place the area at a slope, define an adequate 3D rotation vector. The respawn slots must be at the same height as the road or higher; up to 200 game units are good and usual.

Tips for placing respawn points

  • Place respawn points around the whole course. Don't assume that it's impossible to fall off at a certain point- this will be proven wrong, and quicker than you would think. Mushrooms, Stars and Bullet Bills can throw you very high and wide. KCL bugs can do the same, as wellthe as KCL holes.
  • Link all respawn points by the KMP/CKPT points.
  • Don't place respawn points near walls or other barriers, because of the respawn areas with 1200*900 units.
  • Make sure that the horizontal direction is set correctly. This is especially important for the CPU racers. If using Wiimms SZS Tools, give the snap feature[1] a try.
  • Never place a respawn point outside the course. If there are unused respawn points, delete them. However, if you absolutely must keep them, set them over the track.
  • It is important that mandatory checkpoints respawn the driver before the checkpoint, so that the driver must enter the check quadrilateral again.

Links

Wiiki
References
  1. Wiimms SZS Tools: KMP/JGPT, @HSNAP-TO-ENPT, @SNAP-TO-ENPT and @SNAP2-TO-ENPT