Thursday, October 27, 2011

Development's ups and downs

Game development is sometimes testing! You get stuck on things, you go through boring phases, you wonder if you are going in the right direction. Often you have to fight though it to get that little reward that keeps you going.

Perseverance is not a long race; it is many short races one after another. - Walter Elliott
I do not think there is any other quality so essential to success of any kind as the quality of perseverance. It overcomes almost everything, even nature. - John D. Rockefeller
The road to success is dotted with many tempting parking places. - Author Unknown
It's not that I'm so smart, it's just that I stay with problems longer. - Albert Einstein

And I guess now I ought to stop reading quotes and do some work. :o)

Tuesday, October 11, 2011

UI for Allegro 5

I found a nice UI system called GWEN. It has lots of advanced features and is very easy to embed. It sits nicely on top of your application and can just be wired into its resources, to save competing systems, e.g. input or texture management.

Example of Gwen UI from the Gwen site.
I ported it to Allegro 5, which was quite easy as the renderer and input abstractions are well designed. I did it on the Mac, but it also works just fine on my old Windows XP laptop. Gwen also provides rendering backends for OpenGL, DirectX, SFML, and Windows GDI.

[Note] I have forked GWEN in order to fix various issues with Allegro 5, etc. There are notes in the readme and on the wiki. You may want to prefer this version if you are using Allegro 5. Please report any issues in the Github issue tracker for Gwork.

If you have used Delphi, or Windows Forms you'll probably find it quite easy to pick up. There are unit test examples from which to learn, but other than that you have to plough through the code at the moment. Hopefully more docs and comments will appear soon to ease the learning curve. There is a small tutorial on doing layout with docking.

One of the things that is really nice about Gwen is the skinning system. It is all laid out in one bitmap, along with the colour scheme at the bottom.

The default skin for Gwen.