Optimization/Level Design

From Valve Developer Community
< Optimization
Revision as of 06:03, 16 September 2008 by TomEdwards (talk | contribs)
Jump to navigation Jump to search

Template:Abstract mapping

Optimization is the act of reducing the computer's workload. In level design terms this is almost always related to reducing the amount of rendering that the video card must perform at any one time.

Areas

Leaks
There's no excuse! Leaks will invalidate almost all of your efforts elsewhere.
Visibility
Reducing the number of surfaces and objects that are be drawn in the first place. This is the largest section.
Physics
There are various tricks to avoid overloading the CPU with physics calculations.
Material choices
Correct material choices will allow your map to scale down its demands on slower computers.
Lighting and reflections
Real-time and file-size optimisations.

Commands

showbudget
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 and -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.
mat_wireframe
A console variable that lets you see through walls. This way, you can see exactly what is being drawn - for reasons described in the visibility optimisation article, often more than you might think is sensible.
There are three wireframe modes, 1 through to 3, which display the information you need with progressively fewer lines.

See also

External links