PyGame & Web hosts

B

boyanpn

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 ?
 
T

Terry Hancock

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.
 
S

SPE - Stani's Python Editor

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.php?t=732&view=next&sid=a0aa50a35c2173ee83ed18e6ef329783

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top