🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

MMORPGs & AI - spreading it on clients

Started by
25 comments, last by Ysaneya 23 years, 11 months ago
Just a not-so-crazy idea.. We''d all like to have an increadible AI in MMORPGs.. but it requires so much CPU power.. What about making each client manage 2 or 3 NPCs ? With 2000 online players, it would mean 4000-6000 smart NPCs.. Only problem.. security. If the player hacks his client, he could also modify how the NPCs behave. Comments/suggestions..? Y.
Advertisement
That is a great idea! I wish I knew more about security so that I could have some input. Anybody else?
======"The unexamined life is not worth living."-Socrates"Question everything. Especially Landfish."-Matt
I think it to be a good ideal... I suggest you see a couple issues back "Game Developer" which had some info regarding online games and security/hacking.
Basically the problem is that this data would be on a players computer, in memory and someone would fiqure out how to find/exploit this memory
Another problem would arise when a player logged out of the game... the information that his machine was handling would have to be "handed back" to the server. Now that I think about it this could be harmful as memory would have to be re/allocated etc...
Hmmm, now that I think about it, why not just have a smaller machine "on site" that would handle the NPC/MOB AI? This, possibly, is a good place for a COM+ component.
Or another server that just answers the "main" servers request.


Dave "Dak Lozar" Loeser
Dave Dak Lozar Loeser
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."--anonymous
Once you start talking about thousands of players with thousands of NPCs, the effort in managing it all makes it far more practical to use a high-powered really expensive server. There really is not practical way of putting information on a clients machine that is unhackable without making it unusable on that machine. Encryption on the level that would make it safer from hacking would likely eliminate any gains you may possibly get from the distributed processing.

Beyond that, I really don''t see the whole point in playing a game with thousands of other people. You''re never interacting with more then a handful of them at any one time, and you''ll never become even familiar with a few hundred of them at the very most. One of the lead developers of UO (or maybe a group of them) once wrote up a list of laws to online gaming. One of those laws was that a community could only be maintained up to about several hundred people. Beyond that you simply ended up with sub-communities at best, isolationism at worst. I think games like UO, EQ, and AC would be a lot more enjoyable to most people if they were broken up thus, providing smaller servers limited to a few hundred people. That sort of environment is far more conducive to creating a successful community, and that is the entire goal of these type of games, isn''t it?

And thus I have rather high hopes for Neverwinter Nights for that very reason, as well as a few others. The other primary one being the amount of control the gamers will have over their individual environments. I can''t wait to see how closely I can replicate the Pen & Paper campaigns I''ve experienced with this game. If they''re even half as good as the P&P experiences, they''ll be far and above any computer game out there today.
quote: Original post by Ysaneya
What about making each client manage 2 or 3 NPCs ? With 2000 online players, it would mean 4000-6000 smart NPCs..
..
Only problem.. security. If the player hacks his client, he could also modify how the NPCs behave.


Distributing the processing for something as critical as the AI could be very tricky. You hit on one big issue, security. There is no such thing as an unhackable client. If your client processes game AI, someone *will* hack it. Encryption is a deterant, no more. Everything needed to encode / decode must be there in an unhacked distro right? So a really determined hax0r will be able to use your distro against you... Not to mention that encryption takes more CPU and bandwidth.

Here is the biggest problem I see. Latency and transmission times. You can''t put time sensitive code on remote machines, it will turn around and bite you (esp. on the Internet). If a player has AI for characters A,B,C,D,E running on their system and is on a crappy dial-up account, everyone who needs those AI routines is going to suffer. Worse, if player is some loser who forgot to disable call waiting, click. The game will suffer as a whole. If you think that UO is laggy, wait until you are fighting that monster who''s AI is running on LandFish''s PC and he steps on his power strip trying to respond to the LandFish signal....

You did win 6 LandFish points by posting a suggestion for better AI and MMORPG''s though...

ManaSink
Ok, first off.. security is an issue.. but not the utmost in some respects.

If a client were to exit ungracefully, you lose info. Not only that, but the server could get stuck waiting for them. Other people in the area suddenly see the AI die. lol stealing CPU time would not help, you would merely upset people who have overclocked celery processors. Their machine couldn''t handle the high-stress load, and you''d end up crashing them.

