I have added another SDL-based GUI library to the list of ports I am working on. This library is called Agar. It is a full-featured GUI toolkit unlike Guichan which is very minimal. With this library you can create very simple to very complex GUI-based applications very efficiently. The API is powerful but applications can be created quickly with a minimal amount of code when necessary as the library can be allowed to handle the majority of the GUI work for you. Alternatively you can control things at an intricate level to produce highly customized applications. Agar is a mature library and there are widgets built in for most common needs. Also, the work required to create a custom widget is minimal allowing inheritance from any widgets already present. The applications you build with Agar are also highly portable as Agar can be used with Windows, Linux, OS X, PS2, GC/Wii, and many others (most anything that supports SDL or OpenGL.)
Agar can be themed and it is skinnable. It could be used to make many of the launcher interfaces we are accustomed to with a much faster production time. It can be used to create a launcher, a complete GUI-based application, or it can be used within your game for your games interface needs.
The library depends on the libSDLx, SDL_Image, and Freetype libraries all of which can be found in the SDLx svn repository on Huntsvegas. The file browser widget can load files from the D:\ path (the running games directory) but it cannot yet navigate around the file system. The controller is also not yet supported so a keyboard and mouse is needed. Those two things are the top priorities for completing the port. As it is you could receive the joystick input with SDL and make the warp mouse calls yourself to move the cursor around the screen. Agar can use hardware rendering through OpenGL but the Xbox port uses the sdlfb driver since OpenGL is unavailable.
The library should be easy to compile once the library dependencies are properly configured in your VC++ Project Directories setting (Tools->Options->Projects->VC++ Directories). Once you have the library compiled you will find in the demos directory a project that contains 23 total demo applications. All have been modified for the Xbox. With your Xbox on at your XDK dash you should be able to build the project and all the demo applications will be on your dash to try out. A couple of them will require you to copy a file or two into the demos directory that the xbe's are in on your Xbox in order to work correctly. Building the demos does not require configuring the VC++ Project Directories Setting for the Agar libs as the projects use relative paths for that but when you make your own application you should use the VC++ Project Directories setting.
Using the SDLx library available on my repository you can run your Agar application at HDTV resolutions. In the demos you will find that I used 600x450 as the resolution much of the time. The reason I did this is because Agar will use the closest resolution, draw the GUI at the resolution requested, and center it. So using 600x450 gets me a 640x480 picture with the GUI placed nicely in the televisions viewable area. That way you can compensate for overscan without sacrificing image quality as you do when using the SDLx resize function. This is important because using the resize function may not noticeably impact graphics but it has a huge negative impact on fonts. It can make fonts completely illegible. Compensating for overscan the way I do in these Agar demos means that the fonts are perfectly clear and there is no negative impact to the image quality. If you search the demos for the word "HDTV" you will find a couple spots I wrote in where you can swap a line of code to try the demo out in 720p. You will notice that for 720p I use the resolution 1230x685 for a good overscan compensation.
Unfortunately I did not realize that a new major release was made before the weekend. They have moved to 1.4. I worked on what I had downloaded in the middle of the week which was 1.3.5. So that is what is in the repository. I plan to move to the new 1.4 release as soon as possible.
For more info
View the Agar website here: http://libagar.org/
View the Huntsvegas SVN Repos thread here: http://forums.xbox-scene.com/index.php?showtopic=710866
Any comments, ideas, questions, and especially patches are welcome!
Now I will post some screenshots for your viewing pleasure. These are a few of the demos available in svn.
Here is the Xbox on the XDK dash showing part of the demos list:
This is the "Loader" demo running at 480p with the Xbox visible:
Here is the "Loader" demo running in 720p with a couple images loaded. DISCLAIMER: I did not pick these pictures. They were included with the demo:
Here is the "Themes" demo at 480p:
The "Themes" demo at 720p:
A screen grab of the "Plot" demo at 480p:
Here are some 720p screen grabs. You can see the empty overscan area in these:http://www.huntsvegas.org/screenshots/Xbox...loader-720p.jpghttp://www.huntsvegas.org/screenshots/Xbox...themes-720p.jpgThis post has been edited by Hyper_Eye: Apr 19 2010, 12:02 AM