Tuesday, August 21, 2007


I've now finished the restructuring of how labels and chat bubbles are handled. The new system is much more robust and efficient. Instead of creating the chat widgets from scratch every time a npc says something I now keep a dynamically growing pool of already allocated widgets from which I check out and return widgets once they're not shown anymore. I created some utility classes for general widget pool behaviour which should hopefully be reusable for other widgets in the future ("WidgetPool.h").
Labels are now shown for all entities that inherit from the "character" entity type. That includes pretty much all npc and animals in the game world. For now it's a hard coded check, but it could either be added as an Action to the modelmapping definitions, or as a new rule format (perhaps in lua?). If an entity is controlled by an outside client (i.e. a human) the name is pre- and suffixed with "!" signs. This will be very useful as it will now be easier to see which entities that are controlled by other users.
I also use a new, bolder font for the text. And I added some gradients. The latter might look a little garish, but it helps alot with showing the text on light backgrounds (white text on white background is no good...).
I also solved a strange issue where the text previously always lagged one frame behind the camera. So when the camera moved the text "swayed" a little. It looked quite strange. However, since I now listen for the actual Ogre render call before I position the windows, that issue has disappeared.

The guys over at fedora-games have been interested in packaging WF tech for a while. They already have builds of both Cyphesis and Sear, but alas no build of Ember. There were two reasons for this:
  • Ember used WFUT which in turn used Java, which was kinda cumbersome
  • Ember required Lua 5.0 and didn't work with Lua 5.1 which is what's shipped with Fedora
However, since some releases we're using libwfut and have no dependency on java anymore. That leaves the Lua issue. Yesterday I took a look at how hard it would be to allow for both Lua 5.0 and 5.1 to work with Ember. Turns out it wasn't hard at all: some #ifdefs later I had a working app which used Lua 5.1. This does however require that CEGUI is built with Lua 5.1, but there are patches available for that (Fedora itself builds CEGUI with 5.1).

All in all this might make me do a 0.5.1 release pretty soon, so that the Fedora guys can get cracking on getting Ember to be included in their package.
Post a Comment