php game, formula to calculate a level based on exp

前端 未结 7 2403
心在旅途
心在旅途 2020-12-23 10:34

Im making a browser based PHP game and in my database for the players it has a record of that players total EXP or experience.

What i need is a formula to translate

相关标签:
7条回答
  • 2020-12-23 11:35

    The original was based upon a base of 50, thus the 25 scattered across the equation.

    This is the answer as a real equation. Just supply your multiplier (base) and your in business.

    $_level = floor( floor( ($_multipliter/2)
                          + sqrt( ($_multipliter^2) + ( ($_multipliter*2) * $_score) ) 
                          ) 
                          / $_multipliter
                   ) ;
    
    0 讨论(0)
提交回复
热议问题