Captive Imagination
September 06, 2010, 09:09:07 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: jSeamless 1.0 Beta 7 is Available http://www.jseamless.org
 
   Home   Help Search Calendar Login Register  
Pages: 1 [2]  All   Go Down
  Print  
Author Topic: Just testing my understanding...  (Read 1451 times)
0 Members and 1 Guest are viewing this topic.
Trussell
Jr. Member
**
Offline Offline

Posts: 52


View Profile
« Reply #15 on: April 05, 2009, 12:18:06 PM »

Okay for some reason it wasn't connecting earlier but it's connecting now. I am not getting the distortion anymore and it looks like it's sync'd a lot better. However, the weird shadow clone still appears on the client.
Logged
Trussell
Jr. Member
**
Offline Offline

Posts: 52


View Profile
« Reply #16 on: April 05, 2009, 12:27:40 PM »

I decided to print out all children on the scene node that's in my SyncObjectManager. The server prints out 6, as it should. The client, however, prints out 9 characters attached and in-game. It only displays that one extra shadow, though. But why would it be seeing 9 if I only register 6 (3 when the server starts and 3 when the client starts)?
Logged
Trussell
Jr. Member
**
Offline Offline

Posts: 52


View Profile
« Reply #17 on: April 05, 2009, 12:53:44 PM »

Gah I just realized the only reason it was connecting was because I accidentally uncommented the line

Code:
JGN.createThread(client).start();

So if I comment that back out I still get no connection. Bah. I'm pulling my hair out  :'(
Logged
Trussell
Jr. Member
**
Offline Offline

Posts: 52


View Profile
« Reply #18 on: April 05, 2009, 06:27:14 PM »

Okay just as an update... I started calling the following methods in my update for my gamestate:

Code:
if(client != null)
            {
                client.update();
                client.updateConnections();
                client.updateEvents();
                client.updateTraffic();
            }
            if(server != null)
            {
                server.update();
                server.updateConnections();
                server.updateEvents();
                server.updateTraffic();
            }
            if(syncManager != null)
            {
                syncManager.update();
            }

Now the client sees the server, but not the other way around. Also the shadow-clone is still present on the client. So I'm really not sure what's going on at all anymore. Is this an internal problem with JGN?
Logged
Trussell
Jr. Member
**
Offline Offline

Posts: 52


View Profile
« Reply #19 on: April 05, 2009, 08:49:11 PM »

Through an extremely difficult process I have determined that the client's SyncObjectManager believes that there are twice as many objects registered as there should be. The SyncObjectManager shows that there were 2 sets of the 3 characters registered by the server. The server's SyncObjectManager has everything correct. Do you understand what could be causing this? The server and the client both use the same registration code (I don't even differentiate between registering the characters if the program is running the server or the client. It literally uses the same code becuase it will have to register all of those characters either way).

That seems a little long-winded. Basically, here is what the situation is:

SyncObjectManager (on server) contains the following: Warrior(Server), Priest(Server), Rogue(Server), Warrior(Client), Priest(Client), Rogue(Client)

SyncObjectManager (on client) contains the following: Warrior(Client), Priest(Client), Rogue(Client), Warrior(Server), Priest(Server), Rogue(Server), Warrior(Server), Priest(Server), Rogue(Server).

That's why I'm seeing the shadow. Once I figure this out, everything is good in terms of networking.
« Last Edit: April 05, 2009, 09:18:17 PM by Trussell » Logged
Trussell
Jr. Member
**
Offline Offline

Posts: 52


View Profile
« Reply #20 on: April 05, 2009, 10:33:51 PM »

server.setConnectionLinking(true);

seems to have fixed the clone problem!!! I am only occasionally getting the bug where they don't update with each other and where the guys are getting all twisted and stuff, so that'll get worked out soon hopefully.
Logged
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« Reply #21 on: April 06, 2009, 08:18:48 AM »

Interesting...you shouldn't need to call all those updateXxx methods on client and server.  If you call update it should call the rest for you.  Update should work as a convenience method that calls all the others, but the others exist in case you wanted to split out a single client/server to multiple threads to do the various operations.
Logged
Trussell
Jr. Member
**
Offline Offline

Posts: 52


View Profile
« Reply #22 on: April 06, 2009, 11:45:00 AM »

I switched back to the threading. All of those update methods weren't doing anything.
Logged
Pages: 1 [2]  All   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.179 seconds with 23 queries.