menu_bookDocumentation
Mapping in s&box
Mapping in s&box
s&box includes Hammer, the Source 2 level editor, for creating maps.
Opening Hammer
- Main Menu → Tools → Hammer
- Or click Hammer icon in toolbar
Hammer Features
- Block-based geometry — Build with brushes
- Mesh editing — Detailed static meshes
- Entities — Place gameplay objects
- Materials — Apply textures with drag-drop
- Lighting — Real-time and baked lighting
- Visibility (VIS) — Optimization with PVS
Map Workflow
- Build geometry — Brushes and meshes
- Apply materials — Textures and surfaces
- Place entities — Spawns, triggers, logic
- Add lighting — Environment and direct lights
- Compile — Generate navmesh, lighting, VIS
- Test in game — Play directly from Hammer
Map Entities
Common entity types:
| Entity | Purpose |
|---|---|
| infoplayerstart | Player spawn point |
| trigger_multiple | Trigger volume |
| prop_static | Static prop |
| light_environment | Sun/ambient light |
| point_light | Local light source |
Using Maps in Code
CSHARP
// Load a map
Scene.LoadFromFile("maps/my_map.vmap");
// Find map entities
var spawnPoints = Scene.GetAll<SpawnPoint>();Shortcuts
See Mapping Shortcuts for full list.
Was this helpful?