Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Theacesofspades · Dec 25, 2012 at 02:36 AM · randomlevelinfinitegenerated

How can i make an infinite level?

Im trying to make a game level kina like temple run. How would i go about making a level that never ends like that with the random generated things? Its not near a replica, i just want it to be a straight line. I have no idea even where to start with this. Any suggestions?

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

4 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by PushpaK · Dec 25, 2012 at 05:16 AM

Try to use Application.LoadLevelAdditive(level). You can use same level or different levels alternate.

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

Answer by cgcookie · Dec 25, 2012 at 05:17 AM

I'll admit I have not done one personally but I will do my best to give you some insight.

Store blocks of data that start and end at the same level or a gap, and using an array randomly add these to the level as the player requires them.

Hope this helps!

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

Answer by Imankit · Dec 25, 2012 at 05:16 PM

You can instantiate your road in a time step using Time.DeltaTime in Update... Just check your players speed and see how far your Camera's field of view you want to set and according to that you can fix a time interval to instantiate the Road or anything you want...

You can also add Random Objects in your way..

gud luck

its something like that...

float timeI = 0;

gameObject road;

void Update(){

if(timeI

timeI+-Time.deltaTime;

} if(timeI >= 5){

road = GameObject.Instantiate(your road object prefab);

road.transform.position = your previous roadObject's end position;

timeI = 0;

}

}

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 Theacesofspades · Dec 28, 2012 at 05:52 PM 0
Share

can you use javascript? Im not familiar with c#.

avatar image
0

Answer by Imankit · Dec 25, 2012 at 05:16 PM

its something like that...

float timeI = 0;

gameObject road;

void Update(){

if(timeI

timeI+-Time.deltaTime;

} if(timeI >= 5){

road = GameObject.Instantiate(your road object prefab);

road.transform.position = your previous roadObject's end position;

timeI = 0;

}

}

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

10 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

Related Questions

How to make a 2D infinite random level 0 Answers

How to save a scene that you randomly generated as a new level in your build settings? 1 Answer

Randomly Generated 2D Level 1 Answer

how can i do that enemy cars start coming up from my 2nd level of the game ? 1 Answer

Infinite loop when I try to generate randomly a 2D dungeon.. 3 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