Check if UDP message was successfully received?

Hi!
I’m new to this forum but I have been working on a game engine for a while which I may show in a new topic later when I get pictures.
I used to use Yahoo Answers but I gave up on that after typing about 6 paragraphs for a very detailed question then finding out I can’t use Yahoo Answers with my Yahoo Account anymore.

I am currently using TCP in my game engine for networking but I am finding it a bit slow. I heard that UDP is faster but apparently the messages sometimes don’t properly send.

So I was wondering if it is possible to check if the receiver actually receives the message in Java?

Thx in advance.

Have the receiver send acknowledgement. But then you are trying to roll TCP on top of UDP, so might as well stick to TCP. There’s a fair bit of well debated info on this forum about it.

My test multiplayer game uses physics (including a physics body for the player)

I would’ve preferred the client doing some of the work (like controlling the player) but having the above situation, the server and client would become un-in-synced (I don’t really know how to spell that…)
At the moment I just have the client sending input data to the server and the server sending the position of everything back.

Is there some other way around I could use to make it faster?

Sending an ack is not equal to rolling your own tcp.

No it is not equal, but I’d argue it is a step towards emulating it.

EDIT: The more I think about it Roquen, I can see the benefits of UDP with a simple ACK system. Although one would have to be careful that you don’t work towards implementing your own version of TCP on top of UDP at the application layer; which is what I am trying to get at.

It’s common to want to send unreliable packets. By the time you get the ACK the information is already dated and you’re better off sending new updated info rather than data that will be useless by the time it’s received and still need to send the updated data soon. TCP is great for sending large static data or not needing to worry about xfer (sorta) if time isn’t important.

You might want to look for RUDP or Reliable UDP. It still makes sense to use UDP in reliable manner instead of TCP. TCP expects a point2point connection and that might fail to various reasons (unstable Wifi, cell phone communication, …) and TCP always has to reconnect the connection and suffers from slow start (http://en.wikipedia.org/wiki/Slow-start).

Generally still too much. It re-transmits…see above.

Thank you all…
But is there a better way for a multiplayer physics game rather than getting the server to do all the work?
Becuase if each client did a bit of work they would all need their own instance of the game and it will easily get un-in-synced (argh! Where is the spell check when u need it) which I don’t really want.

Thx in advance.

oh, network-physics! yes, that will get out of sync.

my experiments showed that it is a good idea to run the simulation on the server and the client with same parameters. let the server transmit the full state at a low rate, create compensation on the clients, blend with the simulation. TCP was totally fine for that.

lots of links : http://www.gamedev.net/topic/533048-handling-physics-over-network-multiplayer-game/#entry4446275

Thx

If I just may ask…
If I where to show off pictures of an unfinished game engine, where would I put it?
I think it is pretty good to show off at this stage because I think it is pretty good and I would like some feedback

In the Work in Progress board.

Among all the links presents on gamedev.net, I recommend the link to this blog:
http://gafferongames.com/networking-for-game-programmers/

I used it to switch my game to UDP, it’s very well explained.