Hi guys,
I got the following working atm:
C++ Game using SFML. Multiple players can connect, if they press W/A/S/D the new coordinate will be send to a specific IP address (will be the server) via UDP.
The server broadcasts the coordinates of all players at specific times.
Question is:
I want to save e.g. where a player logged of. I guess I could send a package with playername, X, Y when he disconnects. But what then? Do I save the received information into a database on the server and as soon as he logs in he gets the information back?
Second: All of my things work well for my little 2D game with a few persons. But imagine some sort of enemy, unlocked weapons etc. All this information has to be send via UDP, isnt that a hell of a data stream? Of course most of it has to be send one time per new player and session in general, but still.
Do you know any resources where I can learn how to save data on a gameserver and send them well? Or maybe even books about networking if that helps.
Multiplayer in general is new to me
(And offtopic: What happens if someone just bombards the server udp port with thousands of 0's or other useless data?)