I am working on a program (trying to code up) which produces Random maps using the diamond-square algorithm. But what I found was that even after using rand() function I am getting maps that are identical.
Here is my code:
I am just sort of guessing here since I did not take much time to look at the code and understand what it's doing.
When you call rand() without any argument it uses the number 1, so essentially you are getting a return value of 0.nnnnnnnnn each time you use rand. Try replacing each instances of rand() with something like "int rand(500)" or whatever value is appropriate instead of 500.
Hi there! I am working on a very similar project, trying to create random maps using visual basic (I do it with a very slow and inneficient proccess using drawn pixels one by one). I would like to discuss with you, feel free to drop an email (I am not a regular user of CodeCall)
devant86 at hotmail dot com
If that was directed at me, I don't do emails or visual basic.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks