🎉 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!

updating NPCs?

Started by
1 comment, last by fingh 22 years, 11 months ago
I took a look at LostLogics book, actually I bought it, and in looking at the MMORPG example at the end of the book, I noticed something important. The update code only updates players. Now, the source for this pseudo-game only loads zones, no monsters/NPCs etc, so this isn''t an oversight or a bug. However, I''m curious what people are doing to keep game entities up to date with clients? Are you using a similar architecture, or something more elaborate since there will probably be more NPCs than players? Gamasutra has a good article on using groupings to keep message traffic down to a minimum, is anyone using this type of technique? Feedback? Comments? thanks Tim (AO) Getaris (EQ) Attrition
Advertisement
Hi Fingh,

You can send entity updates to the players just as you would with sending player updates. The clients do not have to differenciate between a player and an NPC or "entity."

As far as grouping goes, you only need to send entity updates to players that are in the same zone. You could even go as far as to only show them entities that are directly visible to them.


LostLogic
www.lostlogic.com
Author, Multiplayer Game Programming

LostLogicwww.GamerOutfit.comXBox 360 Community Games Reviews and NewsExisled - 2D/3D Shooter for XBox 360

LostLogic,

I''m looking at having a huge number of entities in a given zone (think solar system = zone), so sending updates for the whole zone isn''t too practical. I''m thinking about using a quadtree approach for sending resynch info, so I can send info only for entities the player is likely to encounter soon. Additional data would be sent for the players group (team) members, as well as the players current target (if within a reasonable (but longer) range). I''m not using full 3D, so I think using a quadtree method based on a pure 2D coordinate system will work best for determining where and when to send the resynchs. Any suggestions here?

Also, I have heard that EverQuest uses a 6 second cycle for sending resynch data, any comments on how to prevent noticable momentary lag from the data traffic required for something like that? I want to remain scalable by not bogging down my pipeline, but at the same time I want things to remain very tightly synchronized. The nature of my game allows for multiple players, each with up to 30 (or more!) "units" to fight against a like number of "units" controlled by the environment in a very small area. So there could be ~400 plus entities within range that would require resynchronization with each client that is within the area. Ugh.

Ideas? Comments? Suggestions?

This topic is closed to new replies.

Advertisement