Our Scripts Vault contains many game scripts that you can use to create your own game!
+-------------+-------------+-----------+------------------------------------------+| attacker_id | defender_id | attack_id | result |+-------------+-------------+-----------+------------------------------------------+| 12 | 117 | 26 | %s attacks %s with %s dealing 50 damage. |+-------------+-------------+-----------+------------------------------------------+
$combatId = 1;$attackerId = 1;$defenderId = 2;$result = array( array ( 'attackId' => 1, 'params' => array ( 12, 1, ), ), array ( 'attackId' => 2, 'params' => array ( 8, 1, ), ), array ( 'attackId' => 1, 'params' => array ( 23, 2, ), 'special' => 'critical', ), array ( 'attackId' => 2, 'params' => array ( 0, 1, ), 'special' => 'block', ),);
I've seen a lot of sites doing that (outwar) and they don't have immense servers, i guess there is a smart way to save them.I know it will take a lot of space if 1000 players atk about 20 times a day.
This is EXACTLY how i though about saving it, however, my concern is space used on server/database, and how big should i make the column where i save all those arrays? a varchar(10000) ?
Can you drop the examples of other sites that do it? I would be interesting in checking them as well.
I can send you pics of my cocks if you want reference.
When it comes to logs, IMHO, the more the better, the more you log the better you will be able to make decisions for the game and it's players. It's easier down the line to remove logging or remove unneeded information once you have a better idea of what you need. You, however, cannot go back and get the information you need if you didn't log it As a quick guess I would say 80% of the data in our games is nothing but log tables and still once in a great while we find that we didn't log something that we should have. On average a round of Cypher which goes from 4-6 weeks generates a backup that is just over 2 gigs of data uncompressed.
At times we've had others admin our games, within the admin panel every, page request and the get / post data that might be associated with it is logged along with the authentication name used and the ip associated with it. Again on an active round with one of the games these logs get very large fast, but they are also very rarely read so the load on those tables is mostly writes.
For me, and this is me personally, I always disliked games that only stored the last X amount of attacks. Being a developer I know that disk storage is pretty cheap so then it makes me wonder what else is cheap on the game.
Currently, I'm backing up once per hour and doing a manual offsite backup once per day.