Jump to content
  • Advertisement
Sign in to follow this  

Submit game-information with enet

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

Hi, i am trying to transfer each gamecycle all game-information (ie positions of players and objects) to all clients. What is the smartest way to do this? I tried to put all the data into a struct called player (enet_packet_create ((char const *)&player, sizeof(player)...) but somehow didn´t get to cast the "event.packet -> data" back to the struct. The lowlevelway would be to have some char*-Package, where I put all the data in and send it. But on the side of the receiver I would have to go over the package to get the informations out (floats would have to be converted and so on). Can anybody tell me how that should be done? Thanks MichiganRedDevil

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!