# Possible GUI Solution

**URL:** <https://discourse.libsdl.org/t/possible-gui-solution/650>\
**Category:** SDL Development\
**Created:** [October 28, 1998, 8:43pm UTC](https://discourse.libsdl.org/t/possible-gui-solution/650 "1998-10-28T20:43:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![emblem](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@emblem](https://discourse.libsdl.org/u/emblem)\
**Post date:** [October 28, 1998, 8:43pm UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/1 "1998-10-28T20:43:39Z")

</div>

GLUI, a UI library for OpenGL currently uses GLUT for event handling. I  
plan on porting to SDL, if poeple are intersted in helping/getting a  
copy of it when I’m done, tell me.

emblem

---

<div class="post-metadata">

**Author:** ![Peter\_Hawkins](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/p/57b2e6/32.png) [@Peter\_Hawkins](https://discourse.libsdl.org/u/Peter_Hawkins)\
**Post date:** [October 29, 1998, 7:42am UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/2 "1998-10-29T07:42:15Z")

</div>

Hi there…

emblem wrote:

> GLUI, a UI library for OpenGL currently uses GLUT for event handling. I  
> plan on porting to SDL, if poeple are intersted in helping/getting a  
> copy of it when I’m done, tell me.

Where can GLUI be found?

🙂  
Peter

---

<div class="post-metadata">

**Author:** ![Stephane\_Magnenat](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ee59a6/32.png) [@Stephane\_Magnenat](https://discourse.libsdl.org/u/Stephane_Magnenat)\
**Post date:** [October 29, 1998, 5:54pm UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/3 "1998-10-29T17:54:10Z")

</div>

Peter Hawkins wrote:

> Hi there…
> 
> emblem wrote:
> 
> > GLUI, a UI library for OpenGL currently uses GLUT for event handling. I  
> > plan on porting to SDL, if poeple are intersted in helping/getting a  
> > copy of it when I’m done, tell me.
> 
> Where can GLUI be found?
> 
> 🙂  
> Peter

Hello,

All thoses solutions for The GUI seems interesant. What I propose is that  
before everyone developpe  
his own toolkit, is that all people concert to know which is best.  
GTK seems good, so porting it seems a good idea.  
What I propose as Key feature for the GUI widget toolkit :

- Easy implementation
- Good documentation
- Fast
- Nice
- Programmable either in C or C++
- can be placed over a picture with pseudo-transparence ( for example :  
button will let us see the  
image that is under it )  
So, to conclude, I think it is important to speak and to take a decision  
before beginning to program anything

Best regards–  
Stephane Magnenat  
stephane.magnenat at urbanet.ch

---

<div class="post-metadata">

**Author:** ![Lavoie\_Philippe](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/l/f0a364/32.png) [@Lavoie\_Philippe](https://discourse.libsdl.org/u/Lavoie_Philippe)\
**Post date:** [October 29, 1998, 5:49pm UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/4 "1998-10-29T17:49:29Z")

</div>

St\iphane Magnenat writes:

> All thoses solutions for The GUI seems interesant. What I propose is that  
> before everyone developpe  
> his own toolkit, is that all people concert to know which is best.  
> GTK seems good, so porting it seems a good idea.

I think you only need to port Glib, as it’s the interface to X11 that  
Gtk+ uses.

That would be nice though, themable games 🙂

Phil

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [October 29, 1998, 5:54pm UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/5 "1998-10-29T17:54:00Z")

</div>

> What I propose as Key feature for the GUI widget toolkit :
> 
> - Easy implementation
> - Good documentation
> - Fast
> - Nice
> - Programmable either in C or C++
> - can be placed over a picture with pseudo-transparence ( for example :  
> button will let us see the image that is under it )  
> So, to conclude, I think it is important to speak and to take a decision  
> before beginning to program anything

I’d like to add " - Extendable" to the list. 🙂  
C++ is very good for making extendable widgets.

It doesn’t do a whole lot of good to have a button, if you can’t say, put  
an image on it, or link it to a text input, or …

## See ya! -Sam Lantinga (slouken at [devolution.com](http://devolution.com))– Author of Simple DirectMedia Layer - [http://www.devolution.com/~slouken/SDL/](http://www.devolution.com/~slouken/SDL/)

---

<div class="post-metadata">

**Author:** ![Dierk\_Ohlerich](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/d/96bed5/32.png) [@Dierk\_Ohlerich](https://discourse.libsdl.org/u/Dierk_Ohlerich)\
**Post date:** [October 29, 1998, 7:11pm UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/6 "1998-10-29T19:11:44Z")

</div>

> > What I propose as Key feature for the GUI widget toolkit :
> > 
> > - Easy implementation
> > - Good documentation
> > - Fast
> > - Nice
> > - Programmable either in C or C++
> > - can be placed over a picture with pseudo-transparence ( for example :  
> > I’d like to add " - Extendable" to the list. 🙂

I was hoping for something really small and simple, only used for ugly  
internal tools, not for the final game. I have spend much of the last 1 1/2  
years for developing inhouse tools using a toolkit with the following  
attributes:

- runs well on double/triple - buffered screens
- fast enough for update each frame (allthough it does redraw  
optimisations)
- very limited and poorly extendabe, therefore small and easy to understand
- quite ugly. well we can do about that.
- only good for one simple style of application
- simple to use

I assume that the interface of a game has to be recoded everytime. The  
first thing the user sees is the menu, therefore a lot of design has to go  
there, and creating a widget set which is versatile enough to cope with the  
creativity of our designers is a really big job (the game I am working on  
now has a menu with a slightly diagonal style, really cool but hard to  
implement efficient…).

What I need a gui for are the tools. Almost any game needs an editor, and  
the quality of the editor is an important factor for the quality of the  
final game. It is a good idea to have an editor that uses the same engine  
as the game, and therefore the editor should run in the same environment as  
the game. I still hope to find a widget set that is simple enougth to be  
ported to SDL, but I would prefer a highly limited application framework  
that lets you concentrate on the real work while the interface comes from  
itself. I assume I could do it in 64-80 KByte source+header, by porting or  
adapting what I have done for my current game project.

By the way, If you live in Germany, you might have a look at the “YARG”  
article in the magazine “Next Level 11/98”. It contains some screenshots of  
the editor I did and even a photograph of me…

Dierk Ohlerich  
@Dierk\_Ohlerich\> From: Sam Lantinga

> To: sdl at surfnetcity.com.au  
> Subject: Re: [SDL] Possible GUI Solution.  
> Date: Donnerstag, 29. Oktober 1998 18:54

---

<div class="post-metadata">

**Author:** ![Max\_Watson](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/m/ac91a4/32.png) [@Max\_Watson](https://discourse.libsdl.org/u/Max_Watson)\
**Post date:** [October 29, 1998, 7:05pm UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/7 "1998-10-29T19:05:47Z")

</div>

Lavoie Philippe wrote:

> St\iphane Magnenat writes:
> 
> > All thoses solutions for The GUI seems interesant. What I propose is that  
> > before everyone developpe  
> > his own toolkit, is that all people concert to know which is best.  
> > GTK seems good, so porting it seems a good idea.
> 
> I think you only need to port Glib, as it’s the interface to X11 that  
> Gtk+ uses.
> 
> That would be nice though, themable games 🙂

Actually, glib is a library of generic routines for list and string  
manipulation, etc. It is very portable. What you mean is gdk, the  
wrapper that gtk+ uses to interface with the gui system. The original  
gdk runs under X, while the win32 port is almost useable. There is even  
talk of porting it to embedded RISC processors as an alternative to  
WinCE. Imaging GNOME on your palmtop. 🙂

Porting gdk to SDL should be pretty painless. After that, you get most  
of gtk+ for free. I say most because some of the newer / more complex  
widgets are naughty and use X directly instead of going through gdk.

I would like to see this done, and a MacOS port of SDL. Then I could run  
the GIMP on Mac!

Max Watson

---

<div class="post-metadata">

**Author:** ![emblem](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@emblem](https://discourse.libsdl.org/u/emblem)\
**Post date:** [October 29, 1998, 5:27pm UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/8 "1998-10-29T17:27:55Z")

</div>

Max Watson wrote:

> Porting gdk to SDL should be pretty painless. After that, you get most  
> I disagree, gdk uses a windowing system, you would have to create a very complex  
> interface layer between gdk and the SDL buffer.\> Max Watson

---

<div class="post-metadata">

**Author:** ![Knight\_Walker](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@Knight\_Walker](https://discourse.libsdl.org/u/Knight_Walker)\
**Post date:** [October 29, 1998, 11:21pm UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/9 "1998-10-29T23:21:14Z")

</div>

> All thoses solutions for The GUI seems interesant. What I propose is that  
> before everyone developpe  
> his own toolkit, is that all people concert to know which is best.  
> GTK seems good, so porting it seems a good idea.

Well I think the reason we’re all on this list is because we don’t want  
to develop our own toolkit. We all want to use SDL (Which I still think  
is a DAMN fine toolkit for full-screen or one-window applications).

I don’t think GTK is all that good for game programming. GTK is an  
event-based UI, which isn’t going to work well for games that need to be  
real-time. And they’re already working on porting it to non-X environments.

> What I propose as Key feature for the GUI widget toolkit :
> 
> - Easy implementation

To be quite honest, SDL is one of the easiest toolkits I’ve ever seen.  
And I’ve been looking since I started learning to program X.

> - Good documentation

Again, score for SDL. It’s got some of the most extensive documentation  
I’ve seen. I’ve looked into the GTK+ documentation, and as of yesterday  
their tutorials are STILL missing a LOT of information.

> - Fast
> - Nice

Take your pick. If you want it fast, you’re going to have to do a lot of  
the work yourself. Sam can’t anticipate the particular needs of your  
game, and if he even tried, it would be completely detremental to SDL.  
If you want nice, you’ll have to define that better. Do you mean nice as  
in “it does all the hard work for me”, or nice as in “I’m not losing all  
my hair trying to master this beast”? And for what it’s worth, SDL is  
easier for me to understand then GTK+ is (I’ve tried to write two  
programs in GTK+ and failed miserably both times).

> - Programmable either in C or C++

SDL is already programmable in either of those. That’s the advantage of  
using C as a base, rather than C++ (Like Prometheus). If you know C++  
then it should be fairly trivial to write extensible wrappers around most  
SDL functions.

> - can be placed over a picture with pseudo-transparence ( for example :  
> button will let us see the image that is under it )

That is simply a matter of refresh order. If you refresh the button  
first, then the image, it’ll work fine. Or if you just refresh the edges  
of the button, it’ll do the same thing (But the image won’t move, which  
might take away from the believability of it).

> So, to conclude, I think it is important to speak and to take a decision  
> before beginning to program anything

I agree. A good design phase is always a good idea if you don’t have  
tons of extra time to re-write huge parts of your code. However, I still  
think that SDL is great for its designed purpose. I think GTK+ is great  
if you’re making applications that spend most of their time waiting on  
either the user, the network, or some other external trigger, but for the  
minute control you need for your game, you’re going to need the control  
you have with SDL.

But if I might add a couple things to this wishlist…

-small size (both memory footprint and executable size)  
-excessive control over game execution

The reason I bring these up is because not everyone has the latest and  
greatest Pentium 2 with 3D card. We all know how much we hate slow  
games, so we should also dedicate ourselves to writing the smallest,  
fastest games we can.

-Knight Walker

---

<div class="post-metadata">

**Author:** ![Knight\_Walker](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@Knight\_Walker](https://discourse.libsdl.org/u/Knight_Walker)\
**Post date:** [October 29, 1998, 11:49pm UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/10 "1998-10-29T23:49:36Z")

</div>

> I was hoping for something really small and simple, only used for ugly  
> internal tools, not for the final game. I have spend much of the last 1 1/2  
> years for developing inhouse tools using a toolkit with the following  
> attributes:

Well, Small and Simple are two major goals for Simple Directmedia Layer.  
I personally think SDL is useful for more than just the ugly internal  
tools. In fact, I think it’s quite elegant. I’ve played both the demos  
that were coded in it, as well as D1X and SDLDoom and they both look  
great. But I can see why you wouldn’t want to scrap the 1 1/2 years  
you’ve put into your toolkit.

> - runs well on double/triple - buffered screens

That is something Sam might be interested in. I know he’s working on  
double-buffering for SDL 9.

> - fast enough for update each frame (allthough it does redraw  
> optimisations)

The assembler sections of SDL may be that fast. I know Sam has published  
benchmarks between SDL and Prometheus, and SDL has out-run Prometheus  
nearly every time.

> - very limited and poorly extendabe, therefore small and easy to understand

Well that could be a problem. Small and easy are definite plusses, but I  
know that I don’t want to have to re-write tons of SDL code just to make  
a GPL’d game.

> - quite ugly. well we can do about that.

No comment on that one.

> - only good for one simple style of application

Ditto.

> - simple to use

I can only speak for myself, but I find SDL to be extremely easy to use.  
When Sam asked me to compile all the SDL demos and projects using SDL for  
SDL 8, I was able to update most of them from SDL 7 with little trouble.

> I assume that the interface of a game has to be recoded everytime. The  
> first thing the user sees is the menu, therefore a lot of design has to go  
> there, and creating a widget set which is versatile enough to cope with the  
> creativity of our designers is a really big job (the game I am working on  
> now has a menu with a slightly diagonal style, really cool but hard to  
> implement efficient…).

Well, if I think about all the games I’ve seen lately, a menu-type  
interface would be good, but it should be flexable enough that you  
could put text, images, or a combination of both. The buttons should  
also be flexable enough that you can change their color, size, shape, and  
even animated properties. Also good would be a movie-playing method (SDL  
has FLI/FLC, but I haven’t been able to test it).

> What I need a gui for are the tools. Almost any game needs an editor, and  
> the quality of the editor is an important factor for the quality of the  
> final game. It is a good idea to have an editor that uses the same engine  
> as the game, and therefore the editor should run in the same environment as  
> the game. I still hope to find a widget set that is simple enougth to be  
> ported to SDL, but I would prefer a highly limited application framework  
> that lets you concentrate on the real work while the interface comes from  
> itself. I assume I could do it in 64-80 KByte source+header, by porting or  
> adapting what I have done for my current game project.

You’re right. The quality of the editor does have a large impact on the  
quality of the game. However, I don’t know that it’s necessary for the  
editor and the game to have the same engine–look at the editors for  
WarCraft2, StarCraft, and TotalAnnihilation. Those editors have no  
“engine” to them, yet they allow you to do hundreds of things to the  
game, add/remove units, buildings, walls, and so on. And the editors for  
Quake, DOOM, and Descent that I’ve seen are almost like 3D CAD programs.

But you’re right, the editor should run in the same environment as the  
game (And by that, I mean if the game runs in X, the editor should too,  
and if the game runs in Win32, the editor should too.

As for the simple-to-use widget set for SDL, download and look at the  
sdl-demo archive. That adds almost a whole new level of usefullness to SDL.

> By the way, If you live in Germany, you might have a look at the “YARG”  
> article in the magazine “Next Level 11/98”. It contains some screenshots of  
> the editor I did and even a photograph of me…

Is there any way you could scan those and post 'em on the net anywhere?

-Knight Walker

---

<div class="post-metadata">

**Author:** ![Paulus\_Esterhazy](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/p/59ef9b/32.png) [@Paulus\_Esterhazy](https://discourse.libsdl.org/u/Paulus_Esterhazy)\
**Post date:** [October 29, 1998, 12:53am UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/11 "1998-10-29T00:53:17Z")

</div>

My 0,02 DM on this 🙂

1. Dierk is right. If you’re not writing a simulation game like SC2000, you  
don’t need a real gui, you have to do a menu which has, as pointed out,  
to be done manually anyway and some message boxes which should  
unique (nice word!) so the people don’t say what’s that? Hereos of Might  
and Magic 3 or what? We need a gui in the level editor. I first wrote a  
level editor manually which worked until a certain point. Making a dialog  
to select a file yourself takes a week or two and even then it has got  
its  
problems. I finally ended up using Delphi which is wonderful.
2. The problem with GTK is that it’s simply too heavy. All those toolkits  
were made to do complex guis and they’re not intended to render into  
a frame buffer but to be used by a real window manager. I think, what  
we would need more would be something very simple and light-weight  
with function calls like: DrawInputDialog( “Save filename”, “Enter the  
filename”,  
save\_filename, 60, CLRED, CLBLUE, DOUBLE\_FRAME );  
or DrawFrameWindow(10,10,80,80);  
and let the app do the mouse handling and such things theirselves. That  
would simplfy everything a lot and it would be still much to do  
(really!).  
Just think a second about fonts!  
Maybe even some simple text put routines (not with C++ classes, that’s  
rubbish) and box routines would help us…
3. Maybe you’re right - integrate GTK, OpenGL, Corba and Java into SDL  
and it would immediately turn into SUPER-SDL!

Paulus Esterhazy

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [October 30, 1998, 12:20am UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/12 "1998-10-30T00:20:06Z")

</div>

> To be quite honest, SDL is one of the easiest toolkits I’ve ever seen.  
> And I’ve been looking since I started learning to program X.

Thanks for the comments Knight, it’s great to get positive feedback. 🙂

> Take your pick. If you want it fast, you’re going to have to do a lot of  
> the work yourself. Sam can’t anticipate the particular needs of your  
> game, and if he even tried, it would be completely detremental to SDL.

I’ve been mostly quiet on the widgets issue for two reasons.

1. I think that they are a great idea, and should be a layer above SDL,  
as in a demo library.
2. I’m very interested in what you come up with. 🙂

> SDL is already programmable in either of those. That’s the advantage of  
> using C as a base, rather than C++ (Like Prometheus). If you know C++  
> then it should be fairly trivial to write extensible wrappers around most  
> SDL functions.

You can even emulate the Prometheus API using SDL. 🙂 Check out the PTC  
subdirectory in the demos archive.

> > - can be placed over a picture with pseudo-transparence ( for example :  
> > button will let us see the image that is under it )

> That is simply a matter of refresh order. If you refresh the button  
> first, then the image, it’ll work fine. Or if you just refresh the edges  
> of the button, it’ll do the same thing (But the image won’t move, which  
> might take away from the believability of it).

I think he means translucent buttons. This can be achieved using alpha  
blending. Check out the “testalpha” test program. Note that this looks  
really bad in palettized mode. You need to run in at least 16-bit color  
for it to work properly, without carefully managing your palette.

## See ya! -Sam Lantinga (slouken at [devolution.com](http://devolution.com))– Author of Simple DirectMedia Layer - [http://www.devolution.com/~slouken/SDL/](http://www.devolution.com/~slouken/SDL/)

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [October 30, 1998, 12:33am UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/13 "1998-10-30T00:33:51Z")

</div>

> > - runs well on double/triple - buffered screens

> That is something Sam might be interested in. I know he’s working on  
> double-buffering for SDL 9.

Double-buffering is completely supported as of SDL 0.9.6  
Check out the new “testsprite” test program for an example of how to use it.

> The assembler sections of SDL may be that fast. I know Sam has published  
> benchmarks between SDL and Prometheus, and SDL has out-run Prometheus  
> nearly every time.

brn and I have worked very closely to improve both SDL’s and PTC’s  
blitting. In fact, SDL now uses some of the same assembly blitters  
that PTC uses. The speed of PTC and SDL are now nearly comparable,  
with SDL having a slight edge because it uses C rather than C++.  
Some of the newer blitters in PTC may be faster than SDL in select cases,  
since I haven’t optimized some of the ones PTC has.  
BTW, optimizing a blitter is trivial, it just adds size to the library,  
so if you need a particular case to work really fast, let me know.

> As for the simple-to-use widget set for SDL, download and look at the  
> sdl-demo archive. That adds almost a whole new level of usefullness to SDL.

What people are asking for, menus, buttons, text widgets, etc., don’t come  
pre-built with the tools in the demo archives. You can build them with the  
demo libraries, in fact that’s what Maelstrom does, but there is definitely  
a lack of good widgets available for use with SDL.  
It’s true though, there’s a lot of other good stuff in the demos archive.  
_grin_

I’m probably going to come up with a scrolling text box widget, just to get  
debug output working nicely in some of the fullscreen evironments. This is  
at least three weeks out though. I want to get networking and some other  
things working first.

I want to give a big thanks to Dan Kegel of Activision for some excellent  
advice on the networking code, BTW. 🙂 It is going to rock! 🙂

## See ya! -Sam Lantinga (slouken at [devolution.com](http://devolution.com))– Author of Simple DirectMedia Layer - [http://www.devolution.com/~slouken/SDL/](http://www.devolution.com/~slouken/SDL/)

---

<div class="post-metadata">

**Author:** ![Nathan\_J\_Hurst](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/n/ac91a4/32.png) [@Nathan\_J\_Hurst](https://discourse.libsdl.org/u/Nathan_J_Hurst)\
**Post date:** [October 30, 1998, 2:57am UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/14 "1998-10-30T02:57:17Z")

</div>

> All thoses solutions for The GUI seems interesant. What I propose is that  
> before everyone developpe  
> his own toolkit, is that all people concert to know which is best.  
> GTK seems good, so porting it seems a good idea.  
> What I propose as Key feature for the GUI widget toolkit :
> 
> - Easy implementation
> - Good documentation
> - Fast
> - Nice
> - Programmable either in C or C++
> - can be placed over a picture with pseudo-transparence ( for example :  
> button will let us see the  
> image that is under it )  
> So, to conclude, I think it is important to speak and to take a decision  
> before beginning to program anything

I think Gtk Would be the best solution for GUIs, but a game really needs a  
more optimised gui if it is to work directly with animations etc. Sam and  
I have discussed N, and either me or pfh will eventually find what went  
wrong since we last used it. It does all the things mentioned above.

njhOn Thu, 29 Oct 1998, St?phane Magnenat wrote:

---

<div class="post-metadata">

**Author:** ![Knight\_Walker](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@Knight\_Walker](https://discourse.libsdl.org/u/Knight_Walker)\
**Post date:** [October 30, 1998, 4:01am UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/15 "1998-10-30T04:01:47Z")

</div>

> Double-buffering is completely supported as of SDL 0.9.6  
> Check out the new “testsprite” test program for an example of how to use it.

Now I just need a video card that can exploit the double-buffering…

> brn and I have worked very closely to improve both SDL’s and PTC’s  
> blitting. In fact, SDL now uses some of the same assembly blitters  
> that PTC uses. The speed of PTC and SDL are now nearly comparable,  
> with SDL having a slight edge because it uses C rather than C++.  
> Some of the newer blitters in PTC may be faster than SDL in select cases,  
> since I haven’t optimized some of the ones PTC has.  
> BTW, optimizing a blitter is trivial, it just adds size to the library,  
> so if you need a particular case to work really fast, let me know.

I noticed, when you posted the benchmarks. Personally, I think it’s  
great. Competition in the Linux world is something I’ll alway support.  
But I do believe C is faster than C++, which is why I prefer  
programming in C.

> What people are asking for, menus, buttons, text widgets, etc., don’t come  
> pre-built with the tools in the demo archives. You can build them with the  
> demo libraries, in fact that’s what Maelstrom does, but there is definitely  
> a lack of good widgets available for use with SDL.

Well, it’s been my experience that you almost need the demo archive to  
do anything useful without bogging yourself down in the lower levels of  
SDL. But that was the idea, right? 🙂

> It’s true though, there’s a lot of other good stuff in the demos archive.  
> _grin_

I’ll say. Now I just need an FLI/FLC so I can test the player out.  
I’d really like to see how it works, so I can try swindling a graphic  
artist I know into writing the cut scenes for me. 🙂

> I’m probably going to come up with a scrolling text box widget, just to get  
> debug output working nicely in some of the fullscreen evironments. This is  
> at least three weeks out though. I want to get networking and some other  
> things working first.

And then we can hack it into an in-game chat feature. 🙂

> I want to give a big thanks to Dan Kegel of Activision for some excellent  
> advice on the networking code, BTW. 🙂 It is going to rock! 🙂

So now we’ve got professional game programmers giving advice? We’re  
unstopable. :)On 29 Oct, Sam Lantinga wrote:

–

* * *

| |/ | | | \_ | | | mailto:@Knight_Walker |  
| / | / / | | [http://www.aros.net/~kwalker](http://www.aros.net/~kwalker) |  
| \ | \_\_\_ | | |  
| |\ | | / \ | | The Kobran Imperium (801)265-1299 |  
|_| |_| |_| |_| \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_/

---

<div class="post-metadata">

**Author:** ![Scott\_Stone](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@Scott\_Stone](https://discourse.libsdl.org/u/Scott_Stone)\
**Post date:** [October 30, 1998, 4:10am UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/16 "1998-10-30T04:10:04Z")

</div>

> > All thoses solutions for The GUI seems interesant. What I propose is that  
> > before everyone developpe  
> > his own toolkit, is that all people concert to know which is best.  
> > GTK seems good, so porting it seems a good idea.  
> > What I propose as Key feature for the GUI widget toolkit :
> > 
> > - Easy implementation
> > - Good documentation
> > - Fast
> > - Nice
> > - Programmable either in C or C++
> > - can be placed over a picture with pseudo-transparence ( for example :  
> > button will let us see the  
> > image that is under it )  
> > So, to conclude, I think it is important to speak and to take a decision  
> > before beginning to program anything
> 
> I think Gtk Would be the best solution for GUIs, but a game really needs a  
> more optimised gui if it is to work directly with animations etc. Sam and  
> I have discussed N, and either me or pfh will eventually find what went  
> wrong since we last used it. It does all the things mentioned above.

how would one integrate SDL and GTK into the same app, anyway? gtk wants  
its gtk\_main() run, and I assume SDL doesn’t have a toplevel event handler  
like that at all, but if it does, it’s different, right?On Fri, 30 Oct 1998, Nathan Hurst wrote:

> On Thu, 29 Oct 1998, St?hane Magnenat wrote:

* * *

Scott M. Stone \<sstone at [pht.com](http://pht.com), sstone at pht.co.jp\>  
Head of TurboLinux Development/Systems Administrator  
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)

---

<div class="post-metadata">

**Author:** ![Michael\_Samuel](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/m/bc8723/32.png) [@Michael\_Samuel](https://discourse.libsdl.org/u/Michael_Samuel)\
**Post date:** [October 30, 1998, 4:24am UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/17 "1998-10-30T04:24:38Z")

</div>

> > What people are asking for, menus, buttons, text widgets, etc., don’t come  
> > pre-built with the tools in the demo archives. You can build them with the  
> > demo libraries, in fact that’s what Maelstrom does, but there is definitely  
> > a lack of good widgets available for use with SDL.
> 
> Well, it’s been my experience that you almost need the demo archive to  
> do anything useful without bogging yourself down in the lower levels of  
> SDL. But that was the idea, right? 🙂

I think that widgets are perfectly suited to the demo collection. SDL stands  
for “Simple Direct Media Layer”. I see nothing simple or direct media about  
a widget set.

Of course, there is nothing wrong with making an LGPL demo library of a widget  
set that goes on top of SDL, as was done with screenlib.

Networking support is right on the border of whether it should be part of the  
main SDL library or not, IMHO…On Thu, Oct 29, 1998 at 09:01:47PM -0700, kwalker at [aros.net](http://aros.net) wrote:

–  
– Michael Samuel

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [October 30, 1998, 6:01am UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/18 "1998-10-30T06:01:40Z")

</div>

> Well, it’s been my experience that you almost need the demo archive to  
> do anything useful without bogging yourself down in the lower levels of  
> SDL. But that was the idea, right? 🙂

Yep. 🙂

> > I’m probably going to come up with a scrolling text box widget, just to get  
> > debug output working nicely in some of the fullscreen evironments. This is  
> > at least three weeks out though. I want to get networking and some other  
> > things working first.

> And then we can hack it into an in-game chat feature. 🙂

Hey, why not? 🙂

> So now we’ve got professional game programmers giving advice? We’re  
> unstopable. 🙂

_grin_

## See ya! -Sam Lantinga (slouken at [devolution.com](http://devolution.com))– Author of Simple DirectMedia Layer - [http://www.devolution.com/~slouken/SDL/](http://www.devolution.com/~slouken/SDL/)

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [October 30, 1998, 6:02am UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/19 "1998-10-30T06:02:52Z")

</div>

> Networking support is right on the border of whether it should be part of the  
> main SDL library or not, IMHO…

It will depend on how useful and how simple the networking support is.  
We’ll see. 🙂

## See ya! -Sam Lantinga (slouken at [devolution.com](http://devolution.com))– Author of Simple DirectMedia Layer - [http://www.devolution.com/~slouken/SDL/](http://www.devolution.com/~slouken/SDL/)

---

<div class="post-metadata">

**Author:** ![Peter\_Hawkins](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/p/57b2e6/32.png) [@Peter\_Hawkins](https://discourse.libsdl.org/u/Peter_Hawkins)\
**Post date:** [October 30, 1998, 7:52am UTC](https://discourse.libsdl.org/t/possible-gui-solution/650/20 "1998-10-30T07:52:37Z")

</div>

Hi there…

Sam Lantinga wrote:

> > > - runs well on double/triple - buffered screens
> 
> > That is something Sam might be interested in. I know he’s working on  
> > double-buffering for SDL 9.
> 
> Double-buffering is completely supported as of SDL 0.9.6  
> Check out the new “testsprite” test program for an example of how to use it.
> 
> > The assembler sections of SDL may be that fast. I know Sam has published  
> > benchmarks between SDL and Prometheus, and SDL has out-run Prometheus  
> > nearly every time.
> 
> brn and I have worked very closely to improve both SDL’s and PTC’s  
> blitting. In fact, SDL now uses some of the same assembly blitters  
> that PTC uses. The speed of PTC and SDL are now nearly comparable,  
> with SDL having a slight edge because it uses C rather than C++.  
> Some of the newer blitters in PTC may be faster than SDL in select cases,  
> since I haven’t optimized some of the ones PTC has.  
> BTW, optimizing a blitter is trivial, it just adds size to the library,  
> so if you need a particular case to work really fast, let me know.
> 
> > As for the simple-to-use widget set for SDL, download and look at the  
> > sdl-demo archive. That adds almost a whole new level of usefullness to SDL.
> 
> What people are asking for, menus, buttons, text widgets, etc., don’t come  
> pre-built with the tools in the demo archives. You can build them with the  
> demo libraries, in fact that’s what Maelstrom does, but there is definitely  
> a lack of good widgets available for use with SDL.  
> It’s true though, there’s a lot of other good stuff in the demos archive.  
> _grin_
> 
> I’m probably going to come up with a scrolling text box widget, just to get  
> debug output working nicely in some of the fullscreen evironments. This is  
> at least three weeks out though. I want to get networking and some other  
> things working first.

> I want to give a big thanks to Dan Kegel of Activision for some excellent  
> advice on the networking code, BTW. 🙂 It is going to rock! 🙂

Can I just make a request at this point that you split up the SDL into seperate  
libraries? I know you only get for example what you request from SDL\_Init(), but  
I’d feel a lot more comfortable that when I write an application which only uses  
the networking support, I get **only** the networking support, not a bunch of  
other stuff hanging round unwanted in memory.

It’d also mean that you’d only have to distribute the relevant components with  
your application (remember static linking isn’t an option for non GPLed code) - as  
opposed to the whole library.

🙂  
Peter\>

> See ya!  
> -Sam Lantinga (slouken at [devolution.com](http://devolution.com))
> 
> ## – Author of Simple DirectMedia Layer - [http://www.devolution.com/~slouken/SDL/](http://www.devolution.com/~slouken/SDL/)

[Next page](https://discourse.libsdl.org/t/possible-gui-solution/650.md?page=2)
