so for the past few days I have been trying to implement networking in my game using TCP protocol. I have been able to send and receive a small packet that contains the player name. It worked perfectly.
However my performance dropped dramatically when I used networking. Before implementing networking I was getting around ~1900 fps. After networking my fps dropped to ~95 !!!! So I decided to use threading. So now I have the main thread which runs the game update functions and drawing functions. and I have one thread for the server and another for the client and one for the login system.
Also I have created a simple in-game console to help me debug my game. I have to say my life is 100 times easier now. how did I not think of that before ?!
one last thing. I’ll update my website today and keep my server running 24/7.
this is my server specs please don’t laugh.
CPU:- Core 2 Duo E6600 2.4GHz.
RAM:- 3GB DDR 2 @ 800MHz.
Here you go guys enjoy