Just out of curiosity why are you using AJAX for communication and not a socket back to the server via the Applet? If you've already bought the Applet why not use one of the biggest advantages (stateful communication) you get for free?
Well, to tell you the truth, I don't really know. I had conceived of this game as using AJAX just because I'm more familiar with it, having developed with it for a few webpages. There's really no other reason, so I'll have to take a look at the networking available and other options if its such a blatant mistake to use AJAX :P.
Could you explain a bit more about stateful communication? I wanted to use an applet more for the ease of deployment and the challenge of learning something new.
Thanks for the input though, any other comments?
A really easy solution (and one I’m particularly biased towards) is JGN (JavaGameNetworking):
You can simply create your own custom message objects (basically simple beans/POJOs) and send them to other machines and use MessageListeners to catch messages of specific types. That’s the core of the framework, but there’s a lot more advanced stuff it can do.
However, if you don’t want to go that route you could simply just open a Socket connection to the server and go that way.