Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / AI in multiplayer with a standalone server

Author
Message
Hell_666
16
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 22nd Jul 2012 20:59 Edited at: 22nd Jul 2012 21:57
Hi, I'm working on a multiplayer fps game engine and I want to add AI.
But the problem is that clients and server are separated exe.

So, I don't know how manage AI by my server.

Can you help me please ?

ps: It's not a code problem but a theoric problem.

Eternal suffering ...

I'm french
Aaron Miller
20
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 23rd Jul 2012 08:36
Are you asking how to actually implement bot AI? That's a complex field and there are lots of potential solutions.

If you're asking which side to implement it on, that'd be server side. (Though, based on your wording, it sounds like you already realized this.)

I have not done any work with AI myself. But for something pretty crude, you'll probably want to implement path-finding. If your levels aren't complicated then this can be fairly easy to do. (If they are complicated then there's also a lot of research here that can be looked over.) I think DarkAI takes care of this, but I'm not a user so I don't know. After that, you'll have bots that probably want to kill their targeted player (maybe even each-other!). You'd just continuously update that bot's path to the player using path-finding. (Mentioned above.)

Something cool you could do is make it so that if a particular player is targeted because the bot is "mad" at him (or her) that the bot will mostly ignore other players until it finds the player. I envision a scene where the bot is walking towards you all terminator styled and some guy pokes his head out around a corner and the bot aims its gun at the head and shoots. Never taking its eyes off of you. Would be really cool and should be relatively simple (in the scope of AI implementation).

Cheers,
Aaron

Hell_666
16
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 23rd Jul 2012 15:54
In fact, I don't know how implement bot AI on the server because the server is extern, so I don't know how make calculs, I need a 3D environnement and I can't code the AI on clients source.

Eternal suffering ...

I'm french
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 24th Jul 2012 12:00
For a FPS you can probably estimate the level layout in a 2d fashion on your server (for example "a wall spans between (100, 400, 400, 200) and should be avoided").
This need not be anything more than a set of values that you can base your calculations off of, no actual graphics are necessary [on the server side].


"Why do programmers get Halloween and Christmas mixed up?"
Hell_666
16
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 26th Jul 2012 00:07
Thanks. I've some problems with it, so for the moment I've cheated, the server reproduces the scene with cubes instead of characters and simulates what it must happens with raycasts and others calculations.

Eternal suffering ...

I'm french

Login to post a reply

Server time is: 2026-07-07 12:28:24
Your offset time is: 2026-07-07 12:28:24