Looks great and plays great!
I did a global high score table on my game by getting my applet to send the data to a servlet like this:
URL url = new URL(cHOST_NAME);
URLConnection urlConnection = url.openConnection();
if (urlConnection instanceof HttpURLConnection) {
((HttpURLConnection)urlConnection).setRequestMethod("POST");
}
else {
throw new Exception("this connection is NOT an HttpUrlConnection connection");
}
urlConnection.setUseCaches(false);
urlConnection.setDefaultUseCaches(false);
urlConnection.setDoInput(true);
urlConnection.setDoOutput(true);
urlConnection.setRequestProperty("Content-Type", "application/octet-stream");
urlConnection.connect();
// send data to servlet
OutputStream os = urlConnection.getOutputStream();
os.write(bytes);
os.flush();
os.close();
You probably don’t need to make it an octet-stream if you’re just sending Strings.