Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Making a GUI: What libraries should I use?

This thread is locked; no one can reply to it. rss feed Print
Making a GUI: What libraries should I use?
someone972
Member #7,719
August 2006
avatar

So I'm going to make myself a GUI system and I was wondering which libraries I should use. I want it to be able to change themes and orientations of windows and such, along with being able to change the primitives like buttons in a script/cfg file. Should I use Lua or is that more complex than what I need? I've also been debating switching to Allegro 4.9 for speed reasons. Can 4.9 render models, or is there a way to insert direct OpenGL into it? Thanks for any advice you can give :D.

______________________________________
As long as it remains classified how long it took me to make I'll be deemed a computer game genius. - William Labbett
Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why. -Unknown

juvinious
Member #5,145
October 2004
avatar

When I worked on mine (I haven't worked on it in like 2 years) I made it modular so that I can allow any graphics lib to be used. I also incorporated the ability to use xml for quickly putting together widgets and used freetype2 for the font system. I'd suggest being minimalistic, I ended up committing tons of resources and adding features that it got infinity complex. Eventually I'll revisit the project and redo the whole thing, but for now I'd look at a project such as GUIchan to get some ideas.

__________________________________________
This is devoid of any meaning.
Paintown

m c
Member #5,337
December 2004
avatar

I also recommend keeping it simple. Also, if you are only going to use this in allegro at first, you can save some effort and make use of much of allegro to implement something good enough, but more importantly both highly usable and easy to write.
You are going to have to write those widgets anyway, so you may as well have a .c file for each one and use allegro functions on it's private BITMAP (which might be a sub bitmap of it's window's bitmap) at render time or something like that.

All that I am saying is a easy, working gui finished yesterday is better than worrying about making super-portable Yet Another GUI that you're still messing about with next Thursday. That's the method that I took with mine, and I'm not ashamed at all ;D

(\ /)_____#_____####__#
(O.o)¯¯¯#¯¯¯¯¯#¯¯¯#¯¯#
(> <)__####__####__####
Megabytes are where I keep my Data.

someone972
Member #7,719
August 2006
avatar

So anyone know if you can do 3d rendering in 4.9? I ask because I want to display 3d models that use certain textures when a texture is selected. I originally wrote the render function with OpenGL, so if that's able to be inserted it would be great.

______________________________________
As long as it remains classified how long it took me to make I'll be deemed a computer game genius. - William Labbett
Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why. -Unknown

Dario ff
Member #10,065
August 2008
avatar

It uses Direct3D or OpenGL, so you can render 3D models, but Allegro doesn't provide any routines I know of. There's even one example in the Allegro SVN that integrates it with Ogre, though I think it's not working right on other platforms ATM.

TranslatorHack 2010, a human translation chain in a.cc.
My games: [GiftCraft] - [Blocky Rhythm[SH2011]] - [Elven Revolution] - [Dune Smasher!]

bamccaig
Member #7,536
July 2006
avatar

Anybody else think an XForms implementation for Allegro would be useful? :)

m c
Member #5,337
December 2004
avatar

Yeah I guess that that would be pretty cool, if someone actually did it.

(\ /)_____#_____####__#
(O.o)¯¯¯#¯¯¯¯¯#¯¯¯#¯¯#
(> <)__####__####__####
Megabytes are where I keep my Data.

Schala Zeal
Member #11,509
November 2009
avatar

Would be useful to see a GUI like Qt or wxWidgets tie into Allegro. SDL and wxWidgets can already be used with Allegro.

Speaking of SDL though, one of the reasons I avoid it is their policy to provide the DLL of every addon used or you're forced to GPL your program. It's ridiculous. Why can't they just rely on being accredited instead of DLL hell?

You could try TGUI, which is Trent's barebones GUI kit that can be used with Allegro 4.9:

http://trent.gamblin.ca/tgui/index.html

Go to: