Com

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Hey there -

      Wow if you've ever used DirectX, you've used COM. I think COM is a great technology th learn and understand, but there are plenty of people that would sooner cut off their left leg than use COM in a game.

      Personally, I appreciate the definition and liberal use of useful interface classes instead of full blown COM.

      As far as books go, I've never read a COM book - I learned most of everything I know about COM just by playing with DirectX, a COM based technology. Perhaps someone else has read a COM book????
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • COM is a specification for defining interfaces for components that can be written in (theoretically) any language, and used in any other language that supports it. EG that's how you can call DirectX code written (presumably) in C++ and assembly, from VB and C#. Think of it as a wrapper around the entry points in the dll's you're calling.

      I wouldn't bother trying to learn it for game programming, other than understanding the basic idea behind it. It's designed for writing commercial dll's that can be used by unknown developers, like the UI widgets you can buy for VB etc. "Learning COM" usually means learning how to write COM components like those. Trust me, don't go there. ;)

      Andre LaMothe's book "Windows Game Programming for Dummies" (the only For Dummies book I've ever bought, btw :P and it's great. And it's not for dummies. A great intro to 2D.) describes everything you need to know about using COM in games.

      Then use Mr Mikes GameCode framework, coz it rocks!! (I'm falling behind in the grovelling competition..:P)

      hth
      pj
    • One thing that's interesting about COM's architecture is an ability to support old APIs and new APIs in the same framework. This is especially true if you create (or use) a system that is undergoing rapid development, but requires legacy API support.

      It is rumored that Digital Anvil (a Microsoft Game Studio here in Austin) used COM in their core library design....I wonder how well it worked?
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Interesting... I'm curious too. My last job was a GIS site that used a large COM based library and it certainly makes life easier for us value added folks. But I don't really see the advantage for purely in house code. Maybe they sell their library?

      There's a bit of overhead in calling through COM interfaces that varies depending on the configuration. If COM thinks it has to look out of process for the implementor, go get coffee ;)

      FireElemental is right about .NET too - it supercedes COM for managed code. (ANd that's all I know about it ?( )