Sign in to follow this  

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

This topic is 2349 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

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
Question #12 in the [url="http://www.gamedev.net/index.php?app=forums&module=forums&section=rules&f=15"]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

This topic is 2349 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.

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