Game Development Community

Brainstorming about "GhostLate"

by Stephen Zepp · in Torque Game Engine · 03/18/2005 (7:51 pm) · 2 replies

I have some ghosted objects that during their onAdd() call, require access to the client side terrain. Unfortunately, the way ghosting works currently, all ghosted objects are sent prior to the client constructing the sceneGraph, and therefore prior to the terrain being added.

My initial thought is to add a new type of ghosted object, "GhostLate", which won't be ghosted until the very last step before the client is ready to finish the connection.

Has anyone experimented with something like this before? I did find a very old thread touching on the topic back in 2002 while Melv was writing his fxFoilageReplicator, but it looks like he was able to go ahead and ghost on time, but then delay the actual replication until after terrain was created. I can possibly do something similar, but I can see a need for this type of ghost behaviour for future objects as well, so I figured I'd bite the bullet and implement the functionality--I just don't want to reinvent the wheel if someone has already played with the idea, or (even better!) if there is something I am missing that already exists!

#1
03/18/2005 (9:37 pm)
Can't you delay the processing until the terrain is available? The usual way is to keep trying to resolve the ghost ID for the specified object (ie, terrain) until you get something, then do the processing.

MUCH simpler than adding ghost semantics.
#2
03/18/2005 (10:02 pm)
I've resolved this without having to resort to changing the ghosting sequence (turns out that I didn't need to do the onAdd() initialization client side, so I just checked for isServerObject), but it did bring up a secondary question--is there a standard callback somewhere between downloading ghostAlways objects and before the very first processTick called on the server that can be used prior to actual client "ready to start"?

I guess probably not, based on how Melv handled fxReplicator startup, but that was done 3 years ago, there might have been changes since!