I’ve created a game in Minecraft for testing human exploration in indoor environments. It’s available for playing at http://www.vaisaghvt.com/minecraft-experiment/ . Please go ahead and give it a try if you have a minecraft account and want to play Minecraft for Science . Or if you’re the competitive sort, try to get on the leaderboard.
It’s been more than a year since my last post on how I created the game. Since then, I’ve got some very basic results from it with students in NTU playing. However, it was surprisingly hard to get people and I had to host it online to get enough data. It took a while to get funding approved and stuff but finally I’ve managed to host my experiment on Amazon. In this post, I’ll try to describe the things I had to do since my last post to get this to work.
What I’d already done:
A short version of what I explained in my last post: I’d created an adventure of sorts in Minecraft where players get spawned at one location, follow instructions to explore a three storey building and then complete a few tasks. On disconnecting from the server (manually), all the data of the actions of the player is written to a MySQL server. I analyse this data in the hope of finding a cure for cancer. And this is what I had to do for that:
Step 1 : Shutting down the server automatically
I can’t believe how long it took me to do this, but it ended up being quite simple with my modified statistician plugin simply sending a shutdown command to the server once the player completed the last task.
Step 2: Starting on request
Next, I used Python’s brilliant twisted framework to write a simple server program that would listen for connections and start a tekkit server when such a request was received. To test things out I created a simple client side script also that simply sent the username. The database would be queried for existing attempts and the unique id consisting of the username and attempt number was created to store it in the database.
TO start and stop the server I used this handy little script: http://pastebin.com/Lgs4r5f8 .
Step 3: Hosting the server and scripts on AWS
Now that I had this simple set up working I got an amazon EC2 machine and a MySQL database and copied all my server files and scripts there. Instructions on how to do this are easily available on googling and quite straightforward to follow.
If anyone’s trying to copy a Tekkit server from a Windows to a linux machine, remember that you have to download the Tekkit server on the machine separately and just copy the world files (as opposed to trying to copy the whole folder there).
Step 4: Final Touches
I also made the server a white listed server with the white list being created on a person signing up. Finally, I put a time out on the server that would shut down the spawned tekkit server after an hour so that the experiment didn’t stop simply because someone started the server and didn’t play.
The end results of all this are there for all to see at http://www.vaisaghvt.com/minecraft-experiment/ .
I didn’t go to as much detail as I wanted simply because I don’t have the time to write in detail. I’ll try to share all the scripts and stuff I wrote on my GitHub page once I get time to clean it up a bit. In the mean time, if anyone’e curious to know more about any part of the process, do ask.
Also, if you play minecraft and have a minecraft account or know anyone who does, please go to http://www.vaisaghvt.com/minecraft-experiment/ and play minecraft for science 🙂
Each Tekkit server with all the plugins I have require about 3G of memory, so it’s expensive to get more than the one EC2 instance that I have now and making a proper queueing system that emails people when the server is available will take a lot of effort so as of now, only one player can play at a time and someone else who requests while the one player is playing will simply have to wait and check back later.
I’m working on a paper summarizing the results from my analysis. Shall share that also once I’m done with it.