Leveling and Big Numbers
Tribes 2 has a problem when it comes to big numbers. After a point, the engine starts to represents the numbers in scientific notation. For example, 2.86543+e08. Unfortunately, decimal precision is thrown out the window when this happens. Typically, this is fine, because the difference between say 2,000,000 and 2,000,000.01 is insignificant in the grand scheme of things. But for some applications, the precision is needed. Determining EXP for levels in TRPG is one of those applications, where a precise and consistent value is nice to have.
This has an impact on calculating exp required for the next level in Tribes RPG. I think Tribes 1 had this problem too, because the code defines an OldGetLevel() and OldGetEXP() methods which are similar to the methods used in T2RPG.
I’d rather not have the max level be 110, which is where the old method breaks down. So I ported over the new method to T2RPG. The difference is that now all levels require 1000 exp, but the exp received from bots rapidly scales down as you pass them in level. This helps keep the numbers small.
Edit: Tribes Next has created a workaround for the big number issue (more info here http://www.tribesnext.com/forum/index.php?topic=2359.0;wap2) by packaging their patch with a Ruby interpreter. Problem is that calls to this interpreter from Torque Script occur on the order of milliseconds. Which is slow compared to microsecond time span that Torque normally operates. While this isn't that big of an issue for calculating levels, it is far from ideal. I’m afraid of someone writing a script that checks their level every second and then 20 people use it and slow down the server.










