mapping guide - jotalanusse/sledbuild-remastered GitHub Wiki

Introduction

Welcome to the mapping guide for SBR, here you will learn all the necessary things for creating a compatible map that works correctly with SledBuild Remastered!

This guide is intended for people who already have some basic knowledge on how to create maps, and want to create a map for SBR. This guide won't cover the basics of mapping, so if you are new to mapping I recommend you to start from the beginning and learn the basics.

For this guide I will be using Hammer++ as it is my editor of choice, but you can use any editor you want as long as it supports the Source 2013 SDK. All editor screenshots will be taken from Hammer++.

SledBuild Remastered or SBR for short, will filter all the maps that start with sbr_ while selecting maps in the main menu, so I highly recommend that your map starts with that prefix so players can find SBR compatible maps easily. Now the first thing you need to do is to create a new map and name it sbr_your_map_name_here.

You can design your map however you want, SBR just requires a few things in order to work correctly. So let's get started!


Overview

Creating a map for SBR is quite simple, here's a list of all the things you will need to know while making your map:

Concepts are some things that are good to know before starting to map, they just explain how a couple of things work in SBR. They are pretty straight forward, so I won't go into much detail with them.

Concepts:

  • Teams
  • Stages

Items are the things that you will need to place in your map, they are the things that make SBR work. They can be either an entity or a brush tied to an entity (if you are unfamiliar with either of these terms, I recommend you to read the Valve Developer Wiki). But for grouping and simplicity I will be referring to them as items.

Items:

  • Starting zones
  • Finish zones
  • Gates
  • Pushers
  • Spawns
  • Lua run (optional)

Because of how Hammer works, some map items are referenced by their class in the SBR code, while others are referenced by their name. As a general rule, zones are referenced by class, the rest are referenced by name. This is not important to you, but it will make some configurations different from the others, so you just have to keep that in mind.

On each section you will find a table with all the necessary information for each item and any extra information that you will need, also there is a detailed explanation of how to use them and what do they do. That table will look like this:

  • Item: The name of the item, this is purely for reference.
  • Type: The type of item, can be an entity or a brush tied to an entity (Brush TTE for short).
  • Class: This will tell you what class the item must have.
  • Name: This will tell you what name the item must have.
  • Identified by: This will tell you if the item is referenced by name or class (not important).
  • Texture: This is a recommended texture for the item, in case that it is a brush.

Each item will also have a 3D editor view screenshot taken from the example map sbr_example.

Below you will find a 2D example map and a 3D editor view example screenshot of how items are supposed to be placed in your map, this is just for reference, you can place them however you want as long as they follow the intended functionality of each item. Use these examples while reading the guide to understand the role of each item better.

2D example map (seen from the side):

2D example map (seen from the side)

3D editor view example map:

3D editor view example map


Teams

In SBR there are two teams: The building team, and the racing team. Each team determines what players can and cannot do.

Builders:

  • They can spawn props/vehicles to create their sled.
  • They shouldn't be able to step into the racing track.

Racers:

  • They cannot spawn props/vehicles.
  • They are allowed into the racing track when the race starts.

Entering or leaving certain sections of the map (zones) will determine what team a player is in, this is very important because it's a basic gameplay flow that must be standardized.


Stages

The stages are the different states the SBR gamemode can be in, they determine what happens, and they control the map. As for now, there are only 3 stages:

  • Waiting: Nothing happens, the round is about to start.
  • Starting: The race is starting, gates are opened and players are let through.
  • Racing: Gates now close, the race is now on course.

Once started these stages constantly repeat the same pattern that we call rounds:

Waiting -> Starting -> Racing -> Waiting -> ...

Stages dictate what happens through the map, and they determine what players can and cannot do. For example, in the waiting stage players can't get into the racing track because the gates are closed, but in the starting stage the gates are opened and players can start racing.


Starting zones

The start zone (or starting zones), is where players must be in order to participate in the upcoming race, you can have as many starting zones as you like, and there must always be at least one.

Item Type Class Name Identified by Texture
Start Zone Brush TTE sbr_start_zone - Class trigger

3D editor view example:

3D editor view example of a starting zone

Every time a player enters a starting zone, they will be put in the racing team, and every time they leave, they will be put in the building team.

