Page 1 of 1

Python Arcade / Python 2D game frameworks

PostPosted: 30 Aug 2018, 01:06
by c_xong
Maybe this is old news to many of you, but TIL about the Python Arcade game library (http://arcade.academy/index.html), which seems like an improvement over pygame.
From the comparison (http://arcade.academy/pygame_comparison.html), the improvements are mostly minor, with the exception of using OpenGL / Pyglet instead of SDL 1, so accelerated scaling/rotations are possible.

There was a pycon talk:

youtu.be/DAWHMHMPVHU

Has anyone used this library before? What's your experience? Speaking of python 2D game frameworks and libraries, there's also SGE game engine by our resident @onpon4, which is also an improvement over pygame but is still using SDL 1 and suffers from its limitations.

Re: Python Arcade / Python 2D game frameworks

PostPosted: 01 Sep 2018, 06:56
by themightyglider
Python Arcade is an interesring Framework and if I had known about it when I started my own project this would have been the way to go. Sadly the API isn't compatible to pygame so switching the libs now is no option to me.

As far as I understand SGE engine uses pygame as a dependancy. So its more like an extra layer on top of it to make development easier.

The positive thing about pygame is that they work on SDL2 support. AFAIK the upcomming release 1.9.5 will be the last one with SDL1 and 2.0 will have SDL2 support. At least I saw this news on reddit.com/r/pygame a while ago (I hope they are not fake).
I guess pygame with proper SDL2 support would be the solution of most performance issues it has right now.

Re: Python Arcade / Python 2D game frameworks

PostPosted: 01 Sep 2018, 17:50
by onpon4
Yeah, I haven't really had a chance to do it yet, but I really want to add a SGE implementation that uses PySDL2 or Pyglet (in fact that was my intention from the beginning). In fact it would have another advantage, being able to use PyPy for (potentially) better performance.

I never heard of Python Arcade. It seems to offer some nice features, but I note that its physics engine is a lot more simplistic than mine. I do rather like the idea of including an engine specifically for platformers, though; maybe I should abstract some of Hexoshi and ReTux into another xSGE module.

Re: Python Arcade / Python 2D game frameworks

PostPosted: 03 Sep 2018, 00:26
by c_xong
I don't think it's important to have a very good physics engine, but rather just make sure your framework can easily support the best engines. For example, Arcade contains examples on how to use pymunk with it: http://arcade.academy/examples/index.html#pymunk

Platformers are an exception; they are (a) popular, (b) not simple, and (c) not suited to standard physics engines. So it probably makes sense to provide a platformer-specific physics library. I'm not sure if such a thing exists, because there are so many different kinds of platformer physics.

Re: Python Arcade / Python 2D game frameworks

PostPosted: 03 Sep 2018, 14:10
by onpon4
I generally just find that implementing the physics is one of the most tedious parts of making a game. Especially if you're doing things like unisolid tiles, slopes, moving platforms, and whatnot. So it's been a strong focus for me.

Re: Python Arcade / Python 2D game frameworks

PostPosted: 05 Mar 2019, 20:10
by dulsi
How stable is python arcade (and pygame)? If I write a game in it, will it need regular cleanup due to API changes?

Re: Python Arcade / Python 2D game frameworks

PostPosted: 06 Apr 2019, 13:25
by dulsi
I installed arcade via pip3 for my machine. It worked but some examples I downloaded from github didn't. In particular the tiled examples. I grabbed an older version of the file and it worked. The older version is using a csv file instead of tmx. I found a new version of arcade is available and figured out how to upgrade. I try the example and get an error:

PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.7/site-packages/pyglet_ffmpeg/linux_x86_64/libavcodec.so.58.21.104' -> '/usr/local/lib/python3.7/site-packages/pyglet_ffmpeg/linux_x86_64/libavcodec.so.58'

After playing around with it, I decide to use a virtualenv. I try the example and get:

File "/home/dulsi/proj/chrisgame/env/lib/python3.7/site-packages/pyglet/canvas/base.py", line 197, in get_best_config
raise window.NoSuchConfigException()
pyglet.window.NoSuchConfigException

Not sure if that is progress or failing earlier. Anyone else tried using it?

Re: Python Arcade / Python 2D game frameworks

PostPosted: 07 Apr 2019, 04:15
by dulsi
To my knowledge "fullscreen" under SDL1 which is used by pygame is underwelming.
Image
I tried out pygame_sdl2. It doesn't stretch the screen the way I want.
Image
Python arcade library does what I want but while 1.3.7 works the latest 2.0.3 does not.