Jump to content
  • Advertisement
Sign in to follow this  
FantasyVI

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

This topic is 2563 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
Advertisement
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!