Allegro.cc - Online Community

Allegro.cc Forums » The Depot » Guichan GUI Library - Beta testers wanted

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Guichan GUI Library - Beta testers wanted
Per Larsson
Member #276
April 2000
avatar

Guichan is a GUI library in C++ made especially with games in mind, and it has just been released. We have done our best to create a library that is small, but powerful. The design is somewhat inspired by Java's swing, but without all the bloat (like layout handlers and such).

Main features:
- Modular object-oriented design, with replaceable back-ends for graphics and input. Allegro, OpenGL and SDL is supported out-of-the-box.
- NO themes! Instead of having a complicated theme or skin system to change the appearance of the widget - you just overload the widget's draw method and draw it any way you like.

Screenshots, downloads, documentation and additional information can be found on: http://guichan.darkbits.org/

This is the first version released to the public, so we would really like some feedback on the library, especially the API. At least, it would be very helpful if you could download it, try the examples and tell us if it worked or not.

________________________
Guichan!

Thomas Fjellstrom
Member #476
June 2000
avatar

From my little look around, the API looks neat. Should be very capable, and judging by the screenshots, it is.

edit: Error in compiling on linux. Seems it (src/widgets/icon.cpp) expects a "container.hpp" in the "include/guichan" dir, but there isn't one :o

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Næssén
Member #5,025
September 2004
avatar

I fixed the compile error in the source version. If you want to give it another try just download it again.

Edit: Ops! Found another compile error. (I had forgotten to uninstall an old version of Guichan where container.hpp was misplaced, so I didn't notice the errors when I made the test compiles). Hopefully it will now compile without errors.

_____________________
darkbits.org | Google+

axilmar
Member #1,204
April 2001

Not bad...not bad at all.

Mandrake Root Produc
Member #300
April 2000

Nice. I'm dloading it now to see how it compares to the snes RPG GUI lib I've been working on.

Thomas Fjellstrom
Member #476
June 2000
avatar

Everything seems to work fine :)

My question, when you make a game using this lib, does it force you to make the game play area "just another widget" ?

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Næssén
Member #5,025
September 2004
avatar

No it does not! Guichan never takes over your application. That is one of the main reasons we made Guichan, because most Gui's does that.
But of course, if you want to you could make your game area a widget. The main loop of a Guichan application looks something like this:

while(running)
{
  myGame->logic(); // Your Game
  gui->logic();    // Perform Gui logic such as input
  myGame->draw();  // Draw your game with Allegro or something
  gui->draw();     // Draw the Gui on top of your game graphics
  updateScreen();
}

_____________________
darkbits.org | Google+

Steve Terry
Member #1,989
March 2002
avatar

Very impressive guys :)

___________________________________
[ Facebook ]
Microsoft is not the Borg collective. The Borg collective has got proper networking. - planetspace.de
Bill Gates is in fact Shawn Hargreaves' ßî+çh. - Gideon Weems

Per Larsson
Member #276
April 2000
avatar

Thank you for your comments, everyone.

Mandrake:
You should check out the source to the FF Demo on the homepage. I guess it is kind of hard to read (we hacked it together in a weekend, the code is quite messy.. and oh, it is lacking comments), so if you want to I can go through it and clean it up a bit. It also requires some knowledge to how Guichan works, so check out the other examples and the API reference first.

________________________
Guichan!

Mandrake Root Produc
Member #300
April 2000

Quote:

No it does not! Guichan never takes over your application. That is one of the main reasons we made Guichan, because most Gui's does that.
But of course, if you want to you could make your game area a widget. The main loop of a Guichan application looks something like this:

That’s actually what I was doing with my SNES style GUI app. It never took over your whole program.

Quote:

You should check out the source to the FF Demo on the homepage. I guess it is kind of hard to read (we hacked it together in a weekend, the code is quite messy.. and oh, it is lacking comments), so if you want to I can go through it and clean it up a bit. It also requires some knowledge to how Guichan works, so check out the other examples and the API reference first.

I did actually. Read through it- very nice. Although also very different from what I was trying to accomplish.

Torbjörn Josefsson
Member #1,048
September 2000
avatar

Darn - I was thinking I'd download it and give it a spin, but the download-links don't work :(

--
Specialization is for insects

Per Larsson
Member #276
April 2000
avatar

Torbjörn: Ouch... Looks like our server is down. I'll let Olof kick it around a bit, and hopefully it will be up soon.

EDIT: Olof has lost internet connection where he (and the server) lives. We don't really know how long it will be down, but we'll try to find a temporary place to put the files in the meantime.

________________________
Guichan!

Næssén
Member #5,025
September 2004
avatar

I'm sorry for our server downtime. My internet provider had a malfunction or something. But as far as I know they've fixed it for now so go and download Guichan and give us feedbacks!

_____________________
darkbits.org | Google+

Torbjörn Josefsson
Member #1,048
September 2000
avatar

The demo looks very nice - even though it uses SDL ;)

I'm sick right now, so I don't have brains enough to check it out, but I will later - if this is as good as it seems, I'm definitely gonna have to use it

--
Specialization is for insects

Per Larsson
Member #276
April 2000
avatar

Glad you liked it, Torbjörn.

Remember that this is just a first beta version, we are still finding bugs here and there. Expect a new version not too long.

Quote:

The demo looks very nice - even though it uses SDL

