How do you make things randomly generate, like platforms, blocks, stuff like that. I think it would be cool to make a squeal to my Mini Compo game Dots http://www.create-games.com/download.asp?id=7581 . Could anyone give me some tips?
Random ( Number )
This can be used in limitless ways.
For example:
Create Object at any position.
Set X Position of object to Random(640)
Set Y Position of object to Random(480)
You now have an object being created in a random location inside of a frame that's 640x480 big. If your frame is bigger or smaller, adjust accordingly. If you want to make it so that it randomly spawns around an object, well then you need to be a little more creative like adding to the random number.
The randomization works fine, but they still sometimes get created outside the frame. Could it be because i'm using a fast loop to create generate my platforms?