Hey ^^
I need help with my UDP code! if someone could explain to me how to work with "acks" and how to set them.
My boyfriend and I are working on a 3D game, we already made basic UDP send/receive code (though quite forgot about it for a while ^^), but as we understand, packets can be lost with UDP and we need some sort of flow control.
I didn't manage to find a place with a good example..
I am also wondering how to avoid memory leaks with copied data from the multi player code.
Right now I made a "GetPacket" function which retrieves a packet from the received messages queue in the UDP class.
But since the memory is dynamic char string (char packet = new char[packetsize]), it means that they could play with the pointer and lose it.
I could make a maximum size and define all chars size to be char[MAXIMUM_SIZE] instead of dynamic or maybe make a class to handle it.
So I am looking for opinions if anyone has ^^ and if someone thinks they have the time to explain me about acks and flow control over and maybe the memory stuff,
I would be grateful ^^
My skype is lunanishry
And MSN Messenger is Luna.Nishry@gmail.com