Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: Brazilian Fan on October 05, 2006, 01:37:31 PM

Title: Bots On Op2
Post by: Brazilian Fan on October 05, 2006, 01:37:31 PM
Is there any way to play multiplayer maps with bots? or something like skirmish (not colony games)?
Title: Bots On Op2
Post by: Mcshay on October 05, 2006, 02:26:12 PM
No. Op2 bots work on a system of triggers that have to be coded into the mission files. You would have to redo all of the multiplayer maps to have bots in them.
Title: Bots On Op2
Post by: Brazilian Fan on October 05, 2006, 03:48:47 PM
Ok thanks (thumbsup)  
Title: Bots On Op2
Post by: Eddy-B on October 06, 2006, 08:09:37 AM
err.. hacker. Not entirely true.
i am (was) working on a new AI, which could just as well be included into multiplayer maps, as in single player.
So in a way: yes you can, BUT you'll have to wait till it's finished (..if it ever will be .. ?)
Title: Bots On Op2
Post by: BlackBox on October 06, 2006, 01:54:19 PM
err.. hacker. Not entirely true.
I think you meant Mcshay? I haven't posted in this one yet.

It would be entirely possible to create an AI that can play an existing multiplayer mission, whether you create a new 'client' that connects to an OP2 game and plays it as if it was a player, or inject a DLL into the game which causes it to play for a player.

Either way, the AI would have to be more than scripting, it would have to be at least semi intelligent (being able to adapt to changes in the game environment is the key).

And yes Eddy has worked on one some.
Title: Bots On Op2
Post by: Hooman on October 09, 2006, 05:45:53 PM
Heh, yeah, it's sort of possible but a lot of work. I'd given some thought to the DLL injection idea a while back. The idea I had was to use an OP2 client with an injected DLL to issue commands for that player instead of a human opponent. It'd save you from having to write a whole new client, but you'd still have to write a whole new general AI that could adapt to lots of different maps. It's definately a lot of work. I certainly didn't get any farther than a proof of concept with the DLL injection and issuing a few hardcoded commands for a hardcoded player. But the nice thing was it could handle commands for any player on any map, multi or single player. It could also work cooperatively with a player, say only issuing commands when the player doesn't have one queued.

I did have a few concerns with the project though since you could issue invalid packets that weren't error checked properly and cause crashes or weird behavior. I believe I demonstrated some of the weird behavior to Hacker once.

But yeah, other than invalid packets, the AI would essentially have to play with the same rules as a player would (or at least most of them, depending on whether or not you told the game engine it was an "AI" player and hence didn't have to worry about population and such.)