Optimization/Level Design: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 30: Line 30:


* [[Budget]]
* [[Budget]]
* [[Controlling Geometry Visibility and Compile Times]]
* [[Optimizing and Checking Your Map]]
* [[Optimizing and Checking Your Map]]
* [[Optimization Commands]]
* [[Optimization (Non-Geometry)]]
* [[Optimization (Non-Geometry)]]
*:''Geometry optimizations can be complicated, but there are several non-geometry aspects of optimization. Handling them can be an easy way to make your map faster. Keep these in mind when designing a new map, and consult individual sections where [[showbudget]] reports problems.''
*:''Geometry optimizations can be complicated, but there are several non-geometry aspects of optimization. Handling them can be an easy way to make your map faster. Keep these in mind when designing a new map, and consult individual sections where [[showbudget]] reports problems.''

Revision as of 12:39, 16 September 2008

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.
Materials
Correct material choices will allow your map to scale down its demands on slower computers.
Lighting
Real-time and file-size optimisations.

Commands

You will need to enable sv_cheats before using any optimisation 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