June 27, 2009

Conspiracy Engine is born!

Posted in Computer Graphics tagged , , , , , , , , , , , , at 12:41 am by sagito

Hi again! My new engine is already moving… And in quite different directions at the same time! I have implemented a window manager which basically is responsible for creating a window and saving its internal state and a video driver which fires up DirectX and provides basic window painting features – i.e.: paints the window background with a chosen colour! That is very simple indeed, but from my experience with DirectX is a nice way to see if everything is working fine…

However, I’m also evolving it in some different components as I have already built an Observer Pattern Architecture. So basically, any object can now be an observer of any other object which declares itself as a subject! Events are then handled by a Mediator which notifies every one it should. How does this work? Pretty simple, the Mediator registers every subject and every observer which wants to listen from that particular subject. Then, when the subject has some new information, it informs the Mediator, which informs every observer interested in that subject! I believe that this will be a great way of passing events and notifying entities. Also, the Observer, Subject and even the Mediator classes can be easily extended in order to create or provide further specifications for this information flow.

Besides this, I have also implemented an utility class, which follows the Singleton pattern, and a custom exception handler which has already proven to be one of the greatest additions to the engine. Finally, in order to have a better memory management, every class inherits from an IObject interface, which forces its children to implement a drop method. This method is used for clearing everything from memory before leaving the program. This way, the engine becomes much more organized and clean I hope!

I will be having more news, very soon, I hope you are liking! 😀