Trouble trying to get started with pygame

René Dudfield renesd at gmail.com
Fri Nov 15 03:12:14 EST 2019


Hi,

it's possible to have multiple processes running with separate pygame
windows.

However you need to communicate with an inter process mechanism.
For example by running a web server over TCP/ip/sockets, or UDP with OSC,
or shared memory with mmap, or even via clipboard copy/paste, the humble
file, or a database (Sqlite, PostgreSQL).
Each method has different trade offs.

However with pygame > pygame version 2 it is possible to have multiple OS
windows controlled by a single process.

The reason SDL and pygame do this is they come from a world where taking
over the whole screen (and OS) was common.
Also having multiple windows is mostly bad UX. If people are paying for
your UX, then probably you want good UX.

Note, that you can split the screen up inside a single OS window.
In pygame this is done easily with a subsurface, or by manually positioning
things with rects.


cheerio,




On Fri, Nov 15, 2019 at 3:36 AM <originallmoney at gmail.com> wrote:

> On Tuesday, November 12, 2019 at 7:05:16 PM UTC-5, Terry Reedy wrote:
> > On 11/12/2019 2:32 PM, originallmoney at gmail.com wrote:
> > > I'm curious: I've been seeing people having multiple pygame programs
> open at once (Where each one is a component of a main program, obviously).
> >
> > Multiple programs open at once on modern machines is normal.  Do you
> > mean multiple windows for one program?  As is possible with IDLE?
> >
> > --
> > Terry Jan Reedy
>
> Well, the example I was seeing, the person had one window which contained
> a portion of the larger pygame program controlling the display, another for
> controlling the characters, and another for the main program (Plus, I
> think, two others whose purpose I forget). I'm just concerned because, I
> can't imagine that's possible from the command prompt, but, I don't know
> what they had that would allow them to have multiple subprograms open at
> once in Python. I'm used to that in Visual Studio C++, but, I don't know of
> such a thing for Python.
> --
> https://mail.python.org/mailman/listinfo/python-list
>


More information about the Python-list mailing list