Difference between revisions of "Talk:Code structure"

From VCMI Project Wiki
Jump to: navigation, search
(Created page with 'A comments about additions to lib sections: * handling general game mechanics and related actions I think this statement makes the difference between server and lib in handling…')
 
Line 4: Line 4:
  
 
I think this statement makes the difference between server and lib in handling mechanics less clear. 'Server' is responsible for responding to any actions clients want to take, while lib just performs appropriate changes. Lib doesn't handle game mechanics in the meaning I understand it. When for example player wants to attack an enemy stack during a battle, clients asks server "I want this stack to attack that one". Server checks if it is allowed and calculates all necessary parameters of that action and tells the lib "Stack A moves to position B and attacks stack C dealing D damage. Stack C retaliates to stack A dealing E damage. Stack A dies.". Lib just updates gamestates of server and client to match these changes.
 
I think this statement makes the difference between server and lib in handling mechanics less clear. 'Server' is responsible for responding to any actions clients want to take, while lib just performs appropriate changes. Lib doesn't handle game mechanics in the meaning I understand it. When for example player wants to attack an enemy stack during a battle, clients asks server "I want this stack to attack that one". Server checks if it is allowed and calculates all necessary parameters of that action and tells the lib "Stack A moves to position B and attacks stack C dealing D damage. Stack C retaliates to stack A dealing E damage. Stack A dies.". Lib just updates gamestates of server and client to match these changes.
 +
 +
--[[User:Tow dragon|Tow dragon]] 09:58, 2 May 2010 (UTC)

Revision as of 09:58, 2 May 2010

A comments about additions to lib sections:

  • handling general game mechanics and related actions

I think this statement makes the difference between server and lib in handling mechanics less clear. 'Server' is responsible for responding to any actions clients want to take, while lib just performs appropriate changes. Lib doesn't handle game mechanics in the meaning I understand it. When for example player wants to attack an enemy stack during a battle, clients asks server "I want this stack to attack that one". Server checks if it is allowed and calculates all necessary parameters of that action and tells the lib "Stack A moves to position B and attacks stack C dealing D damage. Stack C retaliates to stack A dealing E damage. Stack A dies.". Lib just updates gamestates of server and client to match these changes.

--Tow dragon 09:58, 2 May 2010 (UTC)