Adding "critical damage" to MMOItem
Posted: 17 Aug 2014, 01:01
This is more of a best practices question as oppose to a how to question, as I can think of several off hand.
I'm adding critical change and critical bonus to "spells" which are just MMOItems. Currently the player sends a request for the Spell, the server pulls the data from the database table (damage, speed, damage range, cast time), the player runs a casting timer function and sends the request to instantiate the spell to the sever, and the server instantiates it.
What are the drawbacks/ advantages of these options:
1) When the player sends the request to instantiate the spell to the sever, he has already ran a function to determine if the spell is going to be critical and sends over the request with the critical damage already added to the spell.
I feel like this would be the easiest, but leaves allot open to the client.
2) When the player sends the request to instantiate the spell to the sever, the sever determines if the spell is critical through a function and could receive the critical bonus and critical chance from the proper database table.
This way seems more secure but could have some lag or scaling problems I'm thinking. Would having so many calls to the database cause problems when scaling?
I'm sure that there are a couple more ways so I'm open to ideas on what would be a good balance of security and speed.
I'm adding critical change and critical bonus to "spells" which are just MMOItems. Currently the player sends a request for the Spell, the server pulls the data from the database table (damage, speed, damage range, cast time), the player runs a casting timer function and sends the request to instantiate the spell to the sever, and the server instantiates it.
What are the drawbacks/ advantages of these options:
1) When the player sends the request to instantiate the spell to the sever, he has already ran a function to determine if the spell is going to be critical and sends over the request with the critical damage already added to the spell.
I feel like this would be the easiest, but leaves allot open to the client.
2) When the player sends the request to instantiate the spell to the sever, the sever determines if the spell is critical through a function and could receive the critical bonus and critical chance from the proper database table.
This way seems more secure but could have some lag or scaling problems I'm thinking. Would having so many calls to the database cause problems when scaling?
I'm sure that there are a couple more ways so I'm open to ideas on what would be a good balance of security and speed.