Menu

random numbers, pulse/clock system

maggruled
2010-09-30
2015-11-11
  • maggruled

    maggruled - 2010-09-30

    I recently downloaded the 2.90 release and have been working on it since. A few things I have changed at this point:
    -added a better random number generator. the default Java random # generator is based on a linear congruential algorithm. Essentially, all the possible numbers are mixed up into a pseudo random order, but always maintain their overall order. The "randomness" is only a function of where you start in the list - ie, what your seed # is. The mersenne twister is what I added. The simulation uses a wrapper class called randUtils. This has not changed, except that now it uses a mersenne twister instead of Math.random(). No other code needs to be changed for this.

    -Time pulse. I tied the time pulse to real world time so that now one can control precisely the ratio between real world time and simulation time, via the time control panel.

    what a great piece of software, and I'm happy to be working on it. Thanks.

    David  

     
  • maggruled

    maggruled - 2010-09-30

    Okay . Now the game has a fully functioning "pause" button which I have located for now, in the Time control window. It works ! It pauses the game, and the master clock does not add any time to the game while it's paused. When resumed, the paused time is not included in time pulses sent to units.

    I would like to get this into your hands because I think it might provide valuable info to developers.  For example, being able to see how many "ticks" per second the game is doing. Also, being able to control precisely the ratio between realworld seconds and game time.

    I'll see if I can get a commit into your repository. Thanks.

    David

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.