Landfish, to give you an idea of what Mana spoke of.. all code within the client has to be readable. You can encrypt data, but data is not code. Code is that which does something to the data Now, you have a string of encoded data. You can track down the process that encrypts the data, and then tear the process appart. You can even go so far as to catch the function calls before they''re executed and send erroneous messages. This is not all that hard to do. In an MMORPG you do NOT want any data on the client end that can change data on the server end. That is the only way to make it work. The client can only update the position of the user based on where they currently are. Any attempts to move in an incorrect manner will result in account termination.
I remember hacking NeverWinter Nights. Boy was it easy Your location was stored as an X Y Z. X and Y being coordinates and Z being map number. You could easily go anywhere, anytime The games had no checks on continuity of client movements. This wouldn''t be all that hard to do if the server was designed for it. The lost processor time is made up for security. If this was on the client end, someone could still potentially do it by blocking the client''s ability to check this move. This was discussed somewhere else on GD.net about how clients that check for collision detection could be hacked to make collision detection turn off. This means you could walk through walls Sounds fun, eh?
There''s a LOT more security issues surrounding client/server comms, but if you make your own transfer protocols and commands, people will have a MUCH harder time figuring them out

J
> Hmmm, now that I think about it, why not just have a smaller machine "on site" that would handle the NPC/MOB AI? This, possibly, is a good place for a COM+ component.

First, i''ll answer this question The idea is to make a very advanced AI, which is impossible to do nowadays with one or two machines, even if they''re very powerfull.

So my basic idea was: why not making the client''s machines do part of the work ?

Think about it: thousands of machines available to do the calculations ! Managing 2 or 3 NPCs on a client is probably possible, without loosing too much performance.

Bandwitch doesn''t seem to be a problem either. You''d just need to send as a result the actions of the NPCs to the servers (like: NPC X::go to place xyz). For 2 or 3 NPCs, i doubt it would cause some lag.

Maybe you could also add a sort of scalable thing: the better the connection and the speed of a client''s computer, the more work it''ll do. Thus, low-end systems won''t suffer from this process.

You could also make things more "dynamic". The server could decide what NPCs your computer should handle, and add/remove some during the game. It could also decide how much work your computer should do: does your NPCs only decide their new destination point ? or does it handle how they speak ? and how they behave and feel ? And why not think of.. sharing this job for a given NPC between many clients ? Like one client would handle NPC X movement, and another client would handle NPC X talk.

I agree it''d be quite difficult to implement. There are so many problems. But think about the AI we could build that way..

Again, i tend to believe the main problem is security. Is it possible to detect if a client is making advantage of the AI data running on his machine ? Encryption is a solution that only make the problem appear later. It''s a matter of time; if there is critical data on the client, it *will* be hacked. So, i''m searching solutions,

1) to detect the hack;
2) to make it useless to hack.

Any ideas..?

Y.
It''s simply not possible. The client is an unpredictable problem. There''s no way to "hide" anything on a computer, period. Bury it again and again and it''s still easily found. Windows isn''t so easy to hack as Linux might be, but it''s still easy to people like me And i tell you flat out. It would never work.

J
I never asked how to hide the data on the client.. i know it''s a critical problem. You can make it become very difficult to hack, but not impossible.
That''s why i''m searching a way to detect if the client was hacked, or to make it useless for the player.. like if he succeeds, he gots no advantage of doing it.

Y.
Creating the unhackable client is impossible. You might have 10 highly-paid programmers working on the task, but your player community will have 20 highly-intelligent student hackers trying to undo all your work. Chances are, they''ve hacked more games than your developers have made, too.

Remember, if someone can hack the client''s functionality, they can hack around any ''hacker-checks'' you care to implement.

I believe Niphty and I discussed this briefly on another board a little while back. Security issues make any client a vulnerable target and the less you trust to it, the better. The only truly safe client is something like a telnet or mud client, as they only display the ASCII stream that is sent to them. You can process that however you like, but there is no way of extracting ''extra'' information from it.

This topic is closed to new replies.

Advertisement