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

multiplayer programming costs money?

Started by
15 comments, last by THE Omega 22 years, 5 months ago
Hi, I''ve got a buncha ideas for multiplayer games and stuff, but I''ve never really tried to do anything related to DirectPlay or Winsock because I assume it''d cost money to maintain the server that people play on or something. Like, I''d have to pay for a server that the player then connects to in order to play the game. I, being another one of the poor high school students, can''t afford to pay for a server, and I''m not at the programming level that I could actually charge someone to play my pitiful games yet. So my question is, are there any alternatives to setting up a client-server structure in my games? I''ve heard of setting up a peer-peer-peer... type thing where each peer has his own connection to every other peer, so if u had 5 people playing in a game, the structure would look like a pentagon with all the diagonals drawn in. Can anyone visualize what I''m thinking about? I heard this was bad though because you have to submit information to everyone instead of just one server. Thanks
Advertisement
How many players is the game for? A game like Jedi Knight uses a client/server method. The "host" of the game is the server as well as a player and everyone else connects to the hosts computer.
Jesus Freak,Jesus Loves you. He is the Alpha and Omega the Beginning and the End.
From what little I know about network programming, peer-to-peer can work for the right kind of game. RTS games for one. AoE2 uses a peer-to-peer setup.

I wanna'' ride on the pope mobile.
Either can work, as long as your architecture isn''t too greedy. Unreal-engine games, for example, can run both a server and a client off of one machine. A ''server'' isn''t necessarily some great beast of a machine; it''s just a copy of the game with the most "exact" copy of game data. If you build your system to have a few different types of physical connections (ie, on the same machine + across a LAN + somewhere over the Internet +...), but only one type of portal from the outside into the inner workings of your game, then you can use client-server networking without too much more difficulty than peer-to-peer.

Hope that Helps,
ld
No Excuses
Mechwarrior 4 uses a client-server architecture. There is a main host that can also be a player and the rest connect to this person. Halflife can work this way too if you don''t setup a dedicated server. I''m assuming Quake I,II,III as well.

I don''t think you want to have peer-peer-peer where each player''s computer is broadcasting to everyone else. For example, you don''t want computer 1 to communicate directly to all the other computers if it isn''t the server.
For testing purposes, you can run both a client and server simultaneously on the same machine. Run the server, and then start multiple instances of the clients. Tell each one to connect to "127.0.0.1" (your machine). 127.0.0.1 is also known as "localhost."
I did what Terran suggested with an FTP sockets program I wrote. I basically moved files around my computer with the client through a socket. I mostly wanted to make sure the files were not corrupted after the transfer.

Problem would come up from starting multiple directx instances. I don''t think Windows likes that. You would just have to simulate your network traffic.
Wow, I never thought about it like that. Thanks everyone. I''d like to know a bit more about the games like quake and halflife, because I''m mostly thinking about implementing multiplayer capabilities in an FPS game I''m visualizing right now. In one of those games where one computer acts as the server and a player, what kind of computer was required of the host? I suppose they''d need one fast computer to handle all the data AND play in the game. And how many players typically play in one of these games? I haven''t really thought too much about this game, but if possible, I''d want atleast 20 players in the same game at once. Is this possible on a non-dedicated server?
The question you should ask yourself is: Can the players(clients) handle that many players ?? What kind of connection speed would they need ?
-------------Ban KalvinB !
quote: Original post by Anonymous Poster
I did what Terran suggested with an FTP sockets program I wrote. I basically moved files around my computer with the client through a socket. I mostly wanted to make sure the files were not corrupted after the transfer.


I would just like to add in here that if you plan on doing a Server <-> Client game, I would strongly recommend that you encorporate CRC (or even MD5 if you are bored) error checking on all incoming data... a bad packet can really do horrors to either side of the connection, and has a good chance of occuring on the internet, especially with UDP.

Gamedev''s AI Auto-Reply bot.
Gamedev's AI Auto-Reply bot.

This topic is closed to new replies.

Advertisement