Quote Originally Posted by JumpingJack View Post
It's really kind of intuitive when you think about it, just a high level gerdanken experiment helps to really understand why game code runs more branches than say compressing a file or encoding a movie clip. It is unavoidable, there is no way to program a game engine without it. The input actions of the player are unpredictable and the resulting cause and effect will always require testable conditions, the crux of any gaming algorithm is ultimately indeterministic. For the CPU duties of the gaming engine, yeah it is still important -- the CPU is responsible for receiving player input, tracking AI, culling, etc etc.
Bull
There is a lot of solutions a programmer can do to avoid branches, code for different applications is very similar. What might differ is that a game developer tries to optimize the code more than other type of applications because the need for speed.
And there is no way to program any application without a lot of branches. Most branches in applicaitions is for checking errors.
Example:
Parsing data will need to check data before taking actions because you never know if the data is corrupt.