Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Luck and misfortune
#3
From
(04-09-2018, 09:07 PM)Frank_Stein Wrote: Luck would influence the odds of pretty much anything and everything that is percentage based, increasing or decreasing the probability of certain outcomes

This would positively murder the code's efficiency.

The cleanest way to implement this feature would be to replace the large majority of prob() calls with a custom proc that can take in luck as a param. This would require a pretty thorough refactorization of the codebase.

What's worse is that this custom proc would be marginally slower than just a raw prob() call. While this slowdown is negligible for a single instance, when repeated countless times over the entire source code, the inefficiency adds up to a significant performance hit.
Reply


Messages In This Thread
Luck and misfortune - by Frank_Stein - 04-09-2018, 09:07 PM
RE: Luck and misfortune - by Vitatroll - 04-09-2018, 09:26 PM
RE: Luck and misfortune - by Noah Buttes - 04-09-2018, 09:45 PM
RE: Luck and misfortune - by Mordent - 04-09-2018, 09:52 PM
RE: Luck and misfortune - by Noah Buttes - 04-10-2018, 04:18 AM
RE: Luck and misfortune - by Frank_Stein - 04-10-2018, 03:31 PM
RE: Luck and misfortune - by Mordent - 04-10-2018, 07:19 AM
RE: Luck and misfortune - by Noah Buttes - 04-10-2018, 07:42 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)