• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by Sleeper75 · Nov 25, 2013 at 05:05 AM · terrainrandomplatformergeneration

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.

Comment

People who like this

0 Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ozone · Nov 25, 2013 at 05:54 AM 0
Share

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.

avatar image AlucardJay · Nov 25, 2013 at 07:04 AM 0
Share

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/

avatar image Sleeper75 · Nov 25, 2013 at 09:13 AM 0
Share

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 Might 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.

avatar image ozone · Nov 25, 2013 at 04:39 PM 0
Share

I am aware that Tidy Tile Mapper 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 Mapper'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 Mapper divides maps into "chunks," so you might be able to assign certain biomes, dungeons, or other features to particular chunks.

avatar image Sleeper75 · Nov 25, 2013 at 09:02 PM 0
Share

I completely overlooked this option... I just got it yesterday so i did not know everything it had to offer i suppose :P

MANY thank's friend!

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Invisible trees? 1 Answer

Tree position on random Terrain (y axis) 0 Answers

Generate Random Terrain on Start 1 Answer

Unity Voxel Terrain and structures 0 Answers

Need help with randomizing starting location of terrains 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges