A question with a newbie that I have to ask, a beginner of network programming for games?

I am an absolute newbie in this area, and I'm a little scared to point the wrong way to network programming. I am trying to create a strong network library for my game engine.

I looked online and saw that there is a network library with boost, I would love to use it, since I am very interested in further integration with my code base. But I wonder how can I code and debug such a thing? If I only want to develop on a single PC, how can I emulate a network environment with a dedicated / peer server and x the number of players connected to it?

+3
source share
4 answers

You can simply run many processes on one PC. You can use a local area network (127.0.0.1). Or you can use virtual machines.

+2
source

You will need to start the server on your computer and run x copies of the player code.

Then you can debug the server or one of the players.

This will not mimic things like network lag and dropped packets, it will allow you to test the interactions and to a certain extent how your system behaves under load.

There are tools that you can get that will simulate network lag, etc. but it will usually cost you money (as he does), but there will be free alternatives.

+2

, , , - , , .

+1

, , NAT, IP- DHCP-. , IP- MAC- Vmachine, , IP- . ( Hackintoshing) , .

0

Source: https://habr.com/ru/post/1727764/


All Articles