Introduction to Ricochet mapping
This tutorial is work in progress. Any form of contribution is welcome.
This page explains how to make Ricochet maps in the same style as its official maps.
Ricochet being a "simple" game and the official maps being "simple" as well, there won't be very much to say compared to Half-Life: DeathMatch, Counter-Strike and so on.
It is assumed you already know how to create maps for Half-Life or any mod/game running on the same engine (this page won't tell you how to create brushes, how to tie them to entities...)
Keep in mind that nothing prevents you from doing other and unusual things that Ricochet official maps don't have. If you want to use other textures, another sky, a layout or universe that is completely different than Ricochet's official maps, then go ahead.
Editor configuration
Configuring J.A.C.K. (or Hammer) for Ricochet is the same as configuring it for another mod like Counter-Strike or Day of Defeat except with the following key differences:
- The mod folder is
ricochet
(instead of cstrike
, dod
...) - You need a FGD for Half-Life as well as this one for Ricochet. The reason for requiring both is that the latter only includes entities specific to the game (and not "core" ones like info_target which you will be using a lot). Including compilers FGDs is not necessary unless you really need them.
- Likewise, you will need two WADs: the primary being
ricochet.wad
, and the secondary being zhlt.wad
as well. Or you can just use whatever you like.
Map properties
First thing after creating a new map in J.A.C.K. (or Hammer or TrenchBroom) is to setup its properties.
The first key/value pair to set is the name of the sky. If you want to use the same sky as Ricochet official maps, the value to put is
disc
.
The second key/value pair to set is "
No Arena" to either "Yes" if you want to standard game rules (like
rc_deathmatch
and
rc_deathmatch2
) or "No" if you want Arena game rules (like
rc_arena
) to apply. In the case of an Arena map, an extra key/value pair called "
Players per team" must be set as well.
rc_arena
has this to "1". Anything below than one will query the value of the
rc_playersperteam
console variable of the server.
Everything else can be left as is.
Map layout
A Ricochet official map is basically a "hollowed" box with the inner faces having the
SKY texture which contains various gameplay elements like pads, jump arrows, jump pads, bouncers and teleporters.
The maps tends to be symmetrical by nature and having bouncers that block direct disc throws in order to encourage players to take risks to earn extra points by making bouncy shots.
The lighting is basically a
light_environment entity with the color/brightness value of "
250 242 218 200" (beige almost white) and a pitch value of "
-45" with the rest (including angles) by default.
Most GoldSrc level design tutorials and especially optimization ones will tell you that making a giant
SKY box around the map (also known as "skybox") is a terrible idea.
That is true because the compilers (especially VIS and RAD) will be wasting time and effort compiling unnecessary visleaves and lighting data thus causing FPS drops for players.
However, in the case of Ricochet and certain other exceptions like "Xen outdoors" in Half-Life, this is inevitable and you will have no choice but to break that rule.
Pad
Pads are basically the platforms where players can stand on. They are 256x256x16 cylinder brushes with 20 faces.
Textures setup is basically:
- Up and down faces are
disc_blue1/2/3
or disc_red1/2/3
or disc_dual1
for blue, red and dual color respectively. - Sides faces are
trim_blue1
or trim_red1
for blue and red colors respectively. Dual color involves the north-west and south-east being red and north-east and south-west being blue. - Sides faces have a scale of 0.5 in the Y axis.
Now that the geometry is created, you need to place an
info_target entity 8 units above the pad at it's center and give it a name. This will be used later when making jump arrows and jump pads.
Arena mode has an extra visual feature for red and blue pads: they have beams under them. To mimic this, keep reading or skip to the next part if you don't care.
Each pad beam require 2
info_target entities: one right below in the center and the second being 384 units below the latter. Beams are made with the
env_beam point entity and the setup is usually:
- Render FX: Normal
- Brightness: 100
- Beam color:
0 120 255
for blue or 255 0 0
for red - Radius: 255
- Life: 0
- Width: 255
- Noise amount: 20
- Sprite:
sprites/laserbeam.spr
- Texture scroll rate: 35
- Frames per 10 seconds: 0
- Starting frame: 0
- Strike again time: 1
- Damage: 0
- Spawnflags: "Start On" and "Shade End" ticked
Don't forget to reference the starting and ending
info_target entities as well.
Jump arrows
Jump arrows are tied to the pads and allow players to travel from one location to another.
Geometry wise, those are 80x36x16 blocks which you turn into pyramids using the Vertex tool and the top half cut with the Clipping tool. The arrow texture is
+0ARROW1
which you need to rotate in the right direction then press "Fit" and "C" in the texture application window to make everything fit perfectly. Left and right sides uses the
+0SQUARE1
texture with 180° rotation and a simple "Fit" should suffice.
To "glue" the jump arrow on the pad, move it so that the face that act as the bottom of the pyramid shape fits the pad, then cut the "excess" from the pad with the clipping tool in order to remove overlapping geometry.
To make the jump arrow work functionality wise, you need to create a 120x16x8
AAATRIGGER block brush. For the placement, if you look at the arrow like it was pointing to the top, then the new brush must be placed horizontally (you might need to rotate it first depending on the arrow direction) and must cover the top half of the arrow itself.
All you need to do is to turn the new brush into a
trigger_jump brush entity, set the target to a pad's
info_target or a jump pad (covered in the next section) and the height which is the height difference between the two locations (usually 128).
Jump pads
Jump pads are pyramid shapes hanging in the air that help players reaching a pad above their heads.
The geometry is a 112x32x96 pyramid placed 96 units higher than the starting pad. It uses the same
+0ARROW1
texture like jump arrows, the back can be textured with
BLACK
.
You also need to create a 112x32x96
AAATRIGGER block brush placed on top of the pyramid's spike, turn it into a
trigger_jump brush entity and set the same values as you would for a jump arrow. Rotate the entire setup if desired/needed.
Finally, put an
info_target placed near the spike's origin to act as "destination" from the pad's jump arrow. To describe the exact placement, imagine placing any point entity right above the pyramid's spike and the
info_target is placed on top of it and moved twice towards the direction of the starting jump pad.
Bouncers
Bouncers are one of the core components of Ricochet. They make the discs bounce and thus allow players to earn extra points for making ricochets.
You have the freedom to decide the length of bouncers. However, they must be placed 32 units above the pad, 16 units tall and 8 units thick.
Texture setup is
TRIM_YELLOW1
with a Y scale of 0.5 on horizontal sides and
STRIP1A
with a Y scale of 7.5 on vertical sides.
Players should not be able to stand on bouncers. You will need to duplicate the brush, texture all its faces with
AAATRIGGER, make sure it's 8 units tall and turn it into a
trigger_push with a speed value of 100 and the angles pointing in the direction of the void to make the players fall.
Both brushes should be rotated between 10-45°, be careful to not break the textures while doing so.
Teleporters
Author note: to be written.
Returning discs to players
The map's "wall boundaries" (not the "ceiling" neither the "floor") must be covered by
trigger_discreturn brush entities.
Failure to do so will provoke the discs to bounce instead of being returned instantly to the players.
Falling
It's important to have a
trigger_fall brush entity that cover the entire playfield so that players who touch it actually trigger their "falling death". The height does not matter, but it must be 200 units under the lowest pad.
Under no circumstances shall players be able to "bypass" that trigger, Ricochet does not have "falling damage" like Half-Life and players would be stuck at the bottom of your map.
Official maps also have a
func_wall brush entity that cover the entire playfield near the map's "floor" with the
BLUE
texture, render mode to "Solid" and render amount to "255". This is likely a trick to make the illusion of player actually falling in the void.
Player spawns
For player spawns, your map must have at least one
info_player_start, one
info_player_spectator and 6 or 12
info_player_deathmatch for Arena and non-Arena maps respectively.
All of them are placed above a pad (except the
info_player_spectator). Worth mentioning that
rc_deathmatch
uses a "trick" of "stacking" 3
info_player_deathmatch on top of each other since the map has 9 pads.
Power-ups
One
item_powerup point entity for disc power-ups should be enough. You can place a second one if your map is big. Make sure they're not easy to get but not too hard as well. You can't decide which power-ups you want, the game will choose at random.
Side notes
- Assuming your map is in the same style as Ricochet's official ones, you might not need to rely on compilers fancy settings like "precise clipnodes", "extra RAD", "more bounces" and so on.
- When testing your map, you might see a lot of warnings in the console involving TF sprites even if you are not using them. You can ignore those since the official maps also have those warnings too.
- Ricochet's official maps have an
info_ricochet
point entity. However, that entity is only referenced in the FGD and not in the game code. Therefore, you don't need to place one. - They also have the "CD track to play" key/value pair in map's properties set to "1" although Ricochet does not feature music.