World Design Question

I have several questions for this.

1-if I make one huge map with 3D tiles for the ground, can I make LOD levels for them and not have a impact on performance when they are culled? Or use a terrain slicing asset?

2-same question as above but with objects as buildings, props, etc? This is a huge world with hundreds or even thousands of assets.

3-AI, which is the best way to handle this? In a huge world with thousands of enemies. I am thinking a empty game object with a very simple spawn script, and player has a giant collider that activates the spawn script and spawns a enemy from a pool. When enemy exits this collider it gets disabled and placed back in the pool.

4-just need a few different way to do this to get an idea how to setup the right way for my specific application. I have Googled this topic. Links would be appriciated too.

Thank you: James

Hi there,

There’s a wealth of resources for something like this with a google search, but maybe this will give you a good idea of where to begin. I suggest to keep looking well beyond this thread.

A giant collider is one way to go, but it gets a little confusing and difficult to control depending on the situation. My recommendation is to use Vector3.Distance to measure your distance from an array of all tiles. In order to get your tiles in an array, you would either make a list and add them to the list on initialization, or tag them and add them to an array. There’s a few different distances you can go by in order to determine where you should stop rendering, but perhaps you can start by using Camera.farClipPlane (the maximum distance that your MainCamera can see). Once you have that set up, you can just query the array, and disable/set inactive the gameObjects that aren’t in your viewing distance.

As far as AI goes, it depends on how efficient you really want to be. Something like above would work, and just reset position and health of AI character when you go out of range. For instance: You approach AI character spawner, it spawns the AI character and he starts his patrol. You go out of range, he gets reset to his initial position and gets disabled. There’s specific situations where you should destroy, disable, or inactivate depending on what the script attached is doing (invoking, updating, etc.) but that should get you started.

Anyway, I hope this has given you a good idea of where to start. If you need any specific script references, let me know!

Good luck with your game!

hi…I impressed for ur question.bcoz i’m working a project like you…

1.better to use viewport for you map.or if u want tile map once you check this forum 1.google 2
2.There are many assets in unity3d for generate a world with custom objects like buildings,roads,trees,cars like that 3.
3. Ai system u can find easyly by standard assets in unity5.
4. take book and paper and draw ur plan start your work.with out blue print u cannot go through.

all the best. let me know if u want more.