Author Topic: GLB v12.308 and v14.01 SEEDRND  (Read 355 times)

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1558
    • View Profile
GLB v12.308 and v14.01 SEEDRND
« 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?

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10719
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: GLB v12.308 and v14.01 SEEDRND
« Reply #1 on: 2019-Aug-08 »
on windows!? How can that be. I never touched that code for years...

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1558
    • View Profile
Re: GLB v12.308 and v14.01 SEEDRND
« Reply #2 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?!

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline Qedo

  • Mr. Polyvector
  • ***
  • Posts: 167
  • UNUS SED LEO
    • View Profile
Re: GLB v12.308 and v14.01 SEEDRND
« Reply #3 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

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1558
    • View Profile
Re: GLB v12.308 and v14.01 SEEDRND
« Reply #4 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 :)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3690
    • View Profile
    • Space Fractal
Re: GLB v12.308 and v14.01 SEEDRND
« Reply #5 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.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.