Sending http requests to control a game

A client has asked me to make the game we’re creating controllable by http requests. That may sound like a bad idea, but it’s for research purposes.

Is there a better option than either of these?

  1. Define the core game in the first level, and create a second level that will be lazily-loaded, whose content is a serialization of the commands to be performed, and which doesn’t complete until the game is exited.
  2. Have a script that polls for commands, executes them, and continues polling.

I feel like I need to re-read this article because I just really want to say thank you.apowerrec crack mac