Multiplayer Tic-tac-toe [C2][Web2py(Python)][AJAX][Cross-domain]



Attached Files

The following files have been attached to this tutorial:



Download now 7.75 MB

Download now 4.42 KB


6,182 visits, 12,678 views



This tutorial hasn't been translated.


This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Hello everyone.

With this tutorial I will attempt to show you how a game server for a turn-based game of tic-tac-toe can be set up through a python web framework - Web2py and we'll also use cross-domain ajax calls.

You can check out the game on

a domain I'm playing with on a shared host.

Open up 2 tabs and have a dual with yourself.

The game was exported as a HTML5 game in C2 and all the files and folder were just uploaded to the httpdocs directory in the shared host.

The AJAX requests travel to


That's where all the logic is handled and the database is kept.

However, no hosting service is necessary to run my example. You'll be able to do it all on your own PC, even without internet.


What you'll need

Download the web framework, which can be found on


The game was made with a personal license Construct 2, so I'm not sure if a free version will have all the functionality.

The assets used are also from the personal license bundle, so Scirra defined rights apply to their usage.

A PC with Windows.


  • Order by
Want to leave a comment? Login or Register an account!