Thanks, Jim ^_^. I will try it out during the weekend. I sure
hope this thread doesn''t disappear by next week. Jim, would
still love to see a forum on your site or maybe I could open
one for you on my site if you want ^_^.
_________________
Best regards,
Sherman Chin
www.Sherman3D.com
Programming RPG book question
Dear Jim,
Oh my, the topic disappeared as I expected 0_0. Thank goodness
for the search function in this forum ^_^. Anyway, I tried
your code and the server works now but the client doesn''t
want to connect to it. Here are the modifications I made to
the server code:
BOOL cApp::HostGame()
{
char Text[33], IP[16];
// Configure server and begin hosting
m_Server.Init();
//////////////////// New! ////////////////////////////
cNetworkAdapter Adapter;
Adapter.Init();
GUID *GUIDPtr = Adapter.GetGUID(0);
if( m_Server.Host(GUIDPtr, 0, "Session") )
return FALSE;
//////////////////// End New! ///////////////////////
// Get Server IP address and display in application window
m_Server.GetIP(IP);
sprintf(Text, "Host IP Address: %s", IP);
SetWindowText(m_Controls[0], Text);
return TRUE; // Return success
}
I noticed that if I am not connected to the net, the adapter
type in the client connection dialog defaults to 127.0.0.1
(the loopback address that does not work) and when I am
connected online, it defaults to PPP/WAN (which works). So,
how am I to fool DPlay that it is connected with PPP? ^_^
Thanks! ^_^
_________________
Best regards,
Sherman Chin
www.Sherman3D.com
Oh my, the topic disappeared as I expected 0_0. Thank goodness
for the search function in this forum ^_^. Anyway, I tried
your code and the server works now but the client doesn''t
want to connect to it. Here are the modifications I made to
the server code:
BOOL cApp::HostGame()
{
char Text[33], IP[16];
// Configure server and begin hosting
m_Server.Init();
//////////////////// New! ////////////////////////////
cNetworkAdapter Adapter;
Adapter.Init();
GUID *GUIDPtr = Adapter.GetGUID(0);
if( m_Server.Host(GUIDPtr, 0, "Session") )
return FALSE;
//////////////////// End New! ///////////////////////
// Get Server IP address and display in application window
m_Server.GetIP(IP);
sprintf(Text, "Host IP Address: %s", IP);
SetWindowText(m_Controls[0], Text);
return TRUE; // Return success
}
I noticed that if I am not connected to the net, the adapter
type in the client connection dialog defaults to 127.0.0.1
(the loopback address that does not work) and when I am
connected online, it defaults to PPP/WAN (which works). So,
how am I to fool DPlay that it is connected with PPP? ^_^
Thanks! ^_^
_________________
Best regards,
Sherman Chin
www.Sherman3D.com
Try changing the 0 in the call to Host to something constant. 0 creates a random # for the port. Use the exact same number in the client call to connect. Also, make sure the two programs share the same GUID.
Jim Adams
home.att.net/~rpgbook
Author, Programming Role-Playing Games with DirectX
Jim Adams
home.att.net/~rpgbook
Author, Programming Role-Playing Games with DirectX
Dear Jim,
Oops, my mistake - the previous fix didn''t really fix anything
because I forgot to add ==FALSE in:
if( m_Server.Host(GUIDPtr, 0, "Session") )
return FALSE;
When I do add ==FALSE, it refuses to host like before again.
Umm, any other solutions please?
Thanks! ^_^
Best regards,
Sherman
_________________
Best regards,
Sherman Chin
www.Sherman3D.com
Oops, my mistake - the previous fix didn''t really fix anything
because I forgot to add ==FALSE in:
if( m_Server.Host(GUIDPtr, 0, "Session") )
return FALSE;
When I do add ==FALSE, it refuses to host like before again.
Umm, any other solutions please?
Thanks! ^_^
Best regards,
Sherman
_________________
Best regards,
Sherman Chin
www.Sherman3D.com
ARghhhh!!!! DirectPlay is a big waste of time! >_< I am going
to code my own network core using TCP/IP. I just commented out
all the network code and the client works fine now ^_^.
Now, to get in some new models. Jim, how did you create those
X-file animation names in Milkshape? Is there someway to name
the keyframes or selection of frames? Umm, just how do you
select a few frames in Milkshape (I am a Max user so I am new
to this). Next, does the msXExporter for Milkshape by John
Thompson work?
Thanks ^_^.
_________________
Best regards,
Sherman Chin
www.Sherman3D.com
to code my own network core using TCP/IP. I just commented out
all the network code and the client works fine now ^_^.
Now, to get in some new models. Jim, how did you create those
X-file animation names in Milkshape? Is there someway to name
the keyframes or selection of frames? Umm, just how do you
select a few frames in Milkshape (I am a Max user so I am new
to this). Next, does the msXExporter for Milkshape by John
Thompson work?
Thanks ^_^.
_________________
Best regards,
Sherman Chin
www.Sherman3D.com
Anybody has any idea how to name the keyframes for X-file usage?
Thanks ^_^
_________________
Best regards,
Sherman Chin
www.Sherman3D.com
Thanks ^_^
_________________
Best regards,
Sherman Chin
www.Sherman3D.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement