|
-
Jan 26th, 2004, 07:48 PM
#1
Thread Starter
Fanatic Member
DirectPlay 9 - ANY and all help please...
Hey guys,
There really seems to be a lack of information around for DirectPlay 9 (or 7 and 8 for that matter) programming in C# and VB.NET....
I'm currently trying to complete a little side project for a game community... basically, I want to recreate Gamespy Arcade for one or 2 games... I've got the socket server part all sorted out, now i just need some help with the DirectPlay part... here's the layout...:
1) Client Connects to server
2) Client joins one of a few game areas
3) Each game area has it's own chat conversation between all users in that current game area...
(Note, all this so far is done with sockets... no directplay)
4) Next, a user can Host a new Lobby session for the game of which they are in the game area of... (Since most if not all games these days are DirectPlay Lobbyable, this system will work well with many games)
5) Now, the host waits for other people from the game area to join their existing game lobby session...
6) Again, in the game lobby session, there is yet another chat, which is just between members of the game lobby session...
When all players have signaled they are ready to hte host, the host clicks a button to Launch the game.
7) At this point, the actual game which i have nothing to do with in creating is launched into multiplayer mode, and everyone is matched up in a multiplayer game from the game lobby session...
Again, if yo uare familiar with gamespy arcade, or MSN Gaming Zone, i want to do something very similar to this...
I contemplated making the game lobby sessions on sockets, however, i know directplay is quite capable of handling this, and is even intended for this purpose. This would also take a substantial load off of the servers, since it puts a client in charge of hosting the chat and it's details...
Again, i have found almost no documentation on this subject.. I'm working with c#, but vb.net is also fine... could someone please point me in the right direction? surely someone has done this before?
For now, i'm trying to use the DX9 SDK as an example, but i find these examples extremely overlycomplicated and confusing...
If anyone could help me, i would be extremely grateful...
I can also be contacted via icq or msn or aol:
msn: [email protected]
icq: 22921863
aol: RedthMotoX2
Thanks again!
-
Jan 30th, 2004, 05:42 PM
#2
Thread Starter
Fanatic Member
bump
-
Feb 25th, 2004, 08:34 PM
#3
New Member
I was in the same boat as you; but now I have DirectPlay working successfully with .NET. I purchased a book called:
".NET Game Programming with DirectX 9.0" (Lobao/Hatton), and it goes step-by-step in creating a wrapper for DirectPlay.
I have tested all my base classes, and now in the process of putting all the pieces together. The hardest part is getting your wrapper tested, and working together.
If you have any questions, let me know.
-
Feb 25th, 2004, 11:52 PM
#4
Thread Starter
Fanatic Member
hey,
thanks for the reply! It's SOOOO hard to find any info on DirectPlay 9....
I'm a bit strapped for cash at the moment, would you mind showing me some of your work on the wrapper? i'd love to see some code examples...
my info:
[email protected] (MSN)
22921863 (ICQ)
RedthMotoX2 (AIM)
thanks again!
-
Feb 26th, 2004, 05:14 AM
#5
try checking out:
http://www.directx4vb.com/
they may or may not have a specific tutorial for what you want yet, but they will have all the info you need (it just might be the previous version of DirectPlay, in which case there is probably no difference).
-
Feb 26th, 2004, 05:50 PM
#6
Thread Starter
Fanatic Member
thanks, i've been to that site before.. It's a great resource, however it doesn't have anything on directplay9... I think they made a fair amount of changes from dp8 to dp9, if the directx9 sdk is correct....
i'm seeing if i can afford that book now.. :/ i'd still like some of your code Buhbooh, if you don't mind!
-
Feb 28th, 2004, 05:32 PM
#7
New Member
Well, exactly what part are you having trouble with? Here is a function in my class that is used to return all the sessions on a host:
'**********************************************************************************************
'**********************************************************************************************
Public Sub EnumSessions(ByVal hostAddress As Address)
Dim desc As ApplicationDescription = New ApplicationDescription
desc.GuidApplication = _gameGUID
'Try to enum sessions on the given hosts
Try
_dpPeer.FindHosts(desc, hostAddress, _dpAddress, Nothing, Timeout.Infinite, 0, Timeout.Infinite, FindHostsFlags.OkToQueryForAddressing)
Catch ex As Exception
MsgBox("Error occurred while looking for sessions.")
End Try
End Sub
'The above causes the below event to occur for each session found.
Sub EnumResponseMsg(ByVal sender As Object, ByVal dpMsg As FindHostResponseEventArgs) Handles _dpPeer.FindHostResponse
'Generate event
RaiseEvent EnumSession(dpMsg.Message.ApplicationDescription, dpMsg.Message.AddressSender, dpMsg.Message.AddressDevice)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|