I understand you and I think you’re right, setting the seed for the developer would make using math.random()
easier. But I also think it would make other things harder.
For example, if you were debugging errors. You might need to know when the seed is set and how. Does each module have its own seed? What method are they using to set the seed? Can a player find their seed and send it to you? If your game fails on seeds that are divisible by 51729 can you solve the issue?
But Defold’s design is to make the developer answer those questions. Maybe more aggressively than other engines, but in my opinion it pays off by getting in your way a lot less often.
Edit to avoid a bump: Before posting originally, I removed explanation of how math.random()
works. The highlight is that I think it’s important to keep in mind that computers can only generate pseudo-random numbers, and I personally think that setting the seed helps me remember that.