Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Synchronization
Synchronization
2001-12-31, 10:41 AM #1
I'm working with the sync verbs right now, and I have a few questions. The verbs are:

SyncThingPos()
SyncScores()
SyncThingAttachment()
SyncThingState()
SyncSector()
SyncSurface()

And my questions:

Whose version of the pos,cel,scores,etc is sent to the other machines? The host's? The machine that ran the command?

With SyncSector(), what exactly is synced?

What does SyncThingState() do?

What happens when SyncThingAttachment() is run on a machine that does not recognize that the thing is attached?

BTW, I would test these myself, but then I'd have to get an MP game going...

Thanks in advance. [http://forums.massassi.net/html/wink.gif]


------------------
I never forget a face, but in your case, I'll be glad to make an exception. -Groucho Marx

[This message has been edited by SaberMaster (edited December 31, 2001).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2001-12-31, 3:48 PM #2
I think I remember seeing SyncSector in one of the ctf cog (the main one I guess). If I remember correctly the comments on those lines said it was to sync sector thrusts etc. (maybe flags).

------------------
http://millennium.massassi.net/ - Millennium
2002-01-01, 8:16 AM #3
No, it's not used in the ctf cogs, but thanks anyway. [http://forums.massassi.net/html/wink.gif]

Has anyone used these verbs?

------------------
I never forget a face, but in your case, I'll be glad to make an exception. -Groucho Marx
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-01-01, 9:37 AM #4
If something doesn't sync up properly with normal verbs, I just use sendtrigger() It works on almost everything with a bit of work.
2002-01-01, 10:48 AM #5
I use SyncThingPos in Rbots. It sync's the position on the bot where it is on the host machine, to all the client machines. (The AI on the client machines used to move the bot slightly out of sync)

I'm sure all the sync verbs use the host machine as the reference or true state of the thing pos, sector, etc.

Raynar


------------------
... the Jedi I admire the most, met up with Darth Maul, now he's toast ...
Rbots - a project to develop a working Bot for Jedi Knight... download the latest development version here
Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis
2002-01-01, 3:24 PM #6
I did see one of the sync verb in one of the lec cog...

------------------
http://millennium.massassi.net/ - Millennium
2002-01-02, 5:42 AM #7
Thanks guys [http://forums.massassi.net/html/wink.gif]

------------------
I never forget a face, but in your case, I'll be glad to make an exception. -Groucho Marx
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-01-02, 11:36 AM #8
The LEC CTF_main.cog uses sync verbs:

Code:
pulse:
   // This resynchs the position of the flags over the network
   // this is just a fix for the case packets with flag position
   // updates are dropped (mostly an Internet problem).

   if(captured_red != 2)
      SyncThingPos(flag_red);
   else
      SyncThingAttachment(flag_red);


Code:
join:
// This resynchs the score surfaces
   // Problems only happen if one of the surfaces is changed
   // while a new player synchs (not joins, only synchs)
   SyncSurface(limit1);
   SyncSurface(limit2);
   SyncSurface(limit3);


Raynar


------------------
... the Jedi I admire the most, met up with Darth Maul, now he's toast ...
Rbots - a project to develop a working Bot for Jedi Knight... download the latest development version here

[This message has been edited by Raynar (edited January 02, 2002).]
Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis

↑ Up to the top!