0
\$\begingroup\$

I was wondering if it is possible to create a dedicated game server for a game that already exists and you don't have access to. For example, a game on Steam that only allows multiplayer through hosting a game with your running client. A client can host a server but only while the hoster is also playing the game.

The question being, is it possible to write a server from scratch that can rep lace the game client host with a dedicated server that does not require a player hosting it? If so, how?

\$\endgroup\$
  • \$\begingroup\$ Not without modifying the source as far as I know. If a game only allows a player server, then there's probably not much you can do about it. Really depends on how it was written. The game might not have been created with dedicated servers in mind, or it may just be that the game doesn't give you the option to host one but is still capable of it. \$\endgroup\$ – Ben May 1 '15 at 19:09
  • \$\begingroup\$ So there is no way to somehow read packets and create your own Packet interpreter for the game and create a server? \$\endgroup\$ – RingOfStorms May 1 '15 at 19:13
  • \$\begingroup\$ Unfortunately it's likely that the game code and the server code are the same thing. Unless you want to recreate the entire game, I don't think that's possible. I dunno, I could be wrong though, of course. \$\endgroup\$ – Ben May 1 '15 at 19:18
  • \$\begingroup\$ Keep in mind that this is a legal gray area. Whether or not and under which circumstances reverse engineering of software is legal differs from jurisdiction to jurisdiction. It definitely becomes illegal when you start to distribute assets from the original game. \$\endgroup\$ – Philipp May 1 '15 at 21:54
  • \$\begingroup\$ Warcraft III had a lot of modding. Some people made its unreliable network interface reliable(Gproxy) made hosting for it(Ghost) and emulated the whole Battle.Net hame servers(PVPGN). All of these are open-source projects you could learn from. To make all this possible, the game itself had to have a good architecture to allow for all this. \$\endgroup\$ – akaltar May 1 '15 at 21:55
1
\$\begingroup\$

Can you? Yes.

You would need to capture all the packets sent from a client, and the return packets expected from the server. This is a super long and tedious process to decipher packets, if encrypted packets, you need to decrypt.

You would then need to write the entire server logic to interface with your newly understood packets.

The process usually evolves getting the client to accept a login into your custom server and going from there, step by step, figuring out what packets need to be exchanged to keep the client going barebones.

This is how private servers are made for AAA games.

Some sample tools might consist of https://www.wireshark.org/ to monitor network activity.

\$\endgroup\$
  • \$\begingroup\$ Needs detail. How does one capture and "understand" packets? How do you get a game client to connect to your server when you don't have the source code? \$\endgroup\$ – Anko May 1 '15 at 19:53
  • \$\begingroup\$ The connection is implied in his question. \$\endgroup\$ – Joe Swindell May 1 '15 at 19:55
  • \$\begingroup\$ What kind of tools can you use in order to monitor the packets? IS there any opensource/free software available for this task? \$\endgroup\$ – RingOfStorms May 1 '15 at 20:03
  • \$\begingroup\$ I can add that in. I'd suggest checking out some of the open source projects that do this. SWGEMU, maybe some of the WoW ones. \$\endgroup\$ – Joe Swindell May 1 '15 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.