Hi folks! I've expanded my game world recently to a much larger open world composed of islands created as tiled Unity terrains in Terrain Composer. 9km x 9km is the size of my "home island" for instance.

I'm streaming them via World Streamer and the only issue I have so far is combatant spawners and how to actually handle them as they stream in and out within their respective chunks.

If a spawner is located in an actual streaming chunk, it gets streamed in and activated as it should when the player enters the activation range. That's fine. When the player exits that chunk, the spawner is unloaded but the combatants (as they are now independent of the terrain chunk they were spawned on) are basically floating in the air and not eliminated.

When the player re-enters the area again, the spawner gets reloaded, does its thing and spawns another set of combatants. So, now there are twice as many combatants. This will continue if the palyer exits and enters again.

My question is whether there's a good/simple way to handle this. ORK doesn't have an actual despawn, right? Is there a way to handle this with pooling maybe or some sort of manager that culls spawned combatants globally after a distance check?
  • Hm, I'll look into it, probably needs an option to destroy the spawned combatants when the spawner is destroyed (e.g. due to unloading the scene).
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I tested the newest beta and am happy to report it works perfectly when spawners get streamed in and out. All spawned children are instantly despawned as they should be.

  • @FancyFerretStudios Hi I have a quick question, I'm developing an open world 4.5km x 4.5km, and I'm wondering if I would need World Streamer for a game this size? It seems that world streamer is for extremely large games so I'm not sure if I should use it.
  • @tribbles Well, that depends on some factors such as how much content is actually in your world and whether you are using culling methods like occlusion culling (or something like Mesh Combine Studio) and how many game objects are active at any given time I suppose.

    Are you using Unity terrains, mesh terrains or other (i.e. a space game?) What's your world setup like?

    One of the pros of using World Streamer is that you set up "layers" of streaming with block sizes that get pulled into a "main" scene as the player moves within it. For instance I have my Unity terrains split into 1000m chunks. Those all stream in and out on their own layer. My buildings and some props stream on their own layer and my environment objects stream on their own layer as well.

    So, in my case, the player at any given time is always seeing the terrain chunk they occupy, plus at least one neighboring terrain. But smaller objects and areas are getting released from memory as they enter and exit within them.

    If your world is not that large in width/height but still very heavy with environment content all within one scene I would think streaming would definitely increase performance and optimization.

  • Btw, if you are building an open world using terrains, word is that Unity is about to announce something regarding a new terrain system. It may or may not change the way environments are built and thus handled by third party assets.

  • @FancyFerretStudios
    We are not using Unity Terrain , We are creating our own mesh for the ground/terrain in the world. It will have many foliage and trees in the world, as well as cities, dungeons etc. We are going to use standard occlusion culling as well as Mesh combine optimization, Texture atlas etc. Just not sure if this world streamer is required, but If it works perfectly with ork without issues it may give us an additional 20 % + performance increase.

    World streamer has no problems with Ork right?
  • @tribbles

    I just recently implemented it and need to do some further testing to make sure it covers all possible aspects I can come up with involving ORK. So far I haven't had any problems in ORK other than the spawning issue which Gil fixed quickly.

    I am having an issue with my Compass Navigator losing some data as POIs spawn but I think I can fix that.

    One thing I haven't tried and don't know yet if its floating point "mover" option for gigantic worlds will work in ORK since it moves the world around the player rather than the player moving.
Sign In or Register to comment.