Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #13  
Old 09-25-2008, 06:42 PM
Cantus
Fire Beetle
 
Join Date: Sep 2008
Location: New York
Posts: 18
Default

Quote:
Originally Posted by ChaosSlayer View Post
I havent looked ta actual code but in order to minimize extra calculation in mind it would look like this:

You store ALL values in a table which is accessed by parameters of Level and Dly

When weapon strike you simly add X(a,b) to the final damage, where X(a,b) points the table with pre-calculated values
Hi, Chaos!

What you're describing is a brute-force lookup table... just one that's built on-the-fly (which would, in all likelihood, be slower than a comprehensive, pre-built static lookup table.)

There are three options for calculating damage bonuses:
  • A brute-force table like what you describe
  • A pure-formula approach where damage bonuses are calculated mathematically
  • A hybrid approach where formulas are used in cases where they're simple and fast, and tables are used for all other situations

I tried all three possibilities, and the third option -- the hybrid approach -- is what provided the best performance.

That's what's implemented here in this thread. As I mentioned above, testing (that you can easily re-create) proves that this function is a very efficient and fast way of calculating these values, and that it will have an absolutely unnoticeable impact on server performance.

Please don't think I'm shooting down your idea! It's a great one! I'm just pointing out that it was considered, tested, and found to be not quite as efficient as the solution presented in this thread.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:49 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3