Sign in to follow this  

Submit game-information with enet

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

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