Messagesystem

Posted in Uncategorized on March 2nd, 2008 by admin

Nearly a month has gone by without a post here. I used this time to redesign the message system, changing how message are created,handled and used. Before the redesign every message was an own class derived from the IMessage interface. Now there is only one Message class which has a map with boost::any, so every value which should be send using the message is stored in the map. This makes introducing new message quite easy and saves a lot of compile time, it is also much better to bind a scriptlanguage if you have only one class to bind and not tousand of them. I think now it is possible to  bind the basic component based message system to lua and use every component/message developed later without the need of new binding, but i have to verify it later. The negative effect is that typos can create errors( casting map members which dont exist), but i think if i develop some helper classes it will be possible to handle. The next weekends i will invest into the demo game to show what the engine can do and test the new message system.