Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Object Synchronization (Clientside<->Serverside) (https://forums.graalonline.com/forums/showthread.php?t=76796)

Inverness 09-15-2007 12:39 PM

Object Synchronization (Clientside<->Serverside)
 
Basically this would be the ability to sync a TStaticVar on clientside and serverside so a variable change in one is reflected in the other just like with client flags. The reason I want this feature is for my mudlib which uses an all-purpose mud object at GraalObject.mud to store data and I thought it would be more efficient for Graal to sync data to client rather than doing it manually each time its changed.

Ideally the options would be controlled from serverside and there would be static variables to determine how it works, such as what variables to synchronize and if only serverside changes should be synced (like clientr.) or changes to both sides be synced.

napo_p2p 09-15-2007 06:54 PM

I approve.

Kyranki 09-15-2007 07:17 PM

Approve.

coreys 09-15-2007 07:39 PM

Yes, please. :)

Chompy 09-15-2007 08:30 PM

Guilty, Inverness is guilty in making up an amazing idea that should be implented, and along with global functions.

Inverness 09-16-2007 01:47 AM

Inverness.ego ++;

Chompy 09-16-2007 10:18 PM

Quote:

Originally Posted by Inverness (Post 1348009)
Inverness.ego ++;

man... you're guilty in giving yourself ego in a positive way ;o

Stefan, why can't you implent this? Same with global functions :o

Inverness 09-17-2007 04:15 AM

I'd love to have this feature sooner rather than later >.>

Inverness 09-23-2007 09:06 PM

Bump

Waiting for a verdict.

Novo 09-27-2007 07:30 PM

An easy way to fix this is having an event each time a variable changes... Such as:

PHP Code:

function variableChangedvarNameoldValuenewValue )
  {
  
triggerclient(stuff_here"updateVar"this.namevarNamenewValue );
  } 

Then having the clientside find the TStaticVar name:

(@ this.name ).(@ varName ) = newValue;

The this.name should be matching on both clientside and serverside for this to work, however... But it would be one method to do it.

Inverness 09-27-2007 10:02 PM

Quote:

Originally Posted by Novo (Post 1349829)
An easy way to fix this is having an event each time a variable changes... Such as:

PHP Code:

function variableChangedvarNameoldValuenewValue )
  {
  
triggerclient(stuff_here"updateVar"this.namevarNamenewValue );
  } 

Then having the clientside find the TStaticVar name:

(@ this.name ).(@ varName ) = newValue;

The this.name should be matching on both clientside and serverside for this to work, however... But it would be one method to do it.

That was my first thought, I even suggested a hard-coded onVarChange() event for this, however I'm sure having this feature integrated into Graal would make it much more efficient as Graal is already synchronizing serverr. and client. variables.


All times are GMT +2. The time now is 02:36 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.