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 Outliver · Apr 28, 2016 at 03:03 PM · performancemultiplescenessimulation

Cross-Scene Simulation?

Hi everyone,

I'm still quite unexperienced with Unity when it comes to performance issues.

My goal is to have a basic space sim like game, basically the kind of thing you already know from all the space sims out there: Multiple sectors with "star gates" connecting them, fighting, trading.

I'd like to simulate all the space ships and stuff in the other sectors and enable the player to jump between ships and therefore between sectors in realtime.

Now, I know, as Unity can't run multiple scenes simultaneously, the typical approach to simulate foreign sectors would be to simply roll the dice on some events (like piracy whatsoever) and do some calculations on distances and battles and so on. Then just spawn a ship wrack the next time the player enters that particular sector. But that won't allow me to do that cross-scene-jumping and it minimizes the actual simulation in it.

So I came up with the idea to load everything that's in a scene (i.e. sector) into layers and then just hide the unneeded layers in the camera settings at runtime. Calculations on collisions etc. would be done only for the respective layer(s) respecting the collision matrix settings.

Now my question is: Is this the way to go? Are there better approaches? Is that even possible performance-wise or will it simply kill every machine that tries to run the game? Any experience on this?

Thanks in advance, kind regards, Outliver

Comment
Add comment · Show 6
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 Odyssee · Apr 29, 2016 at 11:20 AM 0
Share

What about fullscreen element transition? Why not make each sector a different scene

  • When you use your stargate, you make a cool fullscreen video/animation/special effects that hides the game (think like a blue vortex like stargate)

  • While blue vortex is running, you load the scene in background.

  • Once loaded you make a fade to white screen

  • Then you load your new scene.

  • In your new scene you add a white image in full screen

  • Then you fade your white image to void, then displaying back your game

Edit: (I suggest this but I don't what your game is about, homeworld like, sins of solar empire, Eve online like game, ...)

I mean, if you have mass battles with lot's of physic (like Space engineers, eve online), CPU will have problem. If it's like sins of solar empire, with only road between planets and almost no physics, it's not the same impact. Loading all sector and tracking every fights seems big, but i don't know your game.

Generally, if the player don't see it, better not make him do calculations, unless you know you need it.

avatar image Outliver Odyssee · Apr 29, 2016 at 12:25 PM 0
Share

Hey, thanks for the reply! :)

There's probably not too much battle action going on here but neither do I have fixed static roads so there is quite some physics and ai involved.

Anyway, my question is not "how do make a loading screen animation". I can't simply load a scene or keep it unloaded until needed because I need to simulate "Sector B" while the player is in "Sector A". Additionally, the player should be able to swap to another ship in another sector (i.e. to take control over the ship e.g. in case of an enemy encouter). I think, that's the main issue here.

Thanks a lot :)

avatar image Odyssee Outliver · Apr 29, 2016 at 12:45 PM 0
Share

I understand better. Just to add a brick in the different scene proposition; « to simulate "Sector B" while the player is in "Sector A" ». Have no real time fight, an algorithm do the job before your player arrive.

What if you define units categories (bombers, interceptors, cruisers, destroyers) and you define strength and weaknesses of unit categories (interceptors > bombers, cruisers > interceptors, etc.) (or just use your ships raw datas, health, damages, etc.). So you can do an evaluation on how much units has been destroyed over time since the begining of the fight.

And you can have a separate database, and use a global event$$anonymous$$anager for your pirates, trade routes.

If this doesn't please you I'll stop speaking about different scenes x)

Show more comments
avatar image Odyssee · Apr 29, 2016 at 04:59 PM 0
Share

(at the bottom it was the end of the comment tree so i post it here xD )

No, it doesn't ;D In your example, I would caluculate the state that the scene would be put into right after loading, right? I'll have to think about that, if it might be a reasonable compromise.

But to stop talking about different scenes, what about my initial idea about using separate layers for each sector in a single scene and then have some sort of sector-layer-manager-script whatever.. thingy...? ^^ Would that be reasonable or is it a performance killer?

Well done everything can work (breaking open door). About layers and camera, Unity already do Frustrum Culling by default (only calcul what in camera cone) and something else exist wich is occlusion culling $$anonymous$$aybe you can read this.

For you, what is heavy on the CPU/GPU in your game?

avatar image Outliver Odyssee · May 02, 2016 at 09:00 AM 0
Share

The article was kinda helpful but still it looks like I gotta do some serious prototyping first. Thanks so far, Odyssee :)

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.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Playing audio through multiple scenes 2 Answers

Additive Scenes, best way to hide content? 1 Answer

Complicated level change problem 1 Answer

How can I merge 2 scenes into one project? 0 Answers

Unity performance questions 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