If I would build something like this, I'd go for an interpreter with a stack you manage yourself to handle infinite loops... using a timeout, not by solving the halting problem, random smartass!. But I over-engineer everything so don't trust me on that.
They probably use a timeout on the process too. Actually I would think using "dangerous" (i.e. filesystem) code is the real danger they'd have to defend against.
"gr1d.org is a persistent multiplayer online programming game. Its inspired by games such as Robocode, Planetarion, various persistent online worlds and cyberpunk fiction.
"gr1d.org combines write-your-own code, persistent online world, cyberpunk-RPG, and multiplayer risk style domination and resource gathering together into a fun experience for programmers.
"As you gain levels, skills and experience, you can code more powerful agents to use these skills. You produce a fully-fledged class in the .NET ide of your choice, and upload it to the gr1d.
"While you're offline, your agents continue to run within the gr1d, looking for experience, resources and combat."
How? And how much work would that be vs right now.
Continuation: Actually, I thought more about it, and I might have some possible solutions. It would probably change how the game works, though.
If unique players were separate processes altogether and they communicated with the server, then the game could support a plethora of languages because it could run each player as a separate process and link to it.
This seems incredibly dangerous for the server (running rogue programs), and annoying for players ("oh, sorry, your particular language isn't supported :/" or "oh sorry, the most recent version of your language isn't supported, even though you're using brand-new feature X"), but possible.
.Net is run inside a virtual machine, akin to the JVM. As long as you can compile down to the bytecode language (CIL), then you can input whatever language you want.
In fact, I believe you should be able to use Mono to develop for this using a fully-OSS stack. (I could be wrong)