Optimization (level design)
|Abstract Mapping series Discuss your thoughts - Help us develop the articles or ideas you want|
Ammunition | Animals & Creatures | Antlions | Beams & Lasers | Cables & Ropes | Clouds & Sky | Color Theory | Combat | Combine | Doors | Dust, Fog & Smoke | Elevators | Level Transitions | Environmental Lighting & Weather | Explosions | Fire | Foliage | Glass | Headcrab | Health | Ladders | Lighting | Optimization | Physics | Retinal scanners | Sound & Music | Special effects | Terrain | Trains | Turrets | Water | Zombie
It's easy to create a map that older (or even newer!) computers will struggle to draw at sixty frames per second. This article is the hub for all information on how to to prevent that by optimizing your map.
- There's no excuse! Leaks will invalidate almost all of your efforts elsewhere.
- Reducing the number of surfaces and objects that are drawn in the first place. The single most important area.
- Various tricks to avoid overloading the CPU with physics calculations.
- Correct material choices will allow your map to scale down its demands on slower computers.
- Performance and file-size optimisation.
- A properly optimized skybox will significantly reduce lag and map size
There are many more useful console commands than the ones listed here — find them in their relevant articles.
- A simple output of framerate.
2is averaged over the past second.
- A panel which displays how your computer is spending its budget for each frame. It's the premier tool for working out exactly what's sucking up performance in your map.
- It's invoked with
-showbudget, which means that you can bind the former to a key (i.e.
bind <key> +showbudget) and it will only appear when you hold that button down.
- A console variable that (when active) displays visleaves. The number of the leaf, area and cluster of the current leaf is reported in the console.
- A console variable that lets you see exactly what is being rendered - for reasons described in visibility optimization, often more than you might think is sensible.
- Locks the PVS so you can walk around and inspect what is being drawn.
Optimization in Source: A Practical Demonstration - Pictorial demonstrations of optimization by NoDraw.net
The Truth About The BSP - Step-by-step explanation on BSP and its application by Twenty-Sided