Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Network tutorial request  (Read 16545 times)

0 Members and 1 Guest are viewing this topic.


  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Network tutorial request
« on: July 01, 2008, 08:22:58 pm »
Could you make a tutorial which shows a UDP server client setup in which the server waits for clients to connect to it and when clients connect to the server they can send requests from a menu like

"Enter 1-3 for options"
"1) server will send you hello"
"2) server will send you goodbye"
"3) server will send you 1234"

"prompt user input:"

And the server would send back either hello, goodbye, or 1234 according to the client's sent input.

if you could do this for me that would be great because it will help me understand what you had in mine when trying to communicate between the client and server sending messages back and forth between them.

I hope to be able to take this tutorial and then change it up a bit so that I will eventually be able to have multiple clients connect to the server and then be able to send to the server up down left right commands so that the server can keep track of sprites on a 2d map, then send the coordinates of all the connect clients back to each client so that everyone can see where everyone is on the map. (hopefully that makes sense.

I really just need to know how to send data to the server and be able to reply to a client's sent data appropriately and at the same time continuously broadcast everyone's coordinates on a 2d map.

Thank you in advance


  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Network tutorial request
« Reply #1 on: July 02, 2008, 02:44:13 am »
Well, the socket sample does more or less what you want, with both TCP and UDP. Isn't it enough ?
Laurent Gomila - SFML developer


  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Network tutorial request
« Reply #2 on: October 24, 2008, 09:59:43 pm »
If anybody is interested, I can do one using a third party network library called: "39DLL".

It was originally created to add stronger networking support for a software called: "GameMaker" and it is extremely easy to use.