Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
relyks
23
Years of Service
User Offline
Joined: 10th Apr 2003
Location:
Posted: 19th Jun 2003 19:09
Does DBpro use the same random number generator as DBC?
Do you still come up with the same values if you use the same seed twice?

It's mot really a big deal I know how to get random enough numbers.
I was just curious if they have improved this in DBpro
Shadow
23
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 19th Jun 2003 19:15
I don't know what you mean, but just use randomize timer() for all your randomisation needs.
GameKit
23
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 19th Jun 2003 19:28
dark basic classic uses randomize timer() by defalt without you having to type it in... with darkbasic pro you need to type it into the beginning of your code or every time you play the game it will be the same... well... i hope this helps...

Anyone Can Destroy...But Few Can Create...
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 19th Jun 2003 19:34 Edited at: 19th Jun 2003 23:17
Shadow: eh?, you did read that post didn`t you?, how on earth can you be in doubt as to what he meant?

this

for i=1 to 10
print rnd(100)
next i
wait 100000

gives the same numbers for both classic and pro

41,85,72,38,80,69,65,68,96,22,49,67

so I guess they use the same random number generator, most probably the one available in the C++ libs.

Mentor.

oops! yes! same seed, same numbers for both

Login to post a reply

Server time is: 2026-07-11 14:56:31
Your offset time is: 2026-07-11 14:56:31