By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,097 Members | 1,580 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,097 IT Pros & Developers. It's quick & easy.

PyGame & Web hosts

P: n/a
I a newbie in python so excuse me if my question sounds stupid or
something :(

I wonder if my web host suports python (with pygame), if I download
game from www.pygame.org and upload it to my site, could users access
to it with browser and play game ?

Oct 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Friday 14 October 2005 11:04 pm, boyanpn wrote:
I wonder if my web host suports python (with pygame), if I download
game from www.pygame.org and upload it to my site, could users access
to it with browser and play game ?


In the main, no.

PyGame is a multimedia library, using SDL to access the graphics capabilities
on a machine. It is fundamentally, a client (or standalone) application, and
does not (AFAIK) have anything to do with web services.

In order to be able to play a game "on your site" "using a browser" would
require either:

1) A very simple game that can use an HTML interface and software on your
server meant to deal with that.

2) Games that are actually implemented as Java or Javascript or some other
"applet" technology that is downloaded into their browser. "Some other"
pretty much only applies if your users are using a plugin or have a very
nonstandard browser. However, DO be aware that there is a version of Python
called Jython (http://www.jython.org) which would allow you to package a
Python program for use as an applet (running on Java). The bad news is,
it won't be anything like the PyGame environment (you'd be using Java libraries,
like Swing, etc).

Or, probably more useful to you, you could just provide games that people
can download. This is what actually happens with an applet, of course, so
there's no actual saving of bandwidth by "running it on your server". What
is saved is the hassle of installing the software once it's downloaded.

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com

Oct 15 '05 #2

P: n/a
Blender provided a web plugin with which you can program games in 3D
(of course also in 2D) with Python. Unfortunately it is not actively
supported anymore, but it still works. I think you can still use the
old version.

Download the plugin here:
http://www.blender3d.org/cms/3D_web_plug-in.15.0.html

And check out these cool examples:
http://www.blender.org/cms/3D_Web_Plug-in.161.0.html

More information here:
http://www.blender3d.org/cms/3D_web_plug-in.199.0.html

A tutorial:
http://www.blender3d.com/cms/3D_Walkthrough.340.0.html

To use it with wxPython, the wxBlenderPlayer:
http://blender3d.org/forum/viewtopic...ed18e6ef329783

To get some help, you could post to one of these forums:
http://www.elysiun.com/forum/viewforum.php?f=5
http://www.blender.org/forum/viewforum.php?f=9

Stani
--
SPE - Stani's Python Editor (http://pythonide.stani.be) with optional
Blender support

Oct 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.