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

2

Index

Attached Files

The following files have been attached to this tutorial:

.capx

space-tic-tac-toe.capx

Download now 7.75 MB
.zip

web2py-files.zip

Download now 4.42 KB

Stats

6,046 visits, 12,433 views

Tools

Translations

This tutorial hasn't been translated.

License

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 http://zerostatesociety.com

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 http://anavrin.pythonanywhere.com

.

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.

SO, LETS BEGIN

What you'll need

Download the web framework, which can be found on http://www.web2py.com

.

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.

  • 0 Comments

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