Results 1 to 5 of 5

Thread: directplay game launch?

  1. #1

    directplay game launch?

    Dude, Jesus fuckin christ. Someone just give me source code.
    The game in question is jkdf2.
    I'm working on a zone recreation project.

    When I get to computer I can show code I have.
    Everything I've tried ONLY launches the game.
    I need a quick host, and a quick join function.

    This process should be the same for every directplay game, just change the guid of game.

    I'm about to give up. I've even got c++ source that does it fine, and I ported that to vb.
    Still a fail

  2. #2

    Re: directplay game launch?

    Here is C sample:
    ftp://ftp.physik.hu-berlin.de/pub/us.../src/dplaunch/

    And a sample taken from jklauncher source:
    ' sessionInfo.guidApplication = JK_GUID; // GUID of the DirectPlay application.
    ' playerNameInfo.lpszShortNameA = ""; // ANSI short or friendly name
    ' connectInfo.lpSessionDesc = &sessionInfo; // Pointer to session desc to use on connect
    ' connectInfo.lpPlayerName = &playerNameInfo; // Pointer to Player name structure
    ' connectInfo.guidSP = DPSPGUID_TCPIP; // GUID of the DPlay SP to use
    ' connectInfo.dwFlags = DPLCONNECTION_CREATESESSION;
    '
    ' DWORD appID;
    ' result = dpLobby2P->RunApplication(0, &appID, &connectInfo, NULL);



    Here is MY vb source.


    - - - Updated - - -
    Private Const JKGUID = "{BF0613C0-DE79-11d0-99C9-00A02476AD4B}" 'jk.exe

    Dim DX As New DirectX7
    Dim DP As DirectPlay4
    Dim DPLobby As DirectPlayLobby3
    Dim DPLobbyConn As DirectPlayLobbyConnection
    Dim DPAddress As DirectPlayAddress
    Dim DPSessionData As DirectPlaySessionData

    Private Sub Command1_Click()

    Set DP = DX.DirectPlayCreate("")
    Set DPLobby = DX.DirectPlayLobbyCreate
    Set DPLobbyConn = DPLobby.CreateConnectionData
    Set DPSessionData = DP.CreateSessionData

    Dim GetAppGUID
    GetAppGUID = JKGUID

    'session info
    DPSessionData.SetGuidApplication GetAppGUID
    DPLobbyConn.SetPlayerShortName ""
    DPLobbyConn.SetPlayerLongName ""
    DPLobbyConn.SetSessionDesc DPSessionData
    DPLobbyConn.SetGuidSP DPSPGUID_TCPIP
    DPLobbyConn.SetFlags DPLCONNECTION_CREATESESSION

    Dim RunApp, EventHandle
    RunApp = DPLobby.RunApplication(DPLobbyConn, EventHandle)



    Exit Sub
    err:
    MsgBox err.Number
    End Sub

    Script launches game, but does NOT create mp game.

    - - - Updated - - -

    Here is C sample:
    ftp://ftp.physik.hu-berlin.de/pub/useful/dx7asdk/DXF/samples/multimedia/dplay/src/dplaunch/

    And a sample taken from jklauncher source:
    ' sessionInfo.guidApplication = JK_GUID; // GUID of the DirectPlay application.
    ' playerNameInfo.lpszShortNameA = ""; // ANSI short or friendly name
    ' connectInfo.lpSessionDesc = &sessionInfo; // Pointer to session desc to use on connect
    ' connectInfo.lpPlayerName = &playerNameInfo; // Pointer to Player name structure
    ' connectInfo.guidSP = DPSPGUID_TCPIP; // GUID of the DPlay SP to use
    ' connectInfo.dwFlags = DPLCONNECTION_CREATESESSION;
    '
    ' DWORD appID;
    ' result = dpLobby2P->RunApplication(0, &appID, &connectInfo, NULL);



    Here is MY vb source.


    - - - Updated - - -
    Private Const JKGUID = "{BF0613C0-DE79-11d0-99C9-00A02476AD4B}" 'jk.exe

    Dim DX As New DirectX7
    Dim DP As DirectPlay4
    Dim DPLobby As DirectPlayLobby3
    Dim DPLobbyConn As DirectPlayLobbyConnection
    Dim DPAddress As DirectPlayAddress
    Dim DPSessionData As DirectPlaySessionData

    Private Sub Command1_Click()

    Set DP = DX.DirectPlayCreate("")
    Set DPLobby = DX.DirectPlayLobbyCreate
    Set DPLobbyConn = DPLobby.CreateConnectionData
    Set DPSessionData = DP.CreateSessionData

    Dim GetAppGUID
    GetAppGUID = JKGUID

    'session info
    DPSessionData.SetGuidApplication GetAppGUID
    DPLobbyConn.SetPlayerShortName ""
    DPLobbyConn.SetPlayerLongName ""
    DPLobbyConn.SetSessionDesc DPSessionData
    DPLobbyConn.SetGuidSP DPSPGUID_TCPIP
    DPLobbyConn.SetFlags DPLCONNECTION_CREATESESSION

    Dim RunApp, EventHandle
    RunApp = DPLobby.RunApplication(DPLobbyConn, EventHandle)



    Exit Sub
    err:
    MsgBox err.Number
    End Sub

    Script launches game, but does NOT create mp game.

  3. #3

    Re: directplay game launch?

    if any random stranger comes along, i have given up on this old project.

  4. #4
    Senior Member Jordan's Avatar
    Join Date
    Dec 2010
    Location
    Australia m8
    Posts
    104

    Re: directplay game launch?

    Sadface. Why?
    Main PC: i7 860 Quad Core 2.8GHz. 8GB DDR3 @ 1666mhz. 1GB nVidia GeForce GT 220. 2 x 1TB Samsung HD103SJ. Win 7 x64. Thermaltake Element V.

    Server: Pentium 4 HT 2.8GHz, 3 GB DDR @ 400MHz, Not important, 320GB WD3200AAKS, 1TB WD10EARX, 500GB Segate ST3500

    Laptop: i7 3667U @ 2.5GHz, 8GB DDR3 @ 800MHz, NVidia GeForce 710M, 1TB Segate ST1000, Touch Screen

    http://kingsley-muir.com

  5. #5

    Re: directplay game launch?

    not sure rly. I was just telling someone earlier today that i have ported several directplay game launching scripts from several other languages to vb6 and vb.net. Never could i get past just launching the game. I want to say at one point, it launched the game, but when i clicked on "mp" it said the name of the game session i was launching.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •