This is sort of a follow-up to this question: http://www.gamedev.net/topic/645872-responsive-mobile-multiplayer-udp-or-tcp/
After a lot of testing I managed to determine that the bad 3G latency times I initially got for UDP on my phone was due to the phone saving power.
In particular, I was seeing roundtrips of 2000 ms for UDP over 3G when sending 1 message every 2 seconds. When I instead sent a new message within 50 ms of receiving the return message, that number would dive to a steady 80 ms, with occasional hiccups of 400 ms.
TCP got around 120-200 ms with the same setup, but when it encountered packet loss, the roundtrip would hit 2000-4000 ms!
This verifies that there are indeed serious stuttering with TCP that would be extremely hard to cover with animations.
Looking for a good reliable UDP protocol
I've been looking at various existing libraries. Most of them are way too high level - I prefer to write all the serialization myself thank you.
But even for products like ENet, it looks like the strategy is to push a TCP-like reliable layer on top of UDP and I don't think I want that.
What about something like thie?
I remember reading about one of those early Lucasart space combat games (X-wing vs Tie-fighter?), that they used an extremely simple scheme - basically sending the packet n together with packet n + 1, so that only on two consequent packet losses would there actually be a packet loss.
Our particular game doesn't have much action. In fact, as I've described in the other posting, it's about 80 packets sent per player total.
In order to keep the phone awake though, one would have to send pings, and send pings often.
Assuming we send pings every 100 ms we could imagine simply piggy bagging un-ack:ed messages until they're acked, it could look something like this:
1. Client sends action request with message n
2. Client sends ping with message n + 1, and adds message n
3. Client sends ping with message n + 2, and adds ping n + 1, message n
4. Client receives pong from server, ack-ing up to n + 1
5. Client sends ping with message n + 3, and adds ping n + 2
We could then prune old pings from the resends, so we only send resend actions, and vice versa for the server obviously.
This looks like it could be much faster in recovering from latency than any resend mechanism that relies on requesting missing packets, like TCP does.
The biggest worry I have is that I'd move from TCP with very conservative bandwidth-requirements to something which constantly bombards the server with packets.