- Home /
How to generate random terrain for a platformer
How would one go about Generating a set of prefab(s) to generate on the left/right before he moves to it? The same mechanics as Terraria or other games like it.
Then with the terrain taken care of i am also wondering how to add set objects to spawn randomly with a set number of rarity like chests, Dungeons, castles etc etc.
I'm not asking for a script that will do it for me (That would be nice :P ) But for a guidelines on how i would go about doing it... Maybe theres a guide on the forums / another site that has the anwser or a tutorial i'm looking for? Thank's again for taking the time, Cheers.
I don't know much about designing an algorithm for procedural generation, but you might find this asset package (http://u3d.as/content/doppler-interactive/tidy-tile-mapper/2AF) helpful. It makes it very easy to generate terrain and add to an existing map.
This question has been asked and answered many many many times before. Please search before asking duplicate questions.
Here's just one answer : http://catlikecoding.com/unity/tutorials/runner/
Thanks ozone for the link, I actually have that already but it does not generate terrain (or at least random terrain) that i know of, I might be able to pick through the thousands of lines of code to find the right mechanic that $$anonymous$$ight work xP
Also thank you alucardj for the link, In the 3 hours of time i have searched for this question. It is far from what i needed but again i supposed i could go through and find the code that would work as a starter. But not room of creativity like dungeons etc.. As well thank you both for your help in anycase.
I am aware that Tidy Tile $$anonymous$$apper does not generate terrain on its own, but it can make it easier to do so since you can just create an array of blocks, create an algorithm that generates the terrain as a matrix of integers that correspond to the indices of blocks in the array, and then use Tidy Tile $$anonymous$$apper's functionality to create a level based on that. As for what your algorithm might look like, I honestly can't say. That's up to you. Tidy Tile $$anonymous$$apper divides maps into "chunks," so you might be able to assign certain biomes, dungeons, or other features to particular chunks.
I completely overlooked this option... I just got it yesterday so i did not know everything it had to offer i suppose :P
$$anonymous$$ANY thank's friend!
Your answer
Follow this Question
Related Questions
Tree position on random Terrain (y axis) 0 Answers
Generate Random Terrain on Start 1 Answer
Unity Voxel Terrain and structures 0 Answers
Invisible trees? 1 Answer