Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Game world simulation for computer controlled player

Discussion in 'Game Design' started by Kequc, Jul 21, 2016.

  1. Kequc


    Oct 23, 2015
    I'm working on a little strategy game that involves some base building and sending "agents" to an opponent which will try and infiltrate them. When your agents are in their base there is a small representation of the map available which provides a birds eye rough approximation of what's going on.

    Your agents behave autonomously and the idea is to train them up before sending them, so that they behave in the way you want. Since you have no direct control over their behaviour.

    In a multiplayer scenario against an AI player their base needs to be simulated. Is it ok or very resource intensive to have a second base operating someplace out of view in the same game world which perhaps doesn't have graphics? Since it's out of the way would it having graphics even make much difference? I think it will need to be a fully simulated environment because physics are involved.
  2. MV10


    Nov 6, 2015
    It's certainly OK and shouldn't be very difficult to accomplish -- at a very high level, when you're running through your player content updating whatever is on screen you just skip over any players flagged as AI. But nobody can tell you how it will perform, that's entirely dependent on how you build it.

    Obviously there is graphics performance to consider (also implementation-dependent) but generally speaking if your other background-processing is starting to be a performance problem, you will probably need to break it up so that only part of the total workload is processed on each pass. Look up CoRoutines as a possible starting point. There is also a decent short intro in the Unity Tutorials area.