Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: npritchard on August 17, 2014, 05:02:43 PM

Title: Offline / AI Player
Post by: npritchard on August 17, 2014, 05:02:43 PM
Hi there, I'm new to TNet so please forgive me if any of this is obvious or wildly wrong (had a search, couldn't find anything really that useful).

I want to create AI players (completely offline mode), and as seamlessly as possible combining single and multiplayer capability for a real-time strategy. My understanding is that all networked game units are TNObjects, are associated with the TNPlayer via TNObject.ownerID.

How would I go about manually creating/joining AI TNPlayers, so that I can create AI scripts that simulate object management in the same way that a real player would? The main aim being to use the TNObject uuid and TNObject.ownerID association in offline gaming as it would be online.

P.s. saw a similar query on 'Virtual Clients' - however this doesn't seem to maintain the uuid/ownerID association.

Or am I going about this completely wrong....? Thanks!
Title: Re: Offline / AI Player
Post by: ArenMook on August 18, 2014, 12:36:02 PM
AI units would be owned by some actual player. You'd either have them in the scene from the start, or create them with the persistent flag (so they don't get destroyed after the owning player leaves). These AI units wouldn't be created by some virtual player, but by the first player to enter the channel.