OpenTrespasser / JurassicParkTrespasser

A git-based fork of the Jurassic Park: Trespasser source code.
101 stars 25 forks source link

Bring structure into physics code #9

Open meekee7 opened 4 years ago

meekee7 commented 4 years ago

The physics code is lacking structure, often using functions with 1000 LOC or more. Those super-long functions should be divided into one or two layers of smaller functions. Furthermore, the physics code could be shortened enormously be using loops. A lot of code is written in an "unrolled loop" style, but optimizers in compilers are perfectly capable of loop unrolling by themselves.