Did you use std::tr1::function for callbacks, or did you just let each class store references to all its observers, each of which would have a function that can be called (probably via inheritance)?
Yep, I use std::function (no need to write tr1 in C++11).
Basically, Observer has std::map<std::type_index,std::function> callbacks and onMessage function which just calls callbacks[type_index_of_event].
When Subject fires an event, it calls onMessage function of each observer.
With that code, how do you do the link between you HpChangedEvent and the right callback to call (as your registerCallback() method doesn't take the type of event as parameter. And how do you register callbacks with different signatures ?
I don't like that way of doing so much, because everything is done at execution. Plus you have to tell your Subject class (in that case Player) when the Observer is destroyed.
I prefer compile time Event Systems, zagabar has a good one in his Featherkit lib using structs. Again I guess it's harder to bind such a system to Lua compared to a simple Observer pattern (which does the job well anyway).
Oops, I should fix that. RegisterCallback takes event type as a template argument and maps a function to this type of events.
This should answer all your questions.
I'll check out compile time Event Systems. My system is just one of the first ones I've come up with. Maybe I'll find something more convenient and awesome.