Forums

Pygame

Why isn't there support of pygame! Is there any way to download it to their servers?

[edited by admin -- please see our general help page on tkinter]

import pygame

Hi there,

pygame requires GUI libraries that will not work in a text only environment. So sadly it's not just a matter of installing the pygame module. We would also have to come up with an interesting way of providing an x server...

I guess in principle one could imagine using SSH's X11 forwarding, or running XVNC instances in a similar way to PAW's existing text consoles. However, latency would be a real pain to get down, I doubt there's the mass market appeal to justify the development required and the developers already seem to have plenty to fill their time for the forseeable future! (^_^)

@ajayajayaj: If there's any funtionality from Pygame that you want to use which isn't GUI-based then perhaps we could suggest some alternative libraries which are, or could be, available?

@Cartroo -- our thoughts exactly! Possibly we could even use gifsockets...

@giles: Now that rocks! (^_^)

I'd love to leave a browser streaming that for a few days and see what its memory usage was by the end of it...

Yup. Especially IE6, which they say it works with (probably for very broken values of "works")...

Can pygame be used now in pythonanywhere?

'fraid not. we did experiment with a thing that could potentially make it work, but it's a massive hack. servers just aren't really meant to run gui programs via a browser on remote desktops... still, maybe one day!

What would be the use of pygame ? Game or something else ? You can use vispy that can produce WebGL plots. I do not know how to do that but I know that it's feasible.

Can pygame work now?

No, we're still a server-based environment so we don't support graphics. We don't have any plans to change that soon.

Please, do it. I can't stand having to do pygame on desktop python

Can pygame work now?

no- servers don't support graphics, so it won't really work.

Please add GUI support

It's something we've considered, but it would be a huge amount of work and there are a lot of things ahead of it on the priority list. I've added an upvote on your behalf, though.

Is it possible to do online gameplay (in python anywhere) without pygame? Or will I have to turn to a different service to make an online game?

For an online game, you'd normally either code up the graphical front-end in JavaScript (using something like three.js) or write an app, and then have it communicate over REST with your server-based component -- the server stuff could be written in Python and run on PythonAnywhere.

This post sees to indicate a way to have the pygame run in the browser through something called WebAssembly. https://medium.com/@eri.zhang21/running-a-python-game-on-the-web-aa8b13037e15