We are terribly sorry for the psychological pain this may have caused you. ;) Anyway, the beautiful part is that demo should be quite easy to port to allegro, as it uses Guichan for drawing and input. (just take out SDL input and graphics objects, and pop in allegro's equivalents)

________________________
Guichan!

gillius
Member #119
April 2000

I just wanted to say that I looked at the docs (Doxygen-generated?) and this looks like the GUI library I've been looking for for quite awhile, if it does everything the docs seem to imply. There are a few key things missing from almost every GUI library I've seen that I've needed or wanted support for:

    From what I can tell, guichan meets all of these points, so I am excited about it -- but I haven't done game development for awhile so I hesitated to comment because I would have liked to try it out first, but I wanted to make my thoughts known in the hopes that it would be an encouragement to the project.

    If I do decide to use it, my game engine runs Direct3D on MSVC.NET 2003 so I would definitely work on porting the library to that environment to complete its support, but given my situation it seems unlikely.

    EDIT: And my earlier mention of C++ I didn't mean C++ as in "let's put functions in a class and it's C++" but it looks like the library actually uses C++ as intended with OO design and usage of features like exceptions and std library such as std::string. Also it seems to be motivated by Java Swing and Swing's API is awesome (soft e's would call GuiChan a MVC library).

    Gillius
    Gillius's Programming -- https://gillius.org/

    Næssén
    Member #5,025
    September 2004
    avatar

    gillius said:

    If I do decide to use it, my game engine runs Direct3D on MSVC.NET 2003 so I would definitely work on porting the library to that environment to complete its support, but given my situation it seems unlikely.

    Extending Guichan to support DirectX should be fairly easy. One just have to implement a DirectX graphics class, a DirectX input class and a DirectX imageloader class. We haven't done it because none of us have enough knowledge of DirectX (and it can take some time before one of us even considers learning DirectX).
    If you decide to help us we will be very happy.

    gillius said:

    I wanted to make my thoughts known in the hopes that it would be an encouragement to the project

    Thanks!

    _____________________
    darkbits.org | Google+

    Synapse Jumps
    Member #3,073
    December 2002

    I downloaded the FFDemo and noticed that it comes with LibPNG and only usus PNGs for the images. Is this a necessity, that is, does the library require LibPNG, or just a possible add-on? Other than that it looks wonderful. I wish I had time to Beta test it for you guys, but school is kicking my arse.

    EDIT: Also, is there any plans for a DRS? You may even be able to use (with some modifying, of course) existing ones floating around here. I know Steve Terry and Miran Amon have some, but I can't tell you it's alright to use them, since it's their stuff :P

    Steve Terry
    Member #1,989
    March 2002
    avatar

    Everything I write is open/free source, use it as you wish... just give me the appropriate credits.

    ___________________________________
    [ Facebook ]
    Microsoft is not the Borg collective. The Borg collective has got proper networking. - planetspace.de
    Bill Gates is in fact Shawn Hargreaves' ßî+çh. - Gideon Weems

    Per Larsson
    Member #276
    April 2000
    avatar

    Quote:

    I downloaded the FFDemo and noticed that it comes with LibPNG and only usus PNGs for the images. Is this a necessity, that is, does the library require LibPNG, or just a possible add-on?

    libpng is used by SDL_Image which is used by the SDL back-end to load images. So if you use the SDL back-end we supplied, then yes, you'll need libpng. The Allegro back-end does not need libpng (it uses only Allegro to load images).

    Quote:

    Also, is there any plans for a DRS?

    DRS should be possible to implement without even changing the library itself, but you'll need to overload a few classes (widgets and graphics object). We have no plans to implement dirty rectangles in the library in the near future (we don't see any reason to).

    ________________________
    Guichan!

    Synapse Jumps
    Member #3,073
    December 2002

    Quote:

    We have no plans to implement dirty rectangles in the library in the near future (we don't see any reason to)

    Alright, I can probably just steal, I mean, borrow ST's then ;);D

    Quote:

    The Allegro back-end does not need libpng (it uses only Allegro to load images).

    Is it possible for people to use it if they want? Not that I want to, I'm just curious at this point

    This seems like a beautifully designed GUI, and I especially like it's flexibility! Good job guys!

    Per Larsson
    Member #276
    April 2000
    avatar

    Quote:

    Is it possible for people to use it if they want? Not that I want to, I'm just curious at this point.

    Sure. All images are loaded with the ImageLoader you provide at initialization. What you have to do is to create a subclass of ImageLoader (or AllegroImageLoader), that is able to load png-files with libpng into allegro BITMAPs, and use that for image loading by calling Image::setImageLoader(myAllegroPNGImageLoaderInstance).

    ________________________
    Guichan!

    spellcaster
    Member #1,493
    September 2001
    avatar

    Nope, all you need to do is to register the png format to allegro. Most allegro PNG plugins do that already, so it should work out of the box once you include the allegro pNG handler.

    And I really want to check this lib out, seems to be pretty awsome :)

    --
    There are no stupid questions, but there are a lot of inquisitive idiots.

    Per Larsson
    Member #276
    April 2000
    avatar

    Quote:

    Nope, all you need to do is to register the png format to allegro. Most allegro PNG plugins do that already, so it should work out of the box once you include the allegro PNG handler.

    You are right, spellcaster. Somehow that seems so much easier :)

    ________________________
    Guichan!

    gillius
    Member #119
    April 2000

    I spent a bit of time today looking through the code. Really great. Documented very well. I so rarely find libraries this close to my coding/design preferences. It looks like it will be really easy to do a D3D driver for this. Only one question, when is endPaint to be called? I'm thinking of batching up all of the operations in Graphics in AGP memory/vertex buffers so that I can minimize state changes (ie draw all rectangles followed by all pixels etc). If it is worthwhile I could do it there, although I just realized that it might be pointless because it seems that Guichan sets clip areas for each component when it draws, and if that is the case I doubt I could batch operations as they would all need to be drawn with the same attributes.

    Gillius
    Gillius's Programming -- https://gillius.org/

     1   2 


    Go to: