Sdl Gui Library
Posted 10 March 2010 - 10:35 PM
Before I get too deep into this I was wondering if anyone has already ported one of the SDL GUI libraries to Xbox. I could not find anything on the subject so I suspect that it either hasn't been done yet or anyone who has done it hasn't made their work publicly available. I thought it would be worth asking. Should I get guichan working (which I don't anticipate being unable to achieve it) I will make the work available. Thanks for any info.
Posted 11 March 2010 - 10:37 AM
I assume you might find usefull stuff in it to create your user interface for the Odamex xbox port.
Most of his emulators are also ports of the emulators for the windows or linux platform.
It's the material I would use as reference.
Posted 17 March 2010 - 02:39 AM
Luckily I have not had too much trouble porting guichan...
Posted 17 March 2010 - 03:49 AM
Posted 17 March 2010 - 01:24 PM
All the work being done for this effort is committed into our repository though and as I work I continue to make commits. It can all be found in the odameXbox branch of the odamex svn repository.
Is the guichan port commited to the same branch?
Posted 17 March 2010 - 02:44 PM
Posted 17 March 2010 - 03:57 PM
Posted 21 March 2010 - 12:56 AM
Is the guichan port commited to the same branch?
The guichan port will not be committed into the Odamex svn repository as it is an external dependency (assuming that I decide to go with guichan for the interface.)
Hey, I was wondering, will you be releasing your source for the Xbox port of guichan? I think it would be a great contribution to the scene and I personally would like to mess around with that and compare your code to the PC code to try and learn a few things. I have studied the Xport interface a lot trying to implement it in other applications.
Guichan was portable out-of-the-box. The SDL port did all the work. I ditched any code that wasn't relevant to the SDL backend. The issue with getting it to run was due to dynamic casts in guichan which required that RTTI (RunTime Type Identification) be enabled. Without that exceptions were thrown whenever a dynamic cast was made. Once that was done everything worked great. I am trying to decide whether or not I want to add support for the Xbox controller into the library itself or just put that in the interface code. If I were to make a change like that I would see where committing the code to a repository would be necessary. If not I think it would be good enough to simply put together a package with the libs built and headers for developers to use and a source package as well that could be obtained from the usual places.
Posted 31 March 2010 - 11:40 PM
Posted 03 April 2010 - 10:33 PM
You can also make your own pretty easily as you can tell at that link. So the answer is yes... you can use custom fonts that will look good on any television.
I was actually preparing a couple subversion repositories for the Xbox libraries I am working on. I already got the SDLx repository up but as I was about to get the guichan Xbox repository up I started feeling intense abdominal pain. I had to go to the emergency room and I was passing a gallstone through a bile duct and it was the most painful thing I have experienced in my entire life. The next day I had my gallbladder removed and now I am recovering. So I was in the process of making this stuff available for you guys when I had a medical emergency so I will get back to this after my recovery or at least when I can stop taking the pain medicine long enough to think through getting it done. I had a very similar experience last year but the problem turned out to be appendicitis and they took out my appendix. Losing an organ a year doesn't seem very sustainable. Appendicitis is pretty painful, btw, but passing a gallstone is about 100x worse.
Posted 05 April 2010 - 12:08 PM
Hope you get well fast.
You only realise the importance of health if you don't have it anymore.
all the best.
Posted 05 April 2010 - 11:07 PM
I will be sharing that subversion info very soon.
Posted 18 April 2010 - 11:56 PM
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-s...howtopic=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:
Edited by Hyper_Eye, 19 April 2010 - 12:02 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users