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

Geared Towards LostLogic

Started by
12 comments, last by dachande 22 years, 11 months ago
Hey, This post, as the subject describes, is geared toward LostLogic, for he appears to be quite the expert on the subject However, I''m happy to receive replies from anyone, obviously. I am using Direct Play 8... and I need to know a little about it''s inner-workings. When a server receives a message from a client, and it sends to the whole group, via the "global dpnid", this is just a single message that the server has to store right? So what happens next? Does the server go through a loop sending a message to each player one by one? Or is there another pattern? I have come to a point where it would be far better for me to send the messages to each client myself... so if I run through a linked list of all the players and send to them one by one with a normal send function contatinf just one player''s id at a time, is this going to be slower than dp''s send to all command? The main problem I can foresee is that there will be many more messages in the queue... say ... 1000 players.. so thats about 1000 messages going to the server each second or less, that have to run through a linked list and send to all the players that the message will effect (this could be about 10 people per message). With that many messages in the queue, what am I to expect? And is going through a linked list going to be slower than using a send to all message? I look forward to a response, I am very interested in receiving an answer to this question. Thank you for your time, Dachande
Advertisement
Well... I''m definitely hoping that you''re not planning on having 1000 clients running off one machine, unless it''s one of those monster IBM/Compaq things that cost over a $Million.

Ideally, the most clients that you would have running on one particular machine would be around 100 or so. It really matters on how you structure the communications module within the client. If say, you have group/guild chat modes, ideally your client would simply load the group/guild addresses (IP) when you login and get updates every time that there is a group/guild change so that you can simply send the packets directly to the appropriate clients, for zone (machine) wide communications, it would simply be a sendall command made from the zone server, for other types of communication, the server would figure out who would need to hear the event and send to them only.

I''m sure that there are different ways to do it, but that''s the way that I would handle it personally. To me, I want to keep as much load off my servers as possible, to allow for better NPC AI and other background functions that the players would never see. The more that you can offload on to clients, the more features that you can put into your server, particularly better AI.
1000 clients on one machine should be no problem even for a lower end computer. I still don''t know where this "supercomputer" myth comes from. I expect to pay about $1000 for the computer that will run the server for the MMORPG I''m working on. AMD 1.4+ghz, 1.5GB RAM, 20GB hard drive and Win2K Pro.

To answer the question:

Doing it yourself will be slower since DPlay handles it in the background if you do ASYNC messages allowing your server program to move along to the next thing. AYSNC can also be guaranteed.

I never use the all player ID simply because I never have any messages going to everybody. I use a for loop with a series of checks based on the message to send the message to only those people who need it.

Ben
http://therabbithole.redback.inficad.com

Oh...for NPCs I use a modified client. It''s much easier that way since I don''t have to shut down the server to add more NPCs or improve them. One NPC client will handle up to 750 NPCs.

Ben
http://therabbithole.redback.inficad.com
Hmm, I agree with KalvinB. But I might add one thing though. "Multicasting". If you send a mail to ten persons, will it be sent 10 times? No. Only one time. Many "Service providers" support this. If not, I think it basicly comes down to a For...Next loop through all players.


The newsgroup microsoft.public.directx.networkign (or something like that) is a very nice place for such questions, I''ve seen lots of questions about added overhead by DP, etc...


www.persistentrealities.com for Inline ASM for VB, VB Fibre, and other nice code samples in C++, PHP, ASP, etc.<br/>Play Yet Another Laser Game!<br/>
The DP8 docs say "Multicasting is not supported in this release" ?
You really have two options (as you already know):

1. Let DPlay send the packet to everyone for you (grouping)
2. Do it yourself

For using DPlay with a MMORPG, I would create my own queue to send messages to players. It would give you the most control over the system.

In reality, you shouldnt have to broadcast the same message to 1,000 people. Hopefully, you are distributing the load across multiple servers to prevent this.

You can use cheap hardware, it is really the bandwidth that kills you.



LostLogic
www.lostlogic.com
Author, Multiplayer Game Programming

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

Thank you all

I''m taking all advice under consideration!
Most providers do *not* support mutlicasting. It''s prone to abuse such as smurfing.

And I think the thing to do is to have seperate processes for the NPCs as KalvinB suggest. This way they can be on other, and multiple, computers if neccesary.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
quote: Original post by KalvinB
1000 clients on one machine should be no problem even for a lower end computer. I still don''t know where this "supercomputer" myth comes from. I expect to pay about $1000 for the computer that will run the server for the MMORPG I''m working on. AMD 1.4+ghz, 1.5GB RAM, 20GB hard drive and Win2K Pro.


First off, gotta clarify this is not a flame. Sometimes when someone asks a question on a previous post like this it can be interpreted badly, but I am genuinely curious. Thanks.

CalvinB, where did you get the idea that 1000 clients WOULD run on a ''low end computer''? What evidence have you seen that supports this possibility? Unless you have nothing short of players running around in a void, I don''t see how you can handle all of the information processing/sending for that many people.. I could be completely wrong, but if this kind of performance was available it seems like it would be more widespread. I know that Everquest servers are not ''low end'', or any of the other MMORPGs currently out there. I welcome your reply, telling me where you got this idea, because right now I don''t see how it''s possible but I want to know.
I'll be back.---------------------Supervisor: Attention, whoever you are. This channel is reserved for emergency calls only...John McClane: No fucking shit, lady! Do I sound like I''m ordering a pizza?

This topic is closed to new replies.

Advertisement