Game Development Community

Waterblock problem when joining a multiplayer world

by Cai Yundong · in Torque Game Engine Advanced · 10/31/2008 (3:04 am) · 10 replies

Dear all,

I create a world with TGEA, and launch it as a multiplayer world. When i connect it with another TGEA client, it enters into the world successfully, but I can't see the water (it can be seen correctly in world which hosts server), but when i walk into the water, it shows correctly.

Anyone meets the same problem before? Need help to solve it.

Thanks for your reply.

#1
10/31/2008 (9:04 am)
Are all of the materials for the water included on the client?
#2
11/02/2008 (2:15 am)
I have a similar bug but i cant see the waterblock after i create it from the editor. The strange thing is that i can see water that is included in the demos...i just cant see any that i create :S

I run Vista 64, AMD 5600+ and Nvidia 8800GTX with 180.42 beta drivers.

I also had this problem when i was running XP

The bug report is here.

www.garagegames.com/mg/forums/result.thread.php?qt=76190

Any ideas?
#3
11/02/2008 (6:48 am)
I haven't seen this one yet, but it sounds like setupVBIB () isn't being called. Try calling it from onAdd () and make sure it only happens client-side.
#4
11/02/2008 (7:04 am)
This sounds like an issue I (and others) ran into before: www.garagegames.com/mg/forums/result.thread.php?qt=76743

The final version of my NetConnection::handleConnectionMessage ended up looking like this (comments are next to the two lines of importance):
void NetConnection::handleConnectionMessage(U32 message, U32 sequence, U32 ghostCount)
{
   if((  message == SendNextDownloadRequest
      || message == FileDownloadSizeMessage
      || message == GhostAlwaysStarting
      || message == GhostAlwaysDone
      || message == EndGhosting) && !isGhostingTo())
   {
      setLastError("Invalid packet. (not ghosting)");
      return;
   }

   S32 i;
   GhostSave sv;
   switch(message)
   {
      case GhostAlwaysDone:
         mGhostingSequence = sequence;
         // ok, all the ghost always objects are now on the client... but!
         // it's possible that there were some file load errors...
         // if so, we need to indicate to the server to restart ghosting, after
         // we download all the files...
         sv.ghost = NULL;
         mGhostAlwaysSaveList.push_back(sv);
         if(mGhostAlwaysSaveList.size() == 1)
            loadNextGhostAlwaysObject(true);

		 NetConnection::smGhostAlwaysDone.trigger();	//#CUSTOM#:  Ghost Always Objects Fix
         break;
      case ReadyForNormalGhosts:
         if(sequence != mGhostingSequence)
            return;
         Con::executef(this, "onGhostAlwaysObjectsReceived");
         Con::printf("Ghost Always objects received.");
		 NetConnection::smGhostAlwaysDone.trigger();	//#CUSTOM#:  Ghost Always Objects Fix         
         mGhosting = true;
         for(i = 0; i < mGhostFreeIndex; i++)
         {
            if(mGhostArray[i]->flags & GhostInfo::ScopedEvent)
               mGhostArray[i]->flags &= ~(GhostInfo::Ghosting | GhostInfo::ScopedEvent);
         }
         break;
      case EndGhosting:
         // just delete all the local ghosts,
         // and delete all the ghosts in the current save list
         for(i = 0; i < MaxGhostCount; i++)
         {
            if(mLocalGhosts[i])
            {
               mLocalGhosts[i]->deleteObject();
               mLocalGhosts[i] = NULL;
            }
         }
         while(mGhostAlwaysSaveList.size())
         {
            delete mGhostAlwaysSaveList[0].ghost;
            mGhostAlwaysSaveList.pop_front();
         }
         break;
      case GhostAlwaysStarting:
         Con::executef("onGhostAlwaysStarted", Con::getIntArg(ghostCount));
         break;
      case SendNextDownloadRequest:
         sendNextFileDownloadRequest();
         break;
      case FileDownloadSizeMessage:
         mCurrentFileBufferSize = sequence;
         mCurrentFileBuffer = dRealloc(mCurrentFileBuffer, mCurrentFileBufferSize);
         mCurrentFileBufferOffset = 0;
         break;
   }
}
#5
11/02/2008 (8:44 am)
Thanks Guys:)

I will give it a go as soon as i reinstall vse2008 :)
#6
11/02/2008 (9:05 am)
Thanks, Matt

I will give a try soon and let you know the result.
#7
11/05/2008 (7:46 pm)
It is done. Matt, thanks.
#8
11/05/2008 (8:48 pm)
Glad it helped.
#9
11/05/2008 (9:15 pm)
Hi, Matt

Can you do me a favor to check this one?

http://www.garagegames.com/mg/forums/result.thread.php?qt=80582

Thanks a million.
#10
11/05/2008 (9:48 pm)
Hi, Matt

Can you do me a favor to check this one?

http://www.garagegames.com/mg/forums/result.thread.php?qt=80582

Thanks a million.