Game Development Community

Determining When an object is Ghosted

by Anthony Rosenbaum · in RTS Starter Kit · 12/06/2004 (2:09 pm) · 1 replies

I am having a dillemna of tring to locate an object's ghostid before it is ghosted. When I test to find a ghostId I get -1. I have done some testing, the code I use works If I manually type in the dedicaded server and the client consoles I can prove that the code is right. I delayed the query for the ghostid by actually bouncing the object bewteen the client once then back to the sever to find the client's ghost id for it then back to the client where it is resolved. Which does work to a degree, if I get too much lag it will break it. So I was wondering is there an exposed variable to see if an object has been ghosted yet? I fear the only other solution would be to make a schedule to keep testing until the info is recieved.

#1
12/07/2004 (9:07 pm)
You can tell if an object has been ghosted on connection by trying to get the ghostID. If it's -1, it's not ghosted. :)

You deal with "missing" ghosts by retrying until it does get through. You can find a few places in the C++ code that do this in packUpdate - it simply retries that bit until it can resolve.