Using a wxPython GUI for a text adventure game

By the way, you could also look at FancyText (in the wxPython demo) for doing font color and size with HTML tags.

You should be totally fine with your game structure as is, since you just need a place to display output or grab input. You can grab input from a regular wxTextCtrl by a method like input = textCtrl.GetValue(). Then pass this input to your game engine. Straightforward.

···

On Wed, Apr 9, 2008 at 9:57 PM, Daniel Hast hast.daniel@gmail.com wrote:

Thanks, that is very helpful. I had already seen the Getting Started page, and I was thinking something relating to TextCtrl might work. I’ll take a look at RichTextCtrl; that sounds about like what I’m looking for.

What I’m thinking is making the old, command-line game functions return the output instead of printing it. The app could then format and print this output. Input would be sent the opposite way, entered into a text frame in the app and read by the game functions. Does this sound like a reasonable way to do things, or will I have to rewrite the whole game structure to make this work?

Anyway, at least I now know where to start looking. Thanks again.