HTML5 game [Construct 2][AJAX][web2py]

This is for anyone, who's into playing around with some html5 stuff, who likes python and preferably wants to make some multiplayer turn-based games.

Short intro. I have quite intermediate programming skills(you know, don't even bother handling errors and stuff like that). I like python and I am quite lazy to study how to do the things I want in say PHP, which most shared hosting providers prefer, so I figured to work around it by using cross-domain ajax calls to where I've launched web2py.

So what has to be done is, you make a HTML5 game, I made mine with Construct 2. You set up ajax calls to hit Edit the file with the functions responsible for handling game logic, connections, id assignment and so on, give them decorators so that you can access them with "" and don't forget to set in every function: response.headers["Access-Control-Allow-Origin"] = '*' * - means calls from all domains will be accepted, when '' would only allow calls from this domain.

And your ready to go.

You can check out my Space tic-tac-toe game on the domain which is the shared host I talked about, and see the game in action. Just launch 2 tabs and challenge yourself.

A more detailed tutorial with the and files can be found on:

Thanks for reading.

Awesome! Thanks for posting that :-)

Glad that it's helpful :)

That's really cool