Sign in to follow this  

How to send player position, health, stats in a packet ?

Recommended Posts

FantasyVI    105
hello everyone

i have been working on a top down 2d shooter using c++ and SFML and its almost finished and all is left is to implement network to the game, so i decided to use WinSock 2 to do the networking.
now i have been able to make a server and a client successfully where the server sends a message and the client receive it, but i don't know how to send the player stats and movement and enemy's and all that.
from what i understood from my research and the network FAQ that all these data are sent by packets but i really don't know how to make the structure, so i was hoping someone would give me an example or a simple code ?
so can you guys help please, keep in mind this is my first time to make a network based game.

thank you all

Share this post

Link to post
Share on other sites
rip-off    10976
Question #12 in the [url=""]Forum FAQ[/url] should help, in particular the links to how some FPS games did this.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this