Changes between Version 6 and Version 7 of Debugging


Ignore:
Timestamp:
Dec 7, 2013, 12:23:58 PM (10 years ago)
Author:
Yves
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Debugging

    v6 v7  
    8989
    9090=== OOS caused by the AI ===
    91 An out of sync error is caused by the AI if it sends different commands to the simulation on different clients or even on the same client when running the game multiple times. You can add some debugging code to binaries/data/mods/public/simulation/helpers/Commands.js in the function ProcessCommand to check if this is happening. When using a replay you know which player number is the AI player and can filter the output like that:
     91An out of sync error is caused by the AI if the following conditions are both true:
     921. The AI sends different commands to the simulation on different clients or even on the same client when running the game multiple times.
     931. The simulation state does not differ before and the AI gets the same input data.
     94
     95You can add some debugging code to binaries/data/mods/public/simulation/helpers/Commands.js in the function ProcessCommand to print all the commands comming from the AI. When using a replay you know which player number is the AI player and can filter the output like that:
    9296{{{
    9397        if (player == 3 || player == 4)