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 / Would this method reduce lag from DarkAI while still having a higher AI count?

Author
Message
HellsDevilDog
15
Years of Service
User Offline
Joined: 18th Mar 2011
Location: Ohio
Posted: 6th May 2012 23:27
So I was thinking of a way to reduce lag with a higher AI count,I haven't messed much with DarkAI nor have I done much with networking in DBpro. Would this method I thought up work at all?



I just quickly thought it up and haven't thought of much detail for it yet, but could someone with more experiences foresee any problems with this? I'm also open to suggestions if anyone has a better idea.

(This'd be for an open world game that'd consist of many AI (Mostly zombies), would I just be better off making my own AI system that does simple movements as zombies don't really do much but head to their target if the target has made much noise or has been seen? Or does anyone know of another AI system used for DBpro that's less resource demanding?)

Thanks for any help!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 7th May 2012 04:12
This is funny...

Are you facing hardware restrictions?

HellsDevilDog
15
Years of Service
User Offline
Joined: 18th Mar 2011
Location: Ohio
Posted: 7th May 2012 08:32
Well glad to see you find it amusing xD

But no, my computer can handle about 2000 AI before the framerate drops below 30. I guess my real question is; would it be possible to share the workload between clients connected to the server? So, instead of the server itself calculating for say 1000 AI, it would give some of the work to the clients (Say 100 AI per client, given there's 10 players connected). I guess it is a silly question, but I would like to know.

Though now that I've thought about it more, it wouldn't be a good way to approach it anyways for several reasons :I
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 7th May 2012 08:36
Funny because I was discussing this very principle the other day

I guess it depends on the capability of networking the AI commands and functions...

My method entailed the data of the AI char positions being handled via the server and the logic by the local computer activated by distance if that makes sense...

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 7th May 2012 13:31
It would mean that you'd have to trust the clients. If this was a multiplayer game it would effectively allow a malicious player to control 30 AI...

[b]
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 8th May 2012 22:55
I am no expert at AI; but if you need to process more AI than the server can handle, and you cannot afford more than one server for the job; perhaps you could share the AI processes into different levels. On one end, a set of actions can only be performed by the server, which are manditory however lightweight, on the other, the clients calculate other more intensive actions, however subject to the server's imposed regulations.

For example, the server tells a character to move to position X in 2 seconds; and the client gradually moves the character to the actual position and transmits the necessary net packets. The server only needs to process a one off timer based position change which is a lighter load than having to process the journey. If you want to be anal, have the server store the position the AI must be in at the given time and impose it.

In other words, make the process of running DarkAI easier on the server.

That's one idea.

Login to post a reply

Server time is: 2026-07-08 01:53:37
Your offset time is: 2026-07-08 01:53:37