For a fun project at my school, I'm having my students write games in Java that use sockets to send high score data to my server at home. Everything is working great (the sent data is even encrypted!), but then I realized there was one big problem - decompiling and recompiling. It would be trivial for someone to take someone's game, decompile it, and recompile it so that it sends scores that are orders of magnitude larger than they should be. So now I'm stumped on how to get around this. I guess this analogous to how Gaim and the like are about reverse engineer the AIM messaging protocol.
I've read about encrypting the byte code and using a custom class loader and obfuscation, but neither seem to be good solutions. Do I have to make everything server side (and even then, it seems like someone could still figure out how to spoof the server...)