How to test your game locally in any browser


I just discovered that Python has a simple webserver, so I wondered if it would let me play my WiPs locally in browsers other than Firefox.

Short answer: YES!

I ran python -m SimpleHTTPServer 8888 in the choicescript/web/ folder, and then went to http://localhost:8888/mygame/index.html in Opera, and IT WORKED!

This is good because I use Opera and always disliked having to open up Firefox just to test my games. Also, one time even Firefox stopped working, and I had to adjust some security setting to get the games to play again.

I’m on Ubuntu, but I’m pretty sure this will work on Windows and Mac if you install Python.


Hey, I think I just found something even better:

It’s for Windows and Mac (for Unix use XAMPP, which I knew about before, but I don’t think it’s quite as simple to use.). MAMP, on the other hand, has a GUI!

Once installed, it works the same way as the simple python server. Just go to http://localhost:8888/mygame/index.html to run your game locally.