I've got an autorunner game with obstacles and i'm having a little trouble with the positioning of the obstacles when they appear.
Basically, i've set up my obstacles so that they appear at random points on platforms but most of the obstacles that appear are near the very beginning of the platform and very little of them actually appear near the end to mix things up, so it doesn't feel very random (hope that makes sense).
I've provided a capx, so hopefully that will make my problem clearer. The code i'm using to sort the positioning of my obstacle is this -
Box - Set position to (Block.X + Block.Width / random (10,1) , Block.Y)
If i change the 'random (10,1)' portion to just 1, then all obstacles appear at the end of the platform and if i change to 10, then they'll end up at the beginning of the platform. So i thought using 'random (10,1)' would work but it's not as random as i hoped it would be.
It could be something really simple that i'm missing but can anyone help?