A new-bie question about IDirectPlay8Peer & Object Orientation

Started by
4 comments, last by Ejaz 20 years, 9 months ago
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.
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.
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.
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
For answer see Multiplayer and Network Programming and Directx threads.
Well, R2D22U2..
Do you know there is more than just inheriting IDirectPlay8Peer into your class. To support networking in your game.
3D Side-Scroller game demo Project-X2 "playable"Lashkar: A 3D Game & Simulation Project demo @ lashkar.berlios.de

This topic is closed to new replies.

Advertisement