midora Posted November 11, 2012 Share Posted November 11, 2012 There are some plugins out which use a 'Reseed' button to generate new sets of pseudo random numbers used to generate different patterns. The problem with this solution is that the result are not reproducable. The user clicks the 'Reseed' button and gets a new pattern which does not look as good as the last one. And there is no chance to go back. So I propose the authors to use an integer control instead of a button which allows to select a seed value. This seed value can be used to start a new sequence of random numbers. Because of the way pseudo random numbers are defined you will always get the same sequence of numbers after reseting the seed to the same value. Example to create a noise matrix: private void GenerateNoise( int seed) { Random random = new Random(seed); int x, y; for (x = 0; x < noiseWH; x++) for (y = 0; y < noiseWH; y++) { noise[x, y] = random.NextDouble(); } } /* GenerateNoise */ Calling the function multiple times with the same seed will always create the same matrix. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted November 11, 2012 Share Posted November 11, 2012 The reseed button loops at 256 presses... so, you can always get clickin'! Just don't lose count in your head. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
midora Posted November 11, 2012 Author Share Posted November 11, 2012 I guess you understand that I will not test one of your plugins regarding this issue ;-) And I doubt that you are using the button value as a seed to Random() so wrap around will not help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.