Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Python user interface library can I use for 2D games? [closed]

I want to create a 2D game on Python with heavy user interface: windows, buttons, text input, etc. So far I've been using PyGame for a few simple games.

The game is a 2D MUD, with the standard rendering loop to draw stuff on the screen. I need the user interface to interact with the game entities like sales, blacksmith, etc.

I am looking for something like a mix of Pygame and wxPython/pyQT/pyGTK.

Which libraries can I use?

like image 532
vz0 Avatar asked Oct 23 '11 22:10

vz0


People also ask

Can Python be used to make 2D games?

Fortunately, the Python arcade library makes creating a 2D game in Python accessible for many programmers! If you haven't already heard about it, the arcade library is a modern Python framework for crafting games with compelling graphics and sound.

Is pygame good for 2D games?

Pygame supports only 2d games that are built using different sprites. Pygame is not particularly best for designing games as it is very complex to use doesn't have a proper GUI like unity but it definitely builds logic for further complex projects. The player can only move vertically.

Is pygame pure Python?

1| Pygame. About: Pygame is an open-source Python library for making multimedia applications like games built on top of the excellent SDL library. This library is a combination of C, Python, Native and OpenGL. Pygame enables users to build fully featured games as well as multimedia programs with Python programming.

What graphics library does Pygame use?

Pygame uses the Simple DirectMedia Layer (SDL) library, with the intention of allowing real-time computer game development without the low-level mechanics of the C programming language and its derivatives.


2 Answers

I would take PyQT with QGraphicsView or QGraphicsScene. Sadly there isn´t a Clanlib python binding like for perl and ruby. That would be, probably, the ideal choice.

like image 64
Víctor Romero Avatar answered Oct 03 '22 17:10

Víctor Romero


You can use the popular Pyglet game library along with wxPython, the cross platform GUI library. An example of how to do this:

http://pyglet.googlecode.com/svn/trunk/experimental/wxtest.py

Additionally, if you want to use pure Pyglet, you can use Kytten, a pure Python GUI library built on the top of Pyglet.

like image 42
Manuel Ceron Avatar answered Oct 03 '22 19:10

Manuel Ceron