Magic numbers in the c++ code


There are a lot of magic numbers in the source code of interface.
There is a settings in javascript, what does this do ?

I think there should a settings object managing those numbers. When there is need for a default value in the c++ to should get that value from that settings object.
The settings could come from a json file or ini file.

From javascript it should be possible to access those settings, maybe even from editing a interface.ini file.

So when someone would wanna change the sensitivity of a device or the the frame rates of the LODManager for instance it should be possible through javascript or an ini file.
It would be nice to have a settings object for this, so that not every c++ file which uses some sort of defaults would have to implement its own handlers for this.

@ctrlaltdavid and @chris what are you thoughts on this ?


The JavaScript Settings object reads / writes values in Interface.ini.

There are a LOT of magic numbers in the code, and many are already handled via Interface.ini. There may be arguments to be made for converting further particular numbers to settings, on a case-by-case basis.


That makes sense, is there a doc on how to turn a number into a setting ?