Jump to content
  • Advertisement

Argha

Member
  • Content Count

    6
  • Joined

  • Last visited

Everything posted by Argha

  1. Yes, I read about that too. But I also think that my little game won't be that critical performance wise :) Anyways, thanks, then I might go that way
  2. So question is basically in the topic title.   In a pong game I would send e.g the following: Player1/2 x-/y-Pos Ball Pos   Luckily SFML already knows that these values in the packages are float numbers e.g. .   Question is: If it would be a byte stream only, how shall the receiver know that it is a float number? Putting some kind of identifier in it as a prefix?   And let's say there are 6 Players and 3 NPCs, every player is able to collect items. So I have to send the positions every single tick and in case someone collects an item than this information too.    But how do I encode it into a datastream? Like player2 collected weapon1. What Data would you send to your server? Some kind of code?     Like: std::string message = "Something to tell that player2 collected weapon1"; sf::Packet packet; packet << message; socket.send(packet, recipient, port);
  3. I just meant that I would/could encode the data via UDP package that way, like sending a string "playerId=01&posX=-333&posY=47"
  4. Indeed a http post-like protocol could fit my needs :) Thanks
  5. 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?)
  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!