Mirage Source
Client side AI(SERIOUS TOPIC) - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Client side AI(SERIOUS TOPIC) (/showthread.php?tid=2662)



Client side AI(SERIOUS TOPIC) - Dragoons Master - 31-03-2009

[Image: SeriousCat.jpg]
Beside the jk, really serious topic.

Back to Topic:
This is only an imaginary possibility.
I'm really intrigued with this idea. It's not safe at all, but I'm really high on coffee and it's 1:52 AM, so I'm just gona keep typing.
You can split the processing over the clients but how to make it safe? That's what's intriguing me. I can't remember who said my AI could be used here, double checking or something, but my AI is kind of random (always short path, but random). So maybe instead of sending only the chosen path, send both paths, there are probably going to be only 1 or 2 different paths with same distance, so x(>=2) different clients calculate the paths and send back to server, which compare the results and make sure they are all the same. It they are not, choose the most common answer. It there is no common answer, server calculates the path it self. But maybe it's too much time for the server to wait for all the answers, so there should be some kind of trigger to speed up things.
What you guys think?


Re: Client side AI(SERIOUS TOPIC) - GIAKEN - 31-03-2009

You need to pre-calculate every possible path into a look up table, then when deciding which path to take you just use the look up table for instant access.


Re: Client side AI(SERIOUS TOPIC) - Joost - 31-03-2009

Quote:If Im correct, Dragoon posted a proper AI tut, but it would be too "heavy" for the server to use. Moving a bit of the calculations client-side to reduce server-stress would not be that big of a deal, would it? With multiple people on the same map, server couldeven go as far as compare results, and with only 1 person on that map, the server can make some quick guesses what the best way is, check if 90% of those guesses are correct based on the client's AI results, and if not, take over AI itself.

Reduce stress on the server, multiple users doing the same calculations for increased security in populated areas, and single-users being "monitored" by what the server "thinks" is right, without any difficult calculations.


Again, I don't say this is a great idea, it obviously has it's downfalls. But currently, MS ai is crap, and all tuts for upgrading exponentially increase server load. So this IS an option. It should not be swept off the table without discussion like Fox tried to do.

Gg, ez as fuck.

Quote:But maybe it's too much time for the server to wait for all the answers, so there should be some kind of trigger to speed up things.
What you guys think?
NPC move time is one second anyway, should be able to have it done within a second.


Oh, again, I never said it was a great super idea. But Fox was being a huge asshole, so had to prove him wrong.


Re: Client side AI(SERIOUS TOPIC) - Pbcrazy - 31-03-2009

I was the one saying that it could be done client side (then i pretty muchly got chewed out, all well :S ).

Possibly, instead of waiting for all the answers, the Server just takes the first one it gets after sending out the last batch of packets, and then it will send them out again, every second, or whatever it is.

I'm not sure, the whole reason i brought it up was to help reduce stress on the server, so having to wait for all of the answers, and then running through a check may be adding the same or a lil less stress, plus it's waiting too.


Re: Client side AI(SERIOUS TOPIC) - William - 31-03-2009

A game handeling the AI client side, I have to think about this. hmm, for the client to process the AI, it would have to send it to the server.. eh.. this doesn't seem like a very smart idea. All clients would do the same calculations sending the same results to the server. Or am I totally off now. Can't figure out why you want it in the client. Your talking about npc AI now right, hmm.. why would I want it in the client. To reduce server stress, but, instead of the server processing the data. He needs to accept it over and over again - hence storing it. hm.. I'd have to say it's way smarter to store the ai on a separate server rather than in the client.


Re: Client side AI(SERIOUS TOPIC) - Pbcrazy - 31-03-2009

thats what i was kinda beginning to think... just wasn't sure how smart that was xD


Re: Client side AI(SERIOUS TOPIC) - Dragoons Master - 31-03-2009

It's not smart at all xD
I'm just wondering how it can possibly be made.


Re: Client side AI(SERIOUS TOPIC) - William - 31-03-2009

Dragoons Master Wrote:It's not smart at all xD
I'm just wondering how it can possibly be made.
There are a few different methods I can think of. If you really are interested in them I can you give you my thoughts on gtalk.


Re: Client side AI(SERIOUS TOPIC) - Dragoons Master - 31-03-2009

Post them here Big Grin This way we can have multiple thoughts at the same place, for comparison ^^


Re: Client side AI(SERIOUS TOPIC) - William - 31-03-2009

Each client will handle the exact same AI, however the tricky thing is that when you login to the game. The whole AI needs to be filled with information. This data needs to be sent to the client from the server obviously - hence the server needs to get the data from another client right away OR: the server could store all the data which would be the best option. Just imagine if the AI is handled in the client and no client is connected, if a new client connect he will have no actual data to work with. Unless you reset all the data and all npcs/bosses would respawn right away. Good way to respawn monsters and this would happen if you don't store all the data. So obviously the server will need all the data. So, let's say 2 players are online. Both are on the same map. The strange thing in this scenario is that you would need a planned AI for the monsters if you don't want to process movement in the server. If you don't have planned movement for all NPCs your ai would still be server based because it will have to decide what way the npc walks and send that to both clients. Seriously, the more I think about making it client based. The more angry I get that it's not really possible in a good way. It's a terrible idea to have the AI in the client unless the clients communicate directly to eachother or something like that. Anyway, someone else will have to brainstorm now.


Re: Client side AI(SERIOUS TOPIC) - GIAKEN - 31-03-2009

Why not have 1 client handle movement?

Client 1 logs in, starts up AI, sends NPC move to 3x6y, server sends to all but client 1, client 1 logs off, switch goes out to client 2 to start it up till client 1 logs in again.


Re: Client side AI(SERIOUS TOPIC) - Coke - 31-03-2009

Basically you can do a load of shit client side then dedicate more server power than you would of used anyway doing checks and securing and sanitising the completely unreliable information being received from the client.

Or, you can wake the fuck up and question why no other online game has even given such a stupid idea half a moments thought.


Re: Client side AI(SERIOUS TOPIC) - GIAKEN - 31-03-2009

Yeah this is a really stupid idea /agree Fox.


Re: Client side AI(SERIOUS TOPIC) - Pbcrazy - 31-03-2009

i believe i agreed too before, (after i got chewed out...)


Re: Client side AI(SERIOUS TOPIC) - Jacob - 31-03-2009

Enhancing game-server AI with distributed client computation Interesting read.


Re: Client side AI(SERIOUS TOPIC) - Joost - 01-04-2009

Fox, stop trying to use your non-arguments, it's getting boring.

Dugor, nice find.


Re: Client side AI(SERIOUS TOPIC) - Matt - 01-04-2009

Fox Wrote:Basically you can do a load of shit client side then dedicate more server power than you would of used anyway doing checks and securing and sanitising the completely unreliable information being received from the client.

Or, you can wake the fuck up and question why no other online game has even given such a stupid idea half a moments thought.

Kal Online.

Handles 90% of everything client side.

You lose.


Re: Client side AI(SERIOUS TOPIC) - Dragoons Master - 02-04-2009

Stop fighting. I started this thread agreeing that it IS a bad idea.


Re: Client side AI(SERIOUS TOPIC) - William - 02-04-2009

Dragoons Master Wrote:Stop fighting. I started this thread agreeing that it IS a bad idea.
Indeed, but it bothers me that I can't figure out a good way for the client to handle it. It just doesn't feel like there is one.

I deleted the off-topic posts.