Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 /
  • Help Room /
avatar image
0
Question by KodingKaralis · Jan 05, 2016 at 06:09 PM · c#proceduralcity

Procedural City Generation

Hi everybody, I'm trying to make a procedural city for a game I'm making, but the problem is that I have no idea what method to use and how exactly how I'm going to use that method to create a few kilometer city with a good frame rate. Please help :|

Oh also I work in C# so if you want to include any code, may you please make sure its C# or else I want have a clue of what you're saying.

Right now I'm trying to make the roads out of one procedural mesh, Is this a good idea or not?

Comment
Add comment · Show 3
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 ShadyProductions · Jan 05, 2016 at 10:38 PM 0
Share

2D or 3D?:)

avatar image KodingKaralis ShadyProductions · Jan 05, 2016 at 10:53 PM 0
Share

@ShadyProductions

It is in 3d

avatar image CrandellWS · Feb 09, 2020 at 08:06 PM 0
Share

https://assetstore.unity.com/packages/tools/modeling/cscape-city-system-86716

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Jato · Jan 06, 2016 at 01:39 AM

@KodingKaralis If you have several structures that you would like to create but you want them randomized in position and frequency then I would suggest using [Instantiate](http://docs.unity3d.com//ScriptReference /Object.Instantiate.html) and some random variables. This is not a finished script there will probably be a few bugs but a concept like this should work

Create an empty gameobject give it this script: Say you have 3 buildings that you want generated and you have them set to with variables as 1)House 2) Hotel 3)Lodge and var spawnHouse = 10; var spawnHotel = 10; var spawnLodge = 10; var structureCount = 0; void Update () { spawnHouse = Random.Range(0,11); spawnHotel = Random.Range(0,11); spawnLodge = Random.Range(0,11); if(structureCount >=10{ if(spawnHouse == 0){ Instantiate(House, transform.position, transform.rotation) structureCount = structureCount + 1; } if(spawnHotel == 0){ Instantiate(Hotel, transform.position, transform.rotation) structureCount = structureCount + 1; } if(spawnLodge == 0){ Instantiate(Hotel, transform.position, transform.rotation) structureCount = structureCount + 1; } } and then in the void start for the script for each of the structures use Random.Range for x and z coordinants.

Comment
Add comment · Show 1 · Share
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 KodingKaralis · Jan 06, 2016 at 01:58 AM 0
Share

I like this but what I'm really need help with is the road map generation, not the buildings. Sorry about that, should've clarified :). Is there any way I could make a city map like the Subversion Game?

avatar image
0

Answer by RecklessGames_ · Feb 11, 2016 at 04:11 PM

Would this help? http://forum.unity3d.com/threads/cidy-a-new-city-designer-plugin-for-unity.385371/

Comment
Add comment · Share
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

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.

Follow this Question

Answers Answers and Comments

59 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 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 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

Procedural Cave Generation Can´t understand?? 0 Answers

Can you use the superformula in unity? 0 Answers

Any good procedural generated maze for 2d out there? 0 Answers

[SOLVED]Unexpected results 0 Answers

Could anyone help me on how I would make a procedural fire audio script? 1 Answer


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