🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Hieroglyph 3

Published June 25, 2008
Advertisement
Hieroglyph 3With the material system implemented, I have begun to turn my thoughts to the next iteration of my engine. It wasn't too long ago that I started work on the second version of the engine, but I would like to add enough content and make enough changes to warrant an increment in the version.

The primary change in design is with respect to how the engine is organized. Currently, the entire engine (including rendering, audio, input, and scripting) is compiled into a single static library. Then, any applications that want to use the engine simply statically link to the lib and use the headers provided in the SDK build process. This is what I want to change - the engine should be more componentized.

So I will be organizing several major sections of the engine a little differently. A core will provides the basics like math classes, geometry classes, utilities, etc. This will be implemented as a DLL with each sub-component using implicit linking to use these objects. The remaining engine components are going to implement an 'EngineComponent' interface, and will reside in a DLL that will be dynamically linked to.

The interface is going to be somewhat like COM, but a lot less formal. The main design concept is that there will be a standard interface for each type of engine component - a renderer interface, an audio interface, and so on. So each implementation has to at least provide the base line interface, but can also implement a more complicated interface as well. The 'EngineComponent' interface will provide facilities for querying which interfaces are implemented.

This should allow me to implement a series of renderers, say OpenGL, DX9, DX10, and software based, and each will end up in a DLL in the appropriate engine directory. Then when an application starts up, it will dynamically load and query each of the engine component DLLs and decide which one is the most suitable. The same goes for each of the other types of interfaces - an audio system can be implemented in OpenAL, DirectSound, or XAudio 2 and so on. The application can pick and choose what it wants to use.

It will take a lot of work to get everything set up properly, but I think in the end it will be worth it. We'll see how things shape up in the next couple of days - I should be able to get the basic EngineComponent interface set up and get a few simple (dummy) components lined up.

Previous Entry Continuing Materials
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement