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
1
Question by BilboStabbins · May 16, 2013 at 10:29 PM · scene-loadingapplication.loadlevelrunner

Help with reloading scene for endless runner

I have an endless running game with the traditional set up. Game starts, pans into Player, you press something on the screen to start the game. Now, I'm making the menu and was wondering what the usual practice is for this kind of game when you want to return back to the initial 'Title area' again (Eg. Subway Surfer spray-painting the train). The most intuitive thing seems to be to simply use a single scene for the game and then just restart it.

I was wondering if I could get some thoughts on whether this sounds like the way to go or not.

Thanks

Comment
Add comment · Show 4
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 Fornoreason1000 · May 16, 2013 at 10:56 PM 1
Share

You could reposition everything back into place , but reloading the scene seems like the way in this case.

avatar image $$anonymous$$ · May 16, 2013 at 11:01 PM 0
Share

I typically use a separate scene just for the main menu, primarily to give the chance for low end computers to lower the graphics settings before loading the bulk of the game. But I would assume that a free run game with a single scene would just reset the character and all the variables rather than reloading the game

avatar image TonyLi · May 16, 2013 at 11:57 PM 1
Share

Adding to what Ben Jarrell wrote (and he deserves credit for his answer, so I hope he posts it as an answer), I do the same for desktop games. But if you're targeting mobile, consider integrating the main menu into the game itself, so there's no main menu and you can start playing right away.

Brandon Sheffield's column in this month's Game Developer (http://gdmag.com/blog/2013/04/simple-beauty.php) makes a good argument for this. Look under the section "Start the game = play the game".

avatar image BilboStabbins · May 17, 2013 at 01:02 AM 0
Share

Thanks for the suggestions.

I think a separate scene would definitely make things simpler as it doesn't require any management of objects/variables, etc. Having said that, the game starts in a similar way to Temple Run/Subway Surfer(with the camera always looking at the Player) so masking the scene change could be tricky. $$anonymous$$aybe there's a power cut!? :D

I agree with Ben's idea about giving the user a chance to change the settings before the game begins, that's a definite advantage of having an initial scene.

TonyLi, it is a mobile game so that was my thinking too, get the Player straight into the action.

I'll have a try at both methods and report back.

Thanks again.

2 Replies

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

Answer by rutter · May 17, 2013 at 01:25 AM

Reloading a scene is probably the least developer work by far, but if your load times are long it's going to degrade the user experience significantly.

Imagine if your game could restart in less than 100ms.

If you're using object pools to manage your map objects, you can simply return all deployed objects to their pools (presumably this gets them out of sight), re-initialize the startup area as needed (move camera, re-spawn a few things, trigger animations and UI), and go from there. Your map generation is hopefully quick and cheap enough that generating a bit of map to start from isn't a problem, or you can rely on a prefab to get that ball rolling.

If you're not using pools, we've probably already thrown performance out of the window. ;)

The above suggestion is going to be much easier to implement if you can separate those parts of your startup routine from Awake() and Start(), such that they can be called from those functions, but are not contained within them.

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 BilboStabbins · Jun 16, 2013 at 12:42 AM 0
Share

Reloading the scene seem to work best for this scenario so am accepting Rutter's answer on this occasion.

Thanks for all the suggestions, they were great in helping me weigh up the pros and cons for this situation.

avatar image
0

Answer by randomuser · May 16, 2013 at 11:53 PM

It would be easiest to have a separate scene for the main menu. You can use some fancy camera effects to hide the scene transition. This makes programming the game much more sane than moving the scene around to get to different parts. It will involve more loading time, but it will will make your life a lot less buggy.

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

17 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

Related Questions

Application.LoadLevel(Application.loadedLevel); wont work While checkpoints are on 3 Answers

Scene Change OnCollision Not Working 2 Answers

Where do Application.LoadLevel() and Resources.Load() load from? 1 Answer

Delete all GameObjects of last scene after Application.Loadlevel("New Scene") 2 Answers

Gui Button Not Working After a Scene Load 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