Difference between revisions of "Talk:Code structure"
Tow dragon (talk | contribs) (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…') |
|||
(3 intermediate revisions by 2 users not shown) | |||
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) | ||
+ | |||
+ | In adventure map objects, however, things look a little bit different. All decisions and mechanics are described in ObjectHandler.cpp (hence its name), the server passively processes the requests and updates game state (hero stats, bonuses, object owners, player resources etc). It may be resonable to precise the role of each of these modules so that further implementation of scripts would be more consistent and predictable. | ||
+ | |||
+ | --[[User:Warmonger|Warmonger]] 21:20, 24 May 2010 (UTC) |
Latest revision as of 19:22, 24 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)
In adventure map objects, however, things look a little bit different. All decisions and mechanics are described in ObjectHandler.cpp (hence its name), the server passively processes the requests and updates game state (hero stats, bonuses, object owners, player resources etc). It may be resonable to precise the role of each of these modules so that further implementation of scripts would be more consistent and predictable.
--Warmonger 21:20, 24 May 2010 (UTC)