1
\$\begingroup\$

TL;DR: What approach should i use for streaming a maps assets?

My Unity project so far saves terrain meta data (in a flat file for now) and then streams the map as the player moves.

Upon completing this, it was clear that if I wanted to stream anything, its information would need to be stored somewhere.

With all this said, do I store my entire map's information in a local db or something?

For example, where object X must be, where objects C must be, etc etc. Instantiate everything at run time when that particular tile gets streamed.

This seems like a solution an inexperienced game dev (me) would come up with.

\$\endgroup\$
  • \$\begingroup\$ The method you describe sounds like it would work just fine. How have you tried implementing it so far? Did you run into any problems along the way, or any undesired outcomes? We can help you solve those issues if something isn't working the way you want, we just need more details about what's holding you back. \$\endgroup\$ – DMGregory Aug 31 '19 at 22:02
  • \$\begingroup\$ Thank you for the response, I have not tried implementing it yet as my question pertains more to the theoretical side of thing. I can accomplish it comfortably, it just feels like there is a better solution. It seems almost pointless to store information unity holds(scene setup). Was wondering what techniques are used to stream scene information \$\endgroup\$ – cranial3 Sep 1 '19 at 9:42
  • \$\begingroup\$ Presumably you considered using the built-in LoadSceneAsync to load scene files in the background? \$\endgroup\$ – DMGregory Sep 1 '19 at 11:38
  • \$\begingroup\$ yes, but it seems like bad practice to make each tile(terrain chunk with all assets) into a scene? You have however reminded me of subscenes(which is part of unity ECS), I think i will look into that. \$\endgroup\$ – cranial3 Sep 1 '19 at 12:29
  • \$\begingroup\$ I'm a bit confused. You seem to be saying both "it seems like a bad idea to store in my own file something I could store in a scene" and also "it seems like a bad idea to store this data in a scene" - maybe we need to unpack a bit more what specifically this "seeming like a bad idea" entails from your perspective. Have you done any tests or measurements that demonstrate an unwanted consequence from either approach? \$\endgroup\$ – DMGregory Sep 1 '19 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.