A new-bie question about IDirectPlay8Peer & Object Orientation
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.
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.
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.
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.
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
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
Do you know there is more than just inheriting IDirectPlay8Peer into your class. To support networking in your game.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement