Engine DLL Design
Use ActiveX DLL''s from VB like me :-)
Simon PriceSi@VBgames.co.ukwww.VBgames.co.uk
COM will do what you want, but it''s not required.
Learn how to make a couple of COM object, and about Design Patterns.
Design Patterns are methods of creating object designs with minimum inter-dependances. COM uses several patterns - which mean you must use those patterns as well.
The idea goes something like this:
You define an interface in your header files, and include them in the dll and in the project. In the dll you make a special function (called a factory) to create instances of a classes that inherients the interface you defined. This way you can make several different classes that all support the same interface - i.e. transparently interchangable.
Magmai Kai Holmlor
- The disgruntled & disillusioned
Learn how to make a couple of COM object, and about Design Patterns.
Design Patterns are methods of creating object designs with minimum inter-dependances. COM uses several patterns - which mean you must use those patterns as well.
The idea goes something like this:
You define an interface in your header files, and include them in the dll and in the project. In the dll you make a special function (called a factory) to create instances of a classes that inherients the interface you defined. This way you can make several different classes that all support the same interface - i.e. transparently interchangable.
Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
The VOiD engine: http://www.thepeel.org/void
If my memory serves me correctly, they have about 8 articles here on a variety of topics, as well as the source to their nifty engine. It''s just a shame they stopped -- it would have made a nice game.
Simon Wilson,
XEOS Digital Development
If my memory serves me correctly, they have about 8 articles here on a variety of topics, as well as the source to their nifty engine. It''s just a shame they stopped -- it would have made a nice game.
Simon Wilson,
XEOS Digital Development
XEOS Digital Development - Supporting the independant and OpenSource game developers!
There is the Abstract Factory pattern, but who cares? It seems to me that the problem can be resolved by pushing object instantiation into the DLL rather than the client code, and this is one of the most basic things that COM achieves. It''s a fairly common problem that has been resolved in several different ways, which is where the Abstract Factory design pattern comes from. However, COM specifies a particular way to achieve this and it is well worth learning if you are planning to continue developing for Windows. If you are particularly bothered about code portability then you don''t have to use the COM libraries, but I am guessing that you are probably already using a lot of OS-specifics so are already tied to Windows.
Class factories are used in COM to control component creation, and this may or may not be useful depending on exactly what the problem is. Unfortunately, COM is a fairly large topic to learn. However, it seems that the basic principle of creating an object within a DLL and returning a pointer to it will solve this particular problem. If you need further details regarding COM, I recommend the book Essential COM by Don Box.
Class factories are used in COM to control component creation, and this may or may not be useful depending on exactly what the problem is. Unfortunately, COM is a fairly large topic to learn. However, it seems that the basic principle of creating an object within a DLL and returning a pointer to it will solve this particular problem. If you need further details regarding COM, I recommend the book Essential COM by Don Box.
The MSDN is alllready a good start to learn COM.
Yes you don''t need Windows to do COM but Windows add some nice stuff.
Why English rules?? C pas très malin tout ça!
Yes you don''t need Windows to do COM but Windows add some nice stuff.
Why English rules?? C pas très malin tout ça!
_______________
Jester, studient programmerThe Jester Home in French
Jester, studient programmerThe Jester Home in French
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement