• Advertisement

Archived

This topic is now archived and is closed to further replies.

A new-bie question about IDirectPlay8Peer & Object Orientation

This topic is 5347 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All, I''m trying to create an object oriented model for my game. I''m new to game programming as well. I would like to ask a question. What is the way to inherit IDirectPlay8Peer into my class. I''m trying, but can''t get success till yet. Any help in this matter will be highly appriciated & thanx in advance. Regards, Ejaz.

Share this post


Link to post
Share on other sites
Advertisement
I wouldn''t try to ineirt any DirectX interfaces into your class, instead make an instance of the interface a member of your class. This will be far simpler I believe.

Share this post


Link to post
Share on other sites
Dear Illumini,

Thanx for the response. I have figure out that too, otherwise it is making things a little more complicated and the point to create classes stuff is to make things simpler.

Share this post


Link to post
Share on other sites
Well I''ve never tried inheriting a DX interface, but the problems I see with it on the surface include having all the DX interfaces accessable through your class because of inheritance. Unless you use protected/privated inheritance, but that just might get messy..

The only thin you really gain is calling SendTo() from within your class instead of m_DP->SendTo()

Not a big difference, plus there is the initlzation issues and such

Share this post


Link to post
Share on other sites
For answer see Multiplayer and Network Programming and Directx threads.

Share this post


Link to post
Share on other sites
Do you know there is more than just inheriting IDirectPlay8Peer into your class. To support networking in your game.

Share this post


Link to post
Share on other sites

  • Advertisement