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

1st steps for making a game multiplayer?

Started by
2 comments, last by frob 3 years, 4 months ago

Hello,

Besides knowing that we need to rent servers, the entire process is a bit amorphous to me.

Does anyone know the step by step process to make a pc game multiplayer?

If we release on steam, does steam take care of teh multiplayer hosting?

Our company homepage:

https://honorgames.co/

My New Book!:

https://booklocker.com/books/13011.html

Advertisement

Steam can take care of “matchmaking” and “lobbying,” but it will not take care of hosting. However, if you're OK with players hosting the game server, then a good Steam multiplayer integration is good enough. This is the model where one player “lists” a game in a game browser, and other players “browse” for that game and “join” it.

If you need persistent worlds, and server-authoritative decisions about things like microtransactions or leveling up or whatever, then you need to host your own servers. You can still do this and list the servers through the Steam APIs, but you need to make sure your server computers keep running, and keep listing themselves as available, so players can join them, and rent more servers if the game is popular, and so forth.

There's also a system more-or-less-similar to Steam in the Epic Online Services ecosystem. It's newer, but Epic is trying to make it really easy to get online if you actually have a working game. Also, their system has been validated by serving Fortnite, which is a pretty large player base ;-) (Your game still needs to be good, too, of course.)

enum Bool { True, False, FileNotFound };

GeneralJist said:
Does anyone know the step by step process to make a pc game multiplayer?

There is no one-size-fits-all model.

What networking model fits your game? Are you better with a star topology with a central server, or a mesh where all players talk to each other? Does the game require continuous communication like an action game, or can you handle turn-based commands like chess or even older RTS games? (Many popular RTS games back in their golden age ran at 4, 5, or 6 turns per second, in lockstep).

If you decide to go with a star with a central server, will that be one of the players or a dedicated host? Many games have tried the options, some picking a computer that is best connected to the mesh that also has adequate performance, many others require a dedicated host server.

Are you using an engine that favors a model? If you're using UE4 the system is already implemented and debugged around a monolithic host on a dedicated server, although you can make it work in other modes or abandon it entirely and write your own communications code.

Once you're in the game, how do you intend to network it? A physics-driven simulation is a terrible fit for networking but can be done with care. FPS games where you can articulate clear rules about interest management (only transmitting information people need to know at any time) you can control bandwidth at the expense of tracking more historical information. Or are you writing a game with a simpler system such as chess or some other turn-based board game where minimal data is required only on rare occasions. Is your game a better fit for event-driven and command-driven interfaces, or a better fit for continuous data synchronization? Most games have elements that require each, but overall one pattern tends to fit overall.

As for general implementation, just like local multiplayer versus single player, it is best to design systems to support an arbitrary number of sources and local/single player just happens to have n=1. That means any number of controllers, any number of input sources, any number of viewers, and so on. It merely happens that one set of input sources is the local device and another set is remote or from a server. Or you can have cases with multiple local players and multiple remotes, plenty of games support that; one I worked on not too long ago would support it mixed, if you were in an online match each machine could provide up to 4 local players (because that's what the machines support) as long as the match has room. It merely happened that in single player n=1, in local only play the inputs were all local, in network play some inputs happened to be remote.

This topic is closed to new replies.

Advertisement