What is a good random number generator for a game?

前端 未结 16 1600
渐次进展
渐次进展 2020-12-02 04:26

What is a good random number generator to use for a game in C++?

My considerations are:

  1. Lots of random numbers are needed, so speed is good.
  2. P
16条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 05:22

    GameRand implement the algorithm posted here http://www.flipcode.com/archives/07-15-2002.shtml

    This is something I originally developed in the late 80s. It easily beat rand() in term of numerical quality, and as the side benefit to be the fastest random algorithm possible.

提交回复
热议问题