#Pygame Experiment

73 messages Β· Page 1 of 1 (latest)

atomic flame
#

What a mess this pygame is but let's see if we can package it up nicely.

This is very WIP and a lot of the script may be thrown into the trash right away.
The venv squashfs needs to be updated regulalry depending what requirements are needed but can be installed with a simple pip install and then repackaged.
Also if you move the venv folder into another folder the venv-pygame/bin/activate and pip files need to be adjusted for the new path.

Alpha Testing title to see if it works at all on other devices.

  • Extract venv-pygame.zip to /roms/ports/Portmaster/libs/
  • Extract metal_arbiter.zip to /roms/ports

Best to launch it via ssh else we have no idea what's going on.

Pygame probably need to be adjusted per game basis like resolutions, sdl2 controls (joystick) seem to work.

  • How is the performance?
  • Does sound work?
  • Anything else πŸ˜„
#

Please read the instructions carefully where to place the files.

#

<@&1123159718874058882> for the daring who want to tip their toes into the world of Pygame

vast maple
#

Tested on the x55. Worked fine without starting via ssh.

atomic flame
vast maple
#

performance was good, sound worked fine, buttons we're responsive.

azure silo
#

on RG351MP everything worked, but the game was running in slow motion

#

I guess it is important to compare how it runs on a PC

#

because I was not sure, whether the speed was intentionally slow (kind of space vacuum effect?) or just played slow

atomic flame
#

πŸ˜„

#

Had the same issue

#

like boost was fast af

#

but the rest was like in space

azure silo
#

on the positive side - it started directly from ports menu, no need to debug anything πŸ˜‰

vast maple
#

Yeah, I tested on the first lvl and worked fine, bute on the second was super slow.

atomic flame
#

Might be badly programmed

#

Who knows

azure silo
#

yup, but I think the test goes well so far

#

it is like with any other game, some of them require more computing power than others

atomic flame
#

And that the one in the venv is much newer

azure silo
#

I guess we can run pip directly on the devices πŸ˜‰

#

I have tried but it complained about SSL certificates

#

the right way to fix this is to add the certificates, the quick workaround is python3 -m pip install --trusted-host files.pythonhosted.org --trusted-host pypi.org PACKAGE

atomic flame
#

I think just need a stable environment and from time to time update the env

azure silo
atomic flame
#

just exploded πŸ˜„

azure silo
#

whoah.. I have no idea where to start debugging this

atomic flame
#

Yeah that's where i wanted to compile it from source and add it

#

failed on device

#

copied the env to my dev machine

#

and then it complained about lower libc, lower python3

#

lower everything

#

πŸ˜„

#

and chatgpt suggested i recreate it within my env

#

πŸ˜„

azure silo
#

the dev machine, is it a virtual machine, chroot or sth else?

atomic flame
#

chroot ubuntu 20.04

#

and yours probably was 22.04 or something fancy

#

πŸ˜„

azure silo
#

debian, but I do not remember whether stable or old-stable (I have both)

atomic flame
#

πŸ˜›

azure silo
#

but debian is not famous for bleeding edge software πŸ˜‰

atomic flame
#

Agree

azure silo
#

anyway, I would agree to standardize it and settle for ubuntu 20.04 based venv

atomic flame
#

I will try now and try also with pygame-ce

azure silo
#

to spare us incredible headache

atomic flame
#

πŸ˜„

#

yeah

warped tusk
#

so you are building the venv on your device?

azure silo
#

the one that I have posted before was built on a PC, with debian 11 or 12 arm64 chroot

atomic flame
atomic flame
#

I think I broke it

(venv-pygame) /roms/ports/2pack # pip3 list
Python path configuration:
  PYTHONHOME = '/roms/ports/PortMaster/libs/venv-pygame'
  PYTHONPATH = (not set)
  program name = '/roms/ports/PortMaster/libs/venv-pygame/bin/python3'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = '/roms/ports/PortMaster/libs/venv-pygame/bin/python3'
  sys.base_prefix = '/roms/ports/PortMaster/libs/venv-pygame'
  sys.base_exec_prefix = '/roms/ports/PortMaster/libs/venv-pygame'
  sys.executable = '/roms/ports/PortMaster/libs/venv-pygame/bin/python3'
  sys.prefix = '/roms/ports/PortMaster/libs/venv-pygame'
  sys.exec_prefix = '/roms/ports/PortMaster/libs/venv-pygame'
  sys.path = [
    '/roms/ports/PortMaster/libs/venv-pygame/lib/python38.zip',
    '/roms/ports/PortMaster/libs/venv-pygame/lib/python3.8',
    '/roms/ports/PortMaster/libs/venv-pygame/lib/python3.8/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x0000007f7c0ea020 (most recent call first):
<no Python frame>
#

πŸ˜„

atomic flame
#

Well i failed to package up pygame-ce but i tried another 10 games or so and 5 run pretty good

#

some need packages that threw me tons of errors while trying to install some pip packages

proud violet
atomic flame
#

this gets ugly so fast πŸ˜„

proud violet
#

Do you see why I went with pysdl2 for the gui? πŸ˜„

atomic flame
#

yep

#

fucking mess

proud violet
#

No binary modules required. It uses the system python. πŸ‘Œ

brittle siren
#

did you want a excel sheet eventually?

proud violet
#

Ms excel on PortMaster when? πŸ˜„

atomic flame
azure silo