Question on access of C#

Dear all,

I’m looking around on which game development kit to use for my research project on Artificial Intelligence. Im creating a 3d world for ‘creatures’ to live in, for whcih I’ll be programming the AI myself. I’ll be having to untether the AI from the Unity in-game clock, so I want it to run on a seperate thread of the program.
Does Unity’s C# give me complete access to the .NET library, so I can create a new thread for my AI to work in?

I want my AI complete seperate from the gameworld itself, so the only thing the game world does is calculate what happens in the world. It produces a list of important information for the creature and posts this every cycle. The creature’s AI reads this list, and decides on actions, which it posts somewhere else, and the game world reads this action and acts accordingly. Both the AI instance and the world are thus basically ‘seperate’ executables, and they only share the two lists (current state, and actions).

If anyone knows this is possible in some other way than multithreading, I’d also love to know that. I’ve read a lot about Unity, and it seems like an awesome environment to work in.

Yours sincerely,
TiRune

You can create an AI Server that runs all the intelligence threads and your game would be a client rendering the NPCs actions recieved from it. Unity uses Mono, and the current version of C# is 3.5, so everything on the Game side of your application will have this restriction. On the other side, you can use .NET and C# 4 (if you´re on Windows). It´s possible to separate the logic from the rendering the way you want, just watch carefully the synchronization. I´m not sure how to do this if you´re planning a web game though, but on a stand alone application just implemente your game and an application and exchange messages between them using a standard network protocol.