Game Development Community

(Question) Put logic in server script or use commandToServer?

by vincent kway · in Torque Game Engine Advanced · 06/13/2011 (2:13 am) · 0 replies

Hi guys,

I have a custom logic to reduce stamina of a player (not using the build in energy from Engine). Currently the logic is scripted in client side and commandToServer to update the server function.

1. Client call scheduler to reduce stamina on client side every 500ms when action is performed, commandToServer to update the value in server. By doing this, I'm actually adding the numbers of calls from client to server.

(Question) Are these going to use more bandwidth ?

2. I'm planning to move all the logic code to the server. When client perform an action, commandToServer to set a flag of the particular action. Server will call a scheduler to reduce client stamina on server side, which will auto update the stamina of the client in the engine. Each client that perform an action will have a different scheduler.

(Question) Are these process going to create latency to all the client, since I'm adding more process to the server ?

Please advise, or point me to any resource that I can do some research on, if similar things have been discussed before.

Thanks.