Optimization (level design):fr

From Valve Developer Community
Jump to: navigation, search

Les moteurs 3D en temps réelles doivent tenir conte tout au long de leurs devellopements d'une contrainte principale : Rester fluide.

C'est à dire tenir un minimum d'image seconde (ou FPS), afin de rester jouable, en tenant conte de la puissance des configurations PC du moments, notemment du CPU (processeur ou unité centrale) et GPU (processeur de la carte graphique). Il n'y à pas de normes fixe, les FPS varie en permanence dans un moteur 3D selon la scène et la puissance des utilisateurs, il est préférable de garder un FPS au dessus de 20, en dessous le jeux deviens difficilement joauble, surtout pour des jeux rapide telle un Doom-Like ou un jeux de Course.

L'optimisation à aussi comme but de diminuer le temps de compilations, une map mal optimiser peut atteindre des temps très long de plusieurs heures au lieu de quelques minutes.

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 drawn in the first place. This is the largest and most important area.
Physics
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
Performance and file-size optimisation.


Commands

There are plenty more than those listed below — find them in their relevant articles. Note that sv_cheats must be enabled for most to work.

cl_showfps
A simple output of framerate. 1 is real-time, 2 is averaged over the past second.
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.