Pitcher’s Duel approaches a re-release of the batting demo, and I face the distinct possibility of being able to call the batter swing interface ‘good enough’, and move on to the next phase of the project. That phase will probably be choosing a GUI package, though a networking package is in the queue, and some small jobs remain updating the pitcher graphics code, and unifying all the anatomy drawing.

In choosing a GUI package, I plan to implement a simple demo interface in each of the candidate packages, and post, in this blog, the necessary code to implement, as well as screenshots of the resultant look. In my first look at each, I hope to avoid implementing any widgets, preferring to just use the best available widget for each part of the demo, and a ‘not implementable’ note where the GUI provides no similar widget. I may do a second pass later, enhancing some demos by creating new widgets.

The demo interface is pictured in the attached image:
Each widget click will result in a line being added to the editable text box, in addition to the immediate state change of the widget. The editable text box will collect result indicators, as well as demonstrating the text edit capability. The progress bar indicates the filling of the edit box, in a line count sense, assuming 30 lines = 100%. Buttons will have both toggle (stay-down) and instant-return types, and buttons and check boxes will be inactivatable (‘grey’able). The single line text input will append the text to the edit box. The image map tracks whether it is clicked, and where in the widget the click happens. The spinner (clock like feature) is not part of the GUI, but represents the native game display running concurrently with the GUI.

This demo omits any menuing system, partly because I don’t anticipate using one in Pitcher’s Duel, partly because I suspect they are a low priority in game interfaces (how common are they?) in general, and because most GUI libraries do not seem to implement them.

The libraries must support main-loop sharing, such that they can be integrated into an application that already has a significant main-loop; in general, the library should have a ‘poll’ method/function that can be called from the main loop with or without event data.

The libraries I expect to compare include:

PyUI2
Mike Leonhard’s GUI
OcempGUI
PGU , Phil’s pyGame Utilities
Poutine (depending on how much framework is required)

Faces and Features does not seem to have an edit-box, which would disqualify it for this comparison.

Do you know of others?

orig.jpg

UPDATE: added spinner and image map

Advertisements