I get the feeling you are using an older version of pygame (1.9.1 or 1.9.6 perhaps). The debug print has been fixed for quite some time. Also, pygame2.0 uses SDL2 and handles fullscreen better. It supports a scaled fullscreen desktop mode that actually changes the desktop resolution. Just use the pygame.SCALED flag to pygame.display.setmode()
To upgrade you can try one of these commands:pip3 install pygame -Upip install pygame -U
I think if I were creating a front end like this I would destroy the window before executing a game, and then recreating it afterwards.
The official pygame Discord has recently shut down. Perhaps you might want to visit the github or an unofficial pygame discord.
-- .-------------------------------------------------------. | Brian Sturk ------- http://www.briansturk.com ------ | .> )\,^a__ |-------------------------. _______ Ethical Hacker ___ |( _ _)/ /-."~ | --- C/C++/Python/ASM `----------------------------| `( )_ )/ | Linux/BSD/OSX/Windows embedded/system programming --- |_<_s_<_s `-------------------------------------------------------'
Moving to pygame 2.0 has improved things somewhat (still tinkering), so thank you!
Only issue I've run across in moving to pygame 2.0 is this block
of code, which is part of a routine that shows a little square
popup when launching an emulator. The text in 1.9.1 shows up
fine, but in 2.0 I just see black boxes where the text region and
text would be. The Font.render API didn't seem to change so I'm
not sure what it could be.
for l in lines:
text = _info_font.render( l, 1, _fg_color )
textpos = text.get_rect()
if textpos.width > _info_rect.width:
textpos.width = _info_rect.width
x = _info_rect.left + ( 2 * _item_padding ) + ( (
_info_rect.width - textpos.width ) / 2 )
offset = ( _info_font_size + _item_spacing ) * count
textpos = textpos.move( x, y + offset )
_screen.blit( text, textpos )
count += 1
~brian
Pygame2.x will work on python2.7.
I stuck with that version for quite some time myself, but moving to 3.x was the best thing I ever did.