Sunday, April 15, 2018

Who does the AI calculations in an MMO?


I am building an MMO and want to add NPCs. The thing is I don't know the basic design. What does the calculations, the clients or the server? I would understand the server calculating events and reactions, but when it comes down to pathfinding and position and movement of player, who calculates that?


Who calculates the AI the server or client? I couldn't imagine the server calculating the pathfinding, position, movement and so on. Please I need help understanding this, thanks, anything will help.



Answer



Most MMOs these days have anything important done server-side, for safety reasons. You can't off-load much to the client, which is why one of the first things axed are AI routines. I think most developers consider client-side to be hackable as a rule, not an exception.


Scalify's Badumna ( http://www.scalify.com/badumna.php ) tries to off-load part of it on the clients in that they'll have calculations done client-side and sent to each other; some data is also sent to an authorative peer to be validated before it's passed on to clients, just like a dedicated server. The issue is that ALL data in a multiplayer game MUST be sent through an authoritative peer if you want to prevent cheating. I brought up Badumna as it seemed the closest to what you might want, but even that won't be able to catch cheaters -- it might catch some, but anything critical (ie. everything, pretty much) has to be done server-side.



I might expand some on Badumna, because it could still be something you'll find useful (but I urge you to reconsider off-loading anything important on the clients, because the clients WILL cheat).


Badumna offers a hybrid architecture for data operations. It provides complete control to the developer in deciding what is critical (and must be verified) and what isn't (and so can be sent by the decentralized network).


If an MMO requires that every single bit of information has to be verified then Badumna will function as a client-server solution. However, I believe that there are different categories of MMO applications with varying requirements. For example, quite often an MMO will have combat zones where players are likely to cheat and hence every bit of information has to be verified. However, there are also zones where players can only walk/run/dance/chat. Such zones do not require complete verification and can utilize Badumna's decentralized network and benefit from the scalability that it can offer.


Secondly, Badumna provides additional security features that developers can access such as identity protection (so that users cannot pretend to be someone else), complaint proxy (allowing clients to be configured to report malicious/cheating players to a trusted source), and black listing (banning malicious players from the games).


I've not really explored Badumna that much, so there migh be issues and features I'm unaware of, but at least I've given a cursory glance on it.


tl;dr: the client should really just be a keyboard and mouse hooked up to the internet.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...