Once the race starts, all players inside a starting zone will be considered part of the race, and they will be allowed into the racing track during the starting stage.

While in a starting zone during the starting stage:

  • Players riding a sled will be part of the race.
  • Players without a sled will die.
  • Racers are not allowed to exit the start zone without a sled.
  • Builders are not allowed to enter the start zone.

Tips:

  • Starting zones also filters players that have no sled when the gates are opened, so make sure that players have to cross the start zone in order to step into the racing track (leave no gaps), otherwise you could end up with builders in the racing track.
  • Make it clear where each starting zone is (visual indicators), players must know they are inside of it.
  • Make starting zones big enough for players to fit themselves and their sleds.

Finish zones

The finish zone (or finish zones), is what players must touch in order to finish the race, you can have multiple finish zones, and there must be at least one.

Item Type Class Name Identified by Texture
Finish Zone Brush TTE sbr_finish_zone - Class trigger

3D editor view example:

3D editor view example of a finish zone

When a player that is racing touches a finish zone, they will finish the race. Soon after, they will be teleported back to spawn. Empty sleds that touch the finish zone will also be teleported back to spawn, to be retrieved by their respective owners.

When touching a finish zone:

  • Racing players will finish the race and be teleported to spawn.
  • Players without a sled will die (you can't finish without a sled).
  • Empty sleds will be teleported to spawn.

Tips:

  • The only way to finish the race is for the player to touch a finish zone while riding their sled. Make sure they can't miss it.
  • Make it clear where each finish zone is (visual indicators), it helps people trying to set a record time/speedrun a map.
  • Make finish zones big enough for players to fit while inside their sleds. Otherwise they won't be able to finish the race.

Gates

Gates are the physical barriers that keep the players from going into the racing track when they are not supposed to, you can have as many gates as you want, and you must have at least one.

Item Type Class Name Identified by Texture
Gate Brush TTE func_brush sbr_gate Name -

3D editor view example:

3D editor view example of a gate

Gates are only open during the starting stage, then they are closed during the whole duration of the race, and during the waiting time after it.

Tips:

  • Gates are the one of the barriers that prevent players from stepping on to the racing track when they are not supposed to, make sure that players can't get past/clip through it.
  • Make the gates big enough for a sled to fit through.

Pushers

Just as the name suggests, pushers push the sleds forward once the race starts, this is necessary to give racers that little help to get moving and into the racing track (otherwise they would just stay still at the starting zones). You can have as many pushers as you want, but you must have at least one.

Item Type Class Name Identified by Texture
Pusher Brush TTE trigger_push sbr_pusher Name trigger

3D editor view example:

3D editor view example of a pusher

Pushers are only enabled during the starting stage. Then they are turned off.

Flags: For pushers to interact with sleds, they must have certain flags enabled in the flags tab of the entity properties. The flags that must be enabled are:

  • Pushables
  • Physics Objects
  • Physics Debris

Tips:

  • By default, trigger push entities are enabled. Make sure to disable them in the editor so they don't spawn turned on.
  • Make sure that your pushers apply enough force to get the sleds moving.
  • Make your pushers cover all the starting zones. Otherwise players could get stuck in the start zones and not be able to slide into the racing track.
  • A good practice is to overlap the pushers with the start zones, so that players can't get stuck in the starting zone.

Spawns

Spawns are the places where players will be teleported when finishing the race, or when the race ends. You can have as many spawns as you want, and must have at least one. Though I recommend having a minimum of 6 to 8 spawns so players don't get crammed into a single spawn when finishing the race at the same time.

Item Type Class Name Identified by Texture
Spawn Entity info_target sbr_spawn Name -

3D editor view example:

3D editor view example of a spawn

Spawns have a very interesting optional feature. Usually spawns are named sbr_spawn and the gamemode doesn't differentiate between them, when it's time to teleport a player it will just choose one at random and that's it. But if you want, you can add up to 3 specific spawns to your map. These spawns are called sbr_spawn_1, sbr_spawn_2 and sbr_spawn_3 (you can use some, all, or none). And if present they will be used to teleport the podium finishers of the current race. So the 1st player will go to sbr_spawn_1, the 2nd to sbr_spawn_2 and so on. This is intended to allow you to give your map more interesting spawns.

Tips:

  • Make sure to have enough spawns so sleds don't end up all in the same one when finishing the race.
  • Make use of the specific spawns to give your map a more polished look.
  • Remember that specific spawns are optional, you don't have to use them. And they don't replace the random spawns, they are used in addition to them.

Lua run (optional)

Lua run is a special entity that allows you to run Lua code from within the map. This is useful for customizing the map and adding extra features. And in our case, we are going to use it to modify the round duration of the map.

Item Type Class Name Identified by Texture
Lua run Entity lua_run - - -

SBR uses 3 console variables to control the round duration:

  • sbr_race_time: Duration of the racing stage (default is 90 seconds)
  • sbr_start_time: Duration of the starting stage (default is 10 seconds)
  • sbr_wait_time: Duration of the waiting stage (default is 5 seconds)

Usually the only timing you should modify is the one from the racing stage, but if you want to modify the other stages you can do it too. The only thing you need to do is to add a lua run to your map, and add a RunConsoleCommand() function in the Code field of the entity properties, this function will run the console command you specify, and in our case we are going to use it to modify the round duration:

-- For example, this code will set the duration of the racing stage to 75 seconds
RunConsoleCommand("sbr_race_time", "75")

Flags: The Lua run entity has only one flag, and it determines if the Lua code is run when the map loads (and that's exactly what we want), so you will have to check this flag in order for the code to run:

  • Run code on spawn

Tips:

  • Remember that modifying the round duration is optional, you don't have to do it. But it gives you the freedom to customize the map and make it more dynamic.
  • Try to only modify the racing stage duration, the other stages are not as important and you shouldn't modify them unless you have a good reason to do so.
  • The Lua run entity is a very powerful tool, so make sure you use it wisely. You can do a lot of things with it, but you can also break the map/server if you don't know what you are doing.

Map design

The map design is up to you, you can make it as simple or as complex as you want. But there are some things you should keep in mind:

  • The default round time is 90 seconds, so make sure your map is not too long.
  • Make sure that players can't get stuck on the map, especially on the racing track. Keep this in mind when designing things like ramps and slopes that are flat or go uphill.
  • Try to keep it competitive, make sure that players can't get an unfair advantage by always choosing a specific start zone/gate.
  • If your map isn't competitive, at least try to make it fun. I recommend adding some obstacles or traps.

After all, the goal of SBR is to bring back the fun, creativity, and competitiveness of sled racing in Garry's Mod.


Testing

Testing is the final step before publishing your map, and it's very important. You must test your map to make sure that it works as intended, and that it's fun to play.

SBR has a built in functionality that will let players know if something required for the gamemode is not present in your map. Although it will tell you if your are missing something, it won't tell you if something is badly placed or not configured correctly. So you must test your map to make sure that everything is working as you intend them to.


Common issues

Here are some common issues that you might encounter when making your map, and how to fix them:

Issue: Pushers don't push sleds.

Solution: Make sure that the pushers have the flags Pushables, Physics Objects and Physics Debris enabled in the flags tab of the entity properties.

Issue: Pushers are set correctly, but sleds still don't move.

Solution: Check that the direction of the pushers is towards the racing track. And that the force is high enough to get the sleds moving (usually 500 to 1000).

Issue: Players are stuck in the floor when teleporting back to spawn.

Solution: Move the spawn points high enough so players don't get stuck inside the floor.

Issue: Sleds get stuck throughout the racing track.

Solution: Make sure that the racing track is steep enough so sleds don't get stuck. If you want you can add permanent pusher/boosters to help sleds get moving (remember not to name them sbr_pusher so they don't get turned off after the starting stage).

Issue: The timings of the map are not working as intended (you get the default values).

Solution: You probably forgot to check the Run code on spawn flag in the Lua run entity. Make sure to check it so the code runs when the map loads.


Final Notes

Thanks for reading this guide, I hope it was helpful. If you have a map that you want to share, post it in the mapping section of the SBR Discord server!

If there is something you think should be added to this guide, feel free to let me know. I will be updating this guide as I get more feedback.

⚠️ **GitHub.com Fallback** ⚠️