Monday 25 October 2010

Messages

The way messages are handled gets complicated when the engine is becoming more generic. My plan is trying to have the responsibility inside Message class as much as possible to avoid if-code in the caller function. I've created several types of message functions from simple message to object message checking the distance and visibility to the action object and changing the message when the player can't see the action for that object. Then there are of course player vs. other object problem. At least for now most messages need to change the message structure for the player and some if-code is there. However I think I can manage them the old school way, without need to create a more sophisticated message system.

No comments: