Monday, September 26, 2011

wxWidgets keyboard handling

The cross platform code that isn't.

A couple of weeks ago, another piece of wxWidgets infrastructure in the Alter Aeon client was replaced with custom code.  This time, it was the bulk of the keyboard handling code that fell in battle.

In theory, the wxWidgets keyPressEvent is where you should trap out various key combinations; things like 'a', the escape key, and 'control-c' pairs.  Certainly under linux, nearly all of these worked correctly, and the ones that didn't were obscure and not really worth hunting down.  When I first ported to Win32, all that changed.

In Win32 builds, a lot of keys were not handled by the key press event.  You'd press the key combination, and nothing would happen.  It was like the operating system was trapping out the key combination and never bothering to pass it up the stack.  As it turns out, that's pretty much exactly what was happening.

I did eventually get the Win32 builds to work by intercepting a handful of keys at the keyDownEvent and keyUpEvent layers.  When I finally found these, it was hugely helpful; in the end, I trapped on the order of 30 key combinations to do away with things like annoying system beeps and idiotic behavior of the default keystrokes, in addition to handling our own special control combinations.

Enter Mac OSX.  Enter a whole new raft of keyboard weirdness.  I hacked on this for about an hour, and quickly realized that I was on the path to madness.  The code was becoming a rat's nest of ifdefs with key combinations trapped out in multiple different layers in different operating systems.

About the only thing that could be called consistent between any of the operating systems was that the keyDownEvent and keyUpEvent were always reliable.  The solution then seemed obvious:  move everything down into the keyDownEvent, and ignore everything else.  Intercept the keyboard control -before- wxWidgets could do anything stupid with it.

Keyboard control now works consistently and reliably on all three platforms.

Monday, September 19, 2011

2011 Cleric Class Update

The 2011 Alter Aeon "Cleric Update" is now live!  This update contains a lot of changes to improve traditional cleric spells, add a new mode of casting for mages, and clean up other spells and skills that have traditionally not been as awesome as they could be.  Here's a list of the most major changes:

- Mages now have the ability to 'channelcast' (ccast) certain elemental spells in combat.  Channelcasting takes longer than regular casting, but is interruptible and costs substantially less mana.  This feature allows mages to become a true 'blaster' class without compromising healing mana.

The channel casting skills are 'fire focusing', 'ice focusing', 'lightning focusing' and 'crystal focusin'.  The fire plane is easiest to reach, and hence it's the lowest level and easiest to channel.  The crystal plane is much harder to reach and only high level mages will be able to channel from it.

- Added a necromancer spell 'bone dragon', which allows you to fly around over the landscape.

- Ice imprison and crystal prison have been updated.

- Ward good and ward evil are now more powerful.

- The charm spell has been updated to make it easier to land and to use control points similar to controlled necromancer minions.

- The peace spell has been improved.

- A level 19 curse, 'overconfidence', has been added.
- A level 19 spell, 'hold undead', has been added.
- A level 28 spell, 'sacred touch', has been added.
- A level 29 spell, 'solace', has been added.

As always, you can use the 'spell find' commands to find the teachers or trainers for new spells and skills.

For those of you who don't know anything about us, Alter Aeon is a multiplayer text-based game with a lot of features and settings to help make it blind-friendly. Over half our playerbase is blind or visually impaired, and we have blind builders and staff helping to expand and improve the game.

Everyone is welcome to play, so if you're new to the game feel free to stop by and check us out.  For more information and soundpack downloads, see our web site at:

Happy hunting!

Friday, September 9, 2011

I'd like to announce the release of the Alter Aeon client version 1.089, which makes this the first official 'non-beta-numbered' release.  An awful lot of updates and effort went into this revision.  Here's a short list of the big feature updates:

- Full, non-beta MacOSX support, including versions of MacOSX from 10.5 forward.  Unfortunately, we don't support the older PPC macs, just newer Intel based ones.

- We've submitted the Mac version of the client to the Mac App Store, and hopefully you'll be able to get it there for free in the next few days!

- The graphical rendering system has been pretty much completely gutted and rewritten.  This makes the client faster and more consistent between different versions of windows.  This got rid of a lot of bugs with different service packs.

- The keyboard handling has been rewritten to use low level keyboard codes for pretty much everything.  This also gets rid of a lot of service pack bugs that we could never track down before.

- Lots of performance and memory optimizations, to make things run faster and more smoothly

- You can now change the font on buttons and the map

In a lot of ways, this was a sort of 'maintenance' release, where we weren't trying to add features so much as make the existing features work as smoothly and correctly as we can.

Of course, this means the next release will probably start adding features again.  We have a lot of neat ideas queued up, so expect to start seeing some of them here in the next few months.  Until then, you can download the new Alter Aeon 1.089 client version at:

Happy hunting!