Menu

Pyui Direction?

2004-02-17
2004-05-07
  • Jasper Phillips

    Jasper Phillips - 2004-02-17

    I've started to use pyui in earnest for my game, which I intend to publish.  I've been very reluctant due to the alpha status of pyui, and that it appears stagnant with a very small user base...

    Still, the alternatives didn't do quite what I needed, and so I'm stuck either rolling my own, or extending pyui.  I've setup a local subversion repository for fixes/extensions, but would prefer something a little less isolated!

    What are the future plans for pyui?  Is there any active development on pyui?  Anyone else seriously using pyui?

     
    • Karukef

      Karukef - 2004-03-25

      I am just starting out with python and pygame but it did not take me long to see the value of a flexible module like pyui.

      Unfortunately, as you say, the alpha status is daunting. I downloaded and installed the 1.0 version and that doesn't even work out of the box with the Pygame2D renderer! That is pretty abysmal for something called a 1.0 release. The 0.95 release worked for me, but wading through the Pygame2D renderer made me realize that entire renderer looks completely... undeveloped. It is like whoever worked on pyui hasn't used the Pygame2D renderer in quite some time. Look at this code for example:

              try:
                  self.font = pygame.font.Font("font.ttf", 14)
              except:
                  print "Couldn't find arial.ttf - resorting to default font"

      THAT is pretty horrible.

      When I tried to figure out why any font setting changes I made when initializing a renderer, I came to the conclusion that the Pygame2D renderer does not even provide an overide for a createFont. I did not believe it at first, especially since I could load up the example programs (although looking very ugly) and those displayed text. But the entire Pygame2D renderer simply defines a static font when initializing and uses it for everything.

      Notice how the drawText function in Pygame2D renderer (both 0.95 and 1.0 version) does nothing with the incoming font:

          def drawText(self, text, pos, color, font = None):
              """Draws the text on the screen in the specified position"""
              self.drawList.append( (pyui.locals.TEXT, text, pos, color) )

      pyui looks really excellent, but if I am forced to use the opengl version of it just because no-one could implement the VERY SIMPLE Pygame2D renderer is pretty sad.

      I might see what I can do about it myself, but considering my experience with python is less than a week I can't promise anything.

       
      • Jasper Phillips

        Jasper Phillips - 2004-05-07

        I've experienced similar things as well, although I'm using the openglPygame renderer.  For example, in 1.0 the theme to use is hardcoded, and you have to fix pyui.init() to get it to work. :-/

        So far I've stacked up about 30 revisions to support my use of pyui.  Not so many, but enough that I need to get my feet wet and understand exactly what's going on underneath.  If only something more robust like wxPython did what I want!

        However there seems to be _some_ interest in pyui.  Perhaps we should band together and see if we can take over support of pyui.  At the very least it would be nice to share our fixes rather than reproduce privately in parallel.

         
    • Marshall Parsons

      I have been using the pygame2d renderer and fonts pretty extensively with no problems.  It was broken in v96 because the following is missing from core.py:

      from rendererBase import RendererBase
      from renderer3d import Renderer3DBase 

       

Log in to post a comment.