Randomly Generated Worlds?
Ok, i have a game were you walk around and all and the ground is grass/dirt blocks and i dont want to have to place each and every block out one by one beacause i want a random and big world so i was wondering if there was any way to make Randomly Generated Worlds that place random blocks in the ground like Dirt/Gravel/Stone and stuff?
Comments
If top down why not make a few variations of a 1024x768 ground image by dropping the grass/dirt blocks in, then you would have fewer images to place (assuming that your blocks are small and not 1024x768 ... and/or you could work out when to move an out of scene image to a position that was coming into scene.
But to randomly place blocks like that you can have a spawn actor. Give it a self attribute called spawn type.
Then have every 0.1 seconds, then another timer in it for hwoever long you want, change the self position x and y to random, and change the attribute spawn type to random(1,4) change the 4 out for however many block types you have
then you have another rule in the spawn actor when spawntype=1 spawn brick, when spawn type=2 spawn dirt, ect.
If 1. organized rows and columns I think you can use my above suggestion of moving offscreen blocks. If 2 then that's going to be a lot of spawn and destroy that I believe will kill the device.