Page 1 of 3

DirectPlay

PostPosted: 16 Mar 2009, 13:09
by MrcredsAlex
KaM might be lobby-able with DirectPlay.

PostPosted: 16 Mar 2009, 23:16
by Lewin
That sounds very interesting... It will need to be investigated. A while ago I found the data in the EXE which specifies the IP address and port of the online server. (and I can change it) So possibly we could run our own server with this Direct Play thing...

I'll have a look next weekend or sometime.
Lewin.

PostPosted: 16 Mar 2009, 23:37
by harold
I just took a look at it and looked rather.. painful.
There is some information about the server side of it here:
http://doc.51windows.net/Directx9_SDK/?url=/directx9_sdk/play/ref/ifaces/idirectplay8server/idirectplay8server.htm
It gets worse, if you want the header files (which you will probably need) you'll have to get an old version of the DirectX SDK somewhere since someone thought it'd be a good idea to discontinue DirectPlay.

PostPosted: 17 Mar 2009, 00:31
by FallenLeader
how old a version? micro might have it laying around somewhere. i know i have older versions of directx on game disks, things i couldn't remove from disk due to the way the game installs. the game auto checks for newest version then doesn't install older one but still can't remove it without signifigant work.

is the regular much different than the software development kit?

PostPosted: 17 Mar 2009, 06:10
by Krom
Reminds me of dll injections in D3D, where smart guys could go as far as partially replacing render engine, intercept 3d models and textures, emulate caps (ESNB series mods, 3DRipperDX, 3DAnalyzer etc..)

PostPosted: 17 Mar 2009, 12:54
by MrcredsAlex
Hello.

"DirectX 8 Visual Basic type library" or something appears as a COM thingy to me in my IDE even if I have a newer version and it seems to have that DirectPlay thing.

PostPosted: 17 Mar 2009, 12:55
by harold
But not the headers though do they? I don't have them in my DX SDK..

PostPosted: 17 Mar 2009, 12:57
by MrcredsAlex
Uhh.. I just noticed I have the DirectX SDK uninstalled and even having it uninstalled that shows up :shock:

PostPosted: 17 Mar 2009, 13:02
by MrcredsAlex
I can't post links because I have less than 5 posts, but go to MSDN, search for "directx 8 sdk directplay" and there seem to be entries that have it.

PostPosted: 17 Mar 2009, 13:45
by harold
Ok, I have the COM thing, but most things are interfaces.. how do I get something real?

edit: alright I got it - but I'm not using the COM interface now. I'll let you know when I get something useful out of it

PostPosted: 17 Mar 2009, 17:05
by MrcredsAlex
Reminds me of dll injections in D3D, where smart guys could go as far as partially replacing render engine, intercept 3d models and textures, emulate caps (ESNB series mods, 3DRipperDX, 3DAnalyzer etc..)
You mean to change a game's graphics? That can be done easily without any dll changing

PostPosted: 17 Mar 2009, 17:27
by harold
He means changing the way it's rendered - for example with some effort it may be possible to inject a raytracer as renderer (or emulate new features on old hardware).
Or just to steal away the models textures and shader code of course :)

PostPosted: 17 Mar 2009, 23:05
by MrcredsAlex
That sounds very interesting... It will need to be investigated. A while ago I found the data in the EXE which specifies the IP address and port of the online server. (and I can change it) So possibly we could run our own server with this Direct Play thing...

I'll have a look next weekend or sometime.
Lewin.
I think you misunderstood me.
I've heard about an online lobby in TPR, which I do not have, and you seem to be saying that you could make anything like that and use DirectPlay to make KaM connect to it.

What I meant is making a lobby as a separate program, not into KaM.

What DirectPlay does is launch the game and create or join a game.

PostPosted: 17 Mar 2009, 23:12
by MrcredsAlex
I found a bit of more info on this.

Althought KaM uses DirectPlay, it does not seem to be registered as a DirectPlay application. This can be probably easily solved making a registry key with its own GUID for it

(this might or not be needed, I'm not really sure, but I think DirectPlay only launches by GUID)

Also, I found this code that launches AoE using DirectPlay, probably can be changed easily to do it for KaM.
  Code:
  Microsoft::DirectX::DirectPlay::Lobby::Client^ connection = gcnew Microsoft::DirectX::DirectPlay::Lobby::Client;   Microsoft::DirectX::DirectPlay::Lobby::ConnectInformation^ ci = gcnew Microsoft::DirectX::DirectPlay::Lobby::ConnectInformation;   ci->GuidApplication = *(gcnew Guid("FB69A260-5031-11d3-A2D4-006097BA6550"));   ci->Flags = Microsoft::DirectX::DirectPlay::Lobby::ConnectFlags::LaunchNew;   ci->UseConnectionSettings = true;   ci->ConnectionSettings.PlayerName = "MeTheHost";   ci->ConnectionSettings.HostAddress = gcnew Microsoft::DirectX::DirectPlay::Address("localhost",47624);   int aokh = connection->ConnectApplication(*ci,System::Threading::Timeout::Infinite,nullptr);[/quote]

PostPosted: 17 Mar 2009, 23:17
by harold
Ah ok but that's C++/CLR code (managed C++)