MMORPG NPCs
I am currently writing a MMORPG and am going to have to implement the AI system soon. One of the ideas I am toying around with is having random users'' computers controlling an NPC or two. The system wouldn''t be too intensive as the AI are generally limited to a fairly small area (generally in a rectangular form). If I could have the server keep track of the NPCs in a database and just have the clients pass in the data when they are passing in the data for the actual user''s player, I could save a lot of server strain. I''m looking at having several thousand AI controlled characters walking around and I don''t want the server worrying about all of those.
Here''s what I was thinking:
-Server spawns AI as needed by the game (decided by certain variables in the game)
-Server takes control of the AI and assigns it certain variables as to its environment and behavior (boundaries, levels of aggression, general statistics)
-Server passes the data to a client which takes control of the AI based on its set paramaters
-If AI hasn''t been updated in x seconds or the user logs offline, the server regains control of the character and looks for some other client to control it.
These clients would likely be in the same region as the player so that they would not have to load a different area of the map for each.
Any thoughts on this system? Think it would lessen the server strain or will the server work appx the same amount through delegating the NPCs.
Ooh is THAT ripe for exploitation!
Dave Mark
President and Lead Designer
Intrinsic Algorithm Development
"Reducing the world to mathematical equations!"
Dave Mark
President and Lead Designer
Intrinsic Algorithm Development
"Reducing the world to mathematical equations!"
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
Just what I was thinking Dave. Write a packet sniffer to see what information is being sent back to the server about the NPC... then start screwing around with the data... have the NPC NOT shooting... or not swinging its weapon... make the NPC blind or deaf!
Azulus, from what you have said its clear that you are concerned with the computational load of updating thousands of NPCs on a single server.
There are several answers to this that dont involve using players PCs to share the load. Here''s two:
1) Use a cluster of machines as your server; or
2) Update only those NPCs that are actually in the field of view of players.
Good luck,
Timkin
Azulus, from what you have said its clear that you are concerned with the computational load of updating thousands of NPCs on a single server.
There are several answers to this that dont involve using players PCs to share the load. Here''s two:
1) Use a cluster of machines as your server; or
2) Update only those NPCs that are actually in the field of view of players.
Good luck,
Timkin
I have a Game Server running on one computer and NPC servers running on whatever number of PCs I need. NPCs are controlled using a modified player client and the server can't tell the difference and doesn't care. One NPC client can control any number of NPCs.
I made exactly 0 modifications to the server to allow for any number of NPCs.
Ben
IcarusIndie.com [ The Rabbit Hole | The Labyrinth | DevZone | Gang Wars | The Wall | Hosting ]
[edited by - KalvinB on July 6, 2002 3:57:19 AM]
I made exactly 0 modifications to the server to allow for any number of NPCs.
Ben
IcarusIndie.com [ The Rabbit Hole | The Labyrinth | DevZone | Gang Wars | The Wall | Hosting ]
[edited by - KalvinB on July 6, 2002 3:57:19 AM]
I think running NPCs on client machines could work, but only if a client had no control of any NPC anywhere near him. If the player couldn''t tell what effect editing the packets had, it would be a lot harder to make some kind of cheat. Also, the server could pick a few NPCs randomly and run them for a few seconds and compare that to what the client was generating. Assuming server and client used the same random seed, the algorithms should make the npcs do the same thing, so if they differ the client is somehow manipulating the data sent and can be warned, kicked, banned, etc.
"The Requested Information Is Unknown Or Classified" -Anonymous
"The Requested Information Is Unknown Or Classified" -Anonymous
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
But is it worth the effort? If you''re going to have lots of people playing the game, then just provide lots of machines for the server... its not like they all need monitors, cd roms & video cards etc... a box with power supply, m/b, cpu, ram and network card wont set you back that much... I guess its all an economy of scale.
Cheers,
Timkin
Cheers,
Timkin
Well, there were some good ideas pointed out. Several things I am considering now are:
1.) Setting up a separate server or two which will just run the NPCs.
2.) Having my own modified client (like said above) to run the NPCs and setting these clients up on computers where they won''t be abused and are on high-speed connections. This could probably be done with 10-20 well placed clients, that''s still a lot though.
Also, only NPCs which are within a certain area of a player will be updated, I hadn''t really intended on updating the ones which can''t be seen. However, they will continue to be spawned where they can''t be seen. If anybody else has any other clients, let me know, thanks.
1.) Setting up a separate server or two which will just run the NPCs.
2.) Having my own modified client (like said above) to run the NPCs and setting these clients up on computers where they won''t be abused and are on high-speed connections. This could probably be done with 10-20 well placed clients, that''s still a lot though.
Also, only NPCs which are within a certain area of a player will be updated, I hadn''t really intended on updating the ones which can''t be seen. However, they will continue to be spawned where they can''t be seen. If anybody else has any other clients, let me know, thanks.
I just run the NPC clients over the LAN and one client (933 PIII processor with Win2K and 256MB ram) can handle 750 NPCs per second. I had one running 12,200 to test the abilities of the server. The biggest slow down was the 10Mbit lan. It''s now 100Mbit but I havn''t done any testing since.
It really depends on what your NPCs are doing and how optimized your code is.
Ben
IcarusIndie.com [ The Rabbit Hole | The Labyrinth | DevZone | Gang Wars | The Wall | Hosting ]
It really depends on what your NPCs are doing and how optimized your code is.
Ben
IcarusIndie.com [ The Rabbit Hole | The Labyrinth | DevZone | Gang Wars | The Wall | Hosting ]
This came up in a discussion on IGDA and I''ll say what I said there:
How do you decide what load goes to who? Client CPU load? CPU speed? Connection speed? Connection lag?
This is something that I just don''t get about MMORPG makers, the one thing that gamers always want is better NPCs, smarter opponents. MMORPGs give you something that you could never get with traditional games: Unlimited computing power for AI. You want more power? Just add more machines. Upgrade the existing machines. You have a consistent, projectable income and the LEAST of your worries are your bandwidth and server costs. They are nothing in comparison to your personnel costs. Figure out how to minimize your customer service costs, don''t figure out how to use your customer''s computing power to minimize your computing costs. You''ll waste time and money on a worthless effort.
As someone else said: Cluster. It''s really the only good way to make an MMOG anyway if you don''t want the whole silly Everquest ''zoning'' thing.
The options that you''re considering are basically the same thing though. Dedicated servers (which is just an overpowered workstation) to run the NPCs or workstations (which is just an underpowered server) to run the NPCs with a modified client.
If you''re worried about the game servers handling the AI, make the areas that the servers are handling smaller, so that the NPCs won''t have a chance of overloading it. Honestly, if you''re worried about having a problem with overloading your servers like they are right now then you have a LOT of optimizing to do before you''re ready to go to early Beta anyway.
How do you decide what load goes to who? Client CPU load? CPU speed? Connection speed? Connection lag?
This is something that I just don''t get about MMORPG makers, the one thing that gamers always want is better NPCs, smarter opponents. MMORPGs give you something that you could never get with traditional games: Unlimited computing power for AI. You want more power? Just add more machines. Upgrade the existing machines. You have a consistent, projectable income and the LEAST of your worries are your bandwidth and server costs. They are nothing in comparison to your personnel costs. Figure out how to minimize your customer service costs, don''t figure out how to use your customer''s computing power to minimize your computing costs. You''ll waste time and money on a worthless effort.
As someone else said: Cluster. It''s really the only good way to make an MMOG anyway if you don''t want the whole silly Everquest ''zoning'' thing.
The options that you''re considering are basically the same thing though. Dedicated servers (which is just an overpowered workstation) to run the NPCs or workstations (which is just an underpowered server) to run the NPCs with a modified client.
If you''re worried about the game servers handling the AI, make the areas that the servers are handling smaller, so that the NPCs won''t have a chance of overloading it. Honestly, if you''re worried about having a problem with overloading your servers like they are right now then you have a LOT of optimizing to do before you''re ready to go to early Beta anyway.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement