Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simulating LAN computers

Tags:

c#

simulation

lan

How can I test a C# multiplayer(4 players) LAN game.Rather than connecting 4 computers can I simulate 4 different computers(run the application with different IPs. i.e four instances of the application).I considered to do with four virtual machines but can't run four virtual machines.(h/w resources :(

like image 275
Dinushan Avatar asked Sep 01 '26 23:09

Dinushan


2 Answers

Why not run all instances on the same machine but just on different ports?

like image 80
Ilia Choly Avatar answered Sep 03 '26 16:09

Ilia Choly


If you are not using multicast, then just have them on the same computer, but have the clients listen on different ports (only one listener per port is permitted).

If you are using multicast, you have a few options

  • Broadcast your data to multiple multicast addresses in debug mode, so you can have the clients on the same host OS and machine.
  • If you are running Linux, you could try to run them in something like OpenVZ to separate the different clients.
  • If you have multiple NICs, use them!
like image 40
foxy Avatar answered Sep 03 '26 16:09

foxy