Multiplayer / Networking developing

I’m turning my single player card game into a multiplayer (using TcpClient)

But I’m having problems with how slow it is to test and fix bugs. As of now, I have a laptop that I transfer the latest build with a usb stick, so every time I want to test the last build I have to copy the files to a usb stick and then move it to the laptop and back again to my pc when it fails. And if it crashes on the laptop I have no idea about what that made it crash.

Is there some sort of simulated network thing I can use with MS visual studio?

You could run the game on the same computer twice. (Perhaps with two instances of Visual Studio, or by attaching a single Visual Studio instance to your two running games.) (You can even attach to a process on a remote computer.) snip

Or provide better logging.

Or use the same development setup on your laptop. If you use git, perhaps you can run the git daemon to share your changes faster using your local network and pull and build directly on the laptop.

There are many options.

1 Like

I tried running both server and client on the same pc, but the server refuses to accept any client running on the same pc.

You might be trying to connect to the wrong IP. It should look like or localhost:3000.

I wrote a blog that has some suggestions for automatically launching a client to connect to the server though you will need to figure out how to get them connected on the same PC before it will be of any help.

Also the TcpClient and Server have ways of reporting errors that could help you figure out why they wont connect.

As other people pointed out local client and server should work just fine, I do it all the time (with multiple clients).

But about the part that you move files with USB, I highly recommend creating a github (or gitlab) account, they both provide private repos for free. Then you can just pull the latest code + you’ll have changes history and backup.