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 /
avatar image
0
Question by Endico · Oct 30, 2016 at 07:59 PM · procedural generationrandom genplanetsseeduniverse

Creating random seeds and saving them (procedural generation)Universe

Hi guys

I'm having a problem wrapping my head around scenario like this.

Say I've got a scene called Universe. Now, my game procedurally generates content of each Universe. Entering a new Universe to see new content, finishing it and going to the next one isn't much of a problem. However, I'd like to add ability to go back AND to generate a set of universes(say, 5) along certain path. Now, how exactly can I achieve this?

The latter one, I can store somewhere information about each Universe whether it should have exits on left/right or top/bottom and just generate as player moves forward using this data. The tricky part is coming back. What would you guys recommend? Serializing the whole scene (will it even work in this case?), picking up and serializing my own information about the random scene? Not sure how to approach this.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Daemonhahn · Oct 31, 2016 at 10:08 PM

You need to be saving the generation parameters when you generate the universe, which will allow you to then recall those parameters later in order for them to act as a "seed". Usually if you are using random generation to create these random universes, then you should first "seed" the random number generator, usually by using the system date time as a reference as that will almost always be unique (or you could make a GUID and do things properly).

But essentially all a seed is is a set of parameters which when passed through either a RNG generator or your procedural universe generator will always cause the same results.

So think if your passing a number of worlds as a parameter and max minimum spacing of worlds, you will need to record those values in order to generate the same amount of planets, at the same distances apart.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Procedural generation seed that can be manipulated 0 Answers

Generating a tiled world with roads, possibly using a 2D array? (C#) 0 Answers

How could I make a Randomly Generated Grid-Based Neighborhood? 2 Answers

Generate the same 'random' number sequence from a seed 1 Answer

How do I proceduraly generate an environment around a sphere? 5 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