?

Log in

No account? Create an account

Previous Entry | Next Entry

Traveller Universe

While Universe 1.7 continued to sell in 2009 work continued with developing Universe 2.

The IEL import function is complete and the IEL export function nearly so.

I can now display subsector maps in ‘rich detail’ format.  Universe 1 allowed specific features to be turned on or off, and re-rendered the map accordingly.  To speed up responsiveness Universe 2 renders maps as a series of transparent layers (different features on different layers) which are combined in the ‘view’ dynamically.  This uncovered a short-coming with the way text is anti-aliased in C#:  Each pixel has 4 bytes … red, green, blue, and alpha.  Red-green-blue just like web colours, alpha is for opacity.  The anti-aliasing routines for text ignore alpha and compute edge pixels as a gradient between the text colour and the background colour.  The ‘transparent’ colour is all bytes set to zero (or completely see-through black).  That isn’t what’s wanted.  The answer was to ‘roll my own’ anti-aliasing code and you can see that over on Code Helmet.

Universe 1 had multiple ‘universes’ (each in a separate database), each with a referee and a player group.  Universe 2 has multiple ‘campaigns’ (all in a common database), each with a referee and multiple player groups.  Functions have been added to add new player groups, delete them, merge them and clone them.  Universe 2 also now has campaign templates … basically a ring-fenced campaign: when creating a new campaign you can base it on a template (ie. copy the template campaign to the working campaigns area).  Campaigns and player groups have an active flag (non-actives are hidden from players logging in).

I’m still not happy with the whole exception and error handling approach.  I’ve been playing with Enterprise Application Blocks to see if they help … hmmm.