For driving safety studies to be comparable, the driving task demand needs to be quantified. In the visual occlusion method, subjects in a driving simulator repeatedly press a button to see the road for 500 ms intervals (a brief glance). The visual demand is the percentage of time they need to see the road. To help plan subsequent experiments, occlusion was implemented in several ways (C++, Python, and Unreal Engine) on 2 computers, believed to be similar (but they were not). An adaptive algorithm was also examined. It adjusted timing thresholds after each button press to reduce occlusion duration variability.
The first question concerned if the implementation affected when the occlusion occurred after a button was pressed. The total response time was always less than 15 ms, too small to matter. The second question concerned the mean occlusion duration (closer to 500 ms is better) and its standard deviation (less is better). The best implementations (mean, SD) for the better computer were C++ (496, 6), Unreal (507, 4, which uses C++ function calls), and Python (514, 3, which calls libraries, simplifying coding). For the overperforming computer, durations were normally distributed. For the underperforming computer, durations were bimodal for C++, skewed left for Unreal, and for Python, had multiple peaks.
Unreal is recommended for standard computers because the code is easily implementable, the mean was close to 500 ms, and the standard deviation was small. For underperforming computers, use C++ because it performs well, but it is more difficult to implement.