2

I was wondering if it is possible to implement a web based game in python. I have searched the internet and cannot seem to find any tutorial or document pointing to this. Any advice will be appreciated..

Johann du Toit
2,6672 gold badges17 silver badges31 bronze badges
asked Apr 2, 2011 at 11:18
1
  • The clarification you gave in the comments below you should mention up here in the original question. Commented Apr 5, 2011 at 21:20

5 Answers 5

2

Your question is a bit vague but from what I understand you are trying to create a web based game with Python.

As python is a serverside language you could implement the website/server with it but for the client and the game itself you will need a browser based client-side technology. Like Flash, Silverlight, WEBGL or Even Javascript and HTML5. But this will all depend on how you would like to structure your game.

You could create a Server that pushes information to the clients with a library with say Twisted. The other option you could choose is to create a website that the clients will poll for information or use Comet for Push.

answered Apr 2, 2011 at 11:33
Sign up to request clarification or add additional context in comments.

Comments

0

These are the only ways I know to "directly" code in python for the web :

answered Apr 15, 2011 at 8:32

Comments

0

Of course it is. But without more information on what type of game it is impossible to provide further guidance.

answered Apr 2, 2011 at 11:20

2 Comments

I have implemented a simple tetris game in python using pygame and am wondering if there is anyway I could run it in a browser.I dont mind having to use anyother tool other than pygame
Stuff that runs on the client side needs to be in a client-side language. pyjs.org
0

Python is a serverside language. For the "web" in web-based you still need HTML und JS (or Flash). Using Python for the serverside is possible. Here is a list of Python web frameworks (my personal favorite is Django).

answered Apr 2, 2011 at 11:21

Comments

0

Python can be used in a variety of ways for developing web games. In particular, it can be very useful for doing the back-end of a multiplayer game. For the front-end you will probably need to use a client-side technology like Flash, but there have been turn-based games that simply use static HTML as the front-end (for example, Urban Dead) and that could be implemented in Python alone without a separate client-side technology.

answered Apr 5, 2011 at 21:24

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.