About Store Forum Documentation Contact
Donations:
206$/mo



Post Reply 
[mmo] I can't run two clients on the same machine.
Author Message
yvanvds Offline
Silver Supporter

Post: #1
[mmo] I can't run two clients on the same machine.
Hi there.

I'm trying to implement multiplayer in my game. When I run the Esenthel's MMO example, I can run a few clients and the server, all on the same computer. But when do that with my own program, the first clients hangs as soon as the second one logs in.

I copied the second client to another directory, as to make sure they don't try to access blocked files. I also tried changing to forward renderer, just in case. Of course, none of that helped, otherwise I would not have posted this message.

Is there anything obvious I should look into, when trying to solve this? I'm a bit out of ideas right now. (Apart from the one idea to buy an extra computer, which I try to defer a bit :-)

Regards,

yvan
02-14-2011 12:09 AM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #2
RE: [mmo] I can't run two clients on the same machine.
Weird, last time I checked I could run two clients on the same machine.

[Edit] Yes I can run two at the same time.
(This post was last modified: 02-14-2011 02:32 AM by llynx.)
02-14-2011 02:30 AM
Find all posts by this user Quote this message in a reply
dylantan Offline
Member

Post: #3
RE: [mmo] I can't run two clients on the same machine.
I tried running it on 3 client windows, no problem for me as well although performance drop alot.
02-14-2011 02:50 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Dandruff Offline
Member

Post: #4
RE: [mmo] I can't run two clients on the same machine.
try to double check your client and server with the one from the EE demo, and make sure you haven't left anything out or put code at wrongs spots.
02-14-2011 03:36 AM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Silver Supporter

Post: #5
RE: [mmo] I can't run two clients on the same machine.
I did not really start from the mmo demo, as I'm trying to implement multiplayer functionality in my existing single player code. So it's not possible to compare it line by line.

But I just tried to run two clients at the same time in single player mode, without a running server, and that too crashes both of them. No idea why.
Some progress. I've ran one of the clients from within Visual Studio. And the stack after the crash always ends with the same function:

attr-x.exe!EE::GuiObj::type() Line 70 + 0xf bytes C++
attr-x.exe!cInput::checkLeftMousePressed() Line 211 + 0x11 bytes C++
attr-x.exe!cInput::update() Line 29 C++
attr-x.exe!GameUpdate() Line 180 C++
attr-x.exe!EE::UpdateState() + 0x78 bytes C++
attr-x.exe!EE::Application::loop() + 0xe7 bytes C++
attr-x.exe!_WinMain@16() + 0x22 bytes C++
attr-x.exe!__tmainCRTStartup() Line 275 + 0x1c bytes C
kernel32.dll!76b33677()

It can be a different moment, but it's always when the type of a gui element gets checked that the program crashes.
Ok, got it. And I think it's time for Esenthel to chime in :-)

I just recompiled Esenthels demo MMO. All goes well when I do not change the source code. But if I add this line in (client) Game.cpp:

if (Gui.msLit()->type() == GO_TEXTLINE){}

I can run around for a minute after login in and then wham, crash!

I added this line just below Gui.update(); but it's quite trivial where to put it, I suppose. Moreover, when examining the stack after the crash, the GuiObj::type() function is once more on top.
(This post was last modified: 02-14-2011 03:09 PM by yvanvds.)
02-14-2011 02:11 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: [mmo] I can't run two clients on the same machine.
Gui.msLit() can be NULL as it's a pointer
02-14-2011 03:31 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Silver Supporter

Post: #7
RE: [mmo] I can't run two clients on the same machine.
Oh, thanks. It's hardly ever you'll have to check for NULL pointers with this engine. So I completely forgot about that. :-)
02-14-2011 04:59 PM
Find all posts by this user Quote this message in a reply
Post Reply