Using messaging services in multiplayer games
I am an experienced programmer who is a newbie to gaming. We are building a LAN based game and I am at a point where I have to select an option for distributing events on the network. I have 2 options:
- Use a message oriented middleware like MSMQ or COM+ event service. The benchmarks are quite interesting. I believe using this would save me the headache for writing and optimizing event distribution code in my doing event management. The advantage that I see is that I can do a selective event subscription as the distribution managament is something that the messaging service is doing.
- Use multicast and develop my own code for event distribution and management within the working modules. The disadvantage that I see is that all modules have to catch all events and analyze whether they are interested in those events.
I am not inclined to use directplay. It is an unnecessary abstraction over the low level networking and threading APIs and I wonder why it is there in the first place.
Are there any people that can advice me?
I would prefer writing my own messaging system, especially if there is low bandwidth available. With your own custom system, you can make sure that you know absolutely everything that the system is doing and that all the excess fat is cut from it.
Disclaimer: "I am in no way qualified to present advice on any topic concerning anything and can not be held responsible for any damages that my advice may incurr (due to neither my negligence nor yours)"
If the game is going to be a LAN only game I would probably use a TCP solution. TCP over a LAN is great because you do not have the overhead of resends that you would have over a WAN and the messages get there in order so you don''t have to do that yourself. UDP over a LAN would work too but in the event that a packet was recieved out of order you would have to code reliability into you networking code which TCP already has. If you want your game to run on a LAN and across the internet then building a reliable UDP protocol is the way to go.
The question that I would ask would be "should you use multicast?"
I''ll let you answer that question on your own but I won''t leave you without some reading material.
Following these links to some interesting and informative discussions (you will need a login at Gamasutra for some of these articles):
1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond
Using Groupings for Networked Gaming
Network Game Programming
Parsec Networking Architecture
There''s even a great article here on GameDev that discusses Multicasting using DirectPlay.
Advanced WinSock Multiplayer Game Programming: Multicasting
Good luck,
Dave Dak Lozar Loeser
The WM_NULL message performs no operation. An application sends the WM_NULL message if it wants to post a message that the recipient window will ignore. - MSDN
The question that I would ask would be "should you use multicast?"
I''ll let you answer that question on your own but I won''t leave you without some reading material.
Following these links to some interesting and informative discussions (you will need a login at Gamasutra for some of these articles):
1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond
Using Groupings for Networked Gaming
Network Game Programming
Parsec Networking Architecture
There''s even a great article here on GameDev that discusses Multicasting using DirectPlay.
Advanced WinSock Multiplayer Game Programming: Multicasting
Good luck,
Dave Dak Lozar Loeser
The WM_NULL message performs no operation. An application sends the WM_NULL message if it wants to post a message that the recipient window will ignore. - MSDN
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
"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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement