GLBasic forum

Main forum => Bug Reports => Topic started by: MrPlow on 2019-Jul-29

Title: GLB v12.308 and v14.01 SEEDRND
Post by: MrPlow on 2019-Jul-29
I know I am using an older versions of the GLB at the moment - I need to for my android apps (for now)
But my issue is that SEEDRND seems to be broken on it.

Is that the case or is there a workaround for it?

both version generate completely differently results for a seed.
Is it possible I am placing it in the wrong position in the code - does that factor into it?

Title: Re: GLB v12.308 and v14.01 SEEDRND
Post by: Kitty Hello on 2019-Aug-08
on windows!? How can that be. I never touched that code for years...
Title: Re: GLB v12.308 and v14.01 SEEDRND
Post by: MrPlow on 2019-Aug-08
Not sure - I never used SEEDRND bofer until a recent project...could be an issue with my multiple installs of GLB 11,12,14,16
on the one machine?!

Title: Re: GLB v12.308 and v14.01 SEEDRND
Post by: Qedo on 2019-Aug-08
MrPlow,
On my computer same results with these configurations:

GLB 12.656 WIN10, ANDROID (BlueStacks)
GLB 14. 497 WIN10, ANDROID (BlueStacks)
GLB 15.238 WIN10, ANDROID (BlueStacks)

SEEDRND 505
RND(100) = 68
RND(15)+5) = 14
Title: Re: GLB v12.308 and v14.01 SEEDRND
Post by: MrPlow on 2019-Aug-09
Okay, looks like I have it sorted now...still might be a bug though!

I am trying to have the same procedural maps generate based on the SEEDRND
if I assign like the example below (a variable with a rnd value) right after my seedrnd statement I get the same map.

If I dont and let the procedural map do the first RND calcs then I get different results each time...it's like the the seedrnd doesn't  set unless the rnd command is used right after...or my file and asset loading is creating minuscule timer delay or offsets  on the seed value...I am not fully sure.

But doing the "use RND right away" method works now :)
Title: Re: GLB v12.308 and v14.01 SEEDRND
Post by: spacefractal on 2019-Aug-10
have you tried to set the rnd twice? im seen something similar in blitzmax as well. howover its a bug we wont fix as its a old version of glbasic and dont want to fix bugs in old and new versions.