Jump to content
  • Advertisement
Sign in to follow this  
Argha

Resources to learn setting up a gameserver

This topic is 1164 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?)

Edited by Argha

Share this post


Link to post
Share on other sites
Advertisement

Do I save the received information into a database on the server and as soon as he logs in he gets the information back?


Yes.

isnt that a hell of a data stream?


I don't know. What is your definition of "a hell of a data stream"? How much data will you actually send to update users of these entities? Is the second more or less than the first?

Do you know any resources where I can learn how to save data on a gameserver and send them well?


The FAQ at the top of the networking & multiplayer forum has questions, answers, and links. Most of the links still work.

What happens if someone just bombards the server udp port with thousands of 0's or other useless data?


If they have a bigger network pipe than you have, and you do not have arrangements with a DDoS mitigation company, then they successfully DDoS your server.

Share this post


Link to post
Share on other sites

"I want to save e.g. where a player logged off"

 

You might want to expand that 'save' functionality to include when their connection goes dead - which would require some periodic asynchronous location logging in your game to have a 'near enough' last point (or the server used last known position on a connection lost event).      Thus a more general mechanism would cover your initial case.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!