Math.randomseed lua problem.
Posted: Sun Mar 25, 2012 5:11 am
Hello, this is my first thread here. I have a problem with math.randomseed.
The problem is: math.random DOESN'T DO ANYTHING!
Well, to elaborate, I have a random seed for the x, y, and size of stars in a starfield. But when I try to generate the starfield, a small cluster of stars appear right in the corner of the screen, compared to the seemingly totally random array of stars generated when there is no seed. It doesn't seem to matter how ridiculous the seed is, it will always generate some sort of cluster of stars in the corner. I have tried to even generate the XYS locations for each star every time 10% of a loading sequence has finished, but to no avail.
Please help! If you find the ship controls Shonky Wonky Donkey, it's because I optimised the game for gamepad and don't really care about the keyboard controls. To generate 'new' stars, press F1. If you want to change the sort of control, press F2. Thanks!
The problem is: math.random DOESN'T DO ANYTHING!
Well, to elaborate, I have a random seed for the x, y, and size of stars in a starfield. But when I try to generate the starfield, a small cluster of stars appear right in the corner of the screen, compared to the seemingly totally random array of stars generated when there is no seed. It doesn't seem to matter how ridiculous the seed is, it will always generate some sort of cluster of stars in the corner. I have tried to even generate the XYS locations for each star every time 10% of a loading sequence has finished, but to no avail.
Please help! If you find the ship controls Shonky Wonky Donkey, it's because I optimised the game for gamepad and don't really care about the keyboard controls. To generate 'new' stars, press F1. If you want to change the sort of control, press F2. Thanks!