[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Call For Articles
Bert Peers wrote:
>
> Steve Baker wrote:
>
> > Bert Peers wrote:
> > > I've been thinking about an article on how to write a simple GUI
> > > for a game. Motif, Qt, GTK is probably out of the question for
> > > most games, breaking the look-and-feel, or maybe even simply
> > For OpenGL, you can use my PLIB library which has a fairly
> > complete GUI (written using OpenGL for the rendering) that
> > can be rendered on top of the game screen.
>
> Hehe, this sounds like a strategy for world domination : whenever
> anybody ponders the idea of explaining how to write your own GUI,
> you quickly point those would-be authors to PLIB ?... :^)
:-)
Rats! You figured it out!
Well, I wrote PUI precisely so that OpenGL games could be written
without having to start off by writing GUI, Joystick, Audio, etc.
My Tux_AQFH game has only about 7000 lines of code - the remaining
15,000 being inside PLIB.
Perhaps I need to write a "Writing 3D games with PUI" HOWTO.
> Ok, seriously, I'm just addicted to GUI systems and have been
> browsing GTK, Qt etc, written some of my own GUIs, scriptable
> and all, and thought it would be nice to explain some of this.
More documentation is always a good thing. I certainly don't
want to discourage you from passing on your valuable knowledge.
> Yeah, I've been thinking about building a GUI that delegates all
> rendering work using a bridge or whatever, but I'm not sure
> about performance and resource management yet.
Dunno about performance. PLIB assumes it has to redraw the entire
GUI each time anything happens. With 3D hardware, this is not too
costly - and it's generally necessary since 3D hardware is
double-buffered
and generally clears the screen for each iteration of the game.
In a 2D "framebuffer" oriented game, this "redraw everything"
strategy might be pretty costly compared to a smarter algorithm
that only redrew whatever changed. In that case, using PLIB's GUI
would be A Bad Thing.
--
Steve Baker http://web2.airmail.net/sjbaker1
sjbaker1@airmail.net (home) http://www.woodsoup.org/~sbaker
sjbaker@hti.com (work)