This paper presents a study from the same, spark ignition, reciprocating engine running on natural gas, hydrogen and two different synthesis gases. The effects of varying fuel composition on the engine's energy balance is examined in detail, with a particular emphasis on the lean burn performance. Closure of the First Law over the engine is achieved through the integrated use of measurement and engine simulation. This integrated approach enables validation of the heat losses from the entire engine, and in particular the in-cylinder heat losses.These analyses demonstrate high in-cylinder heat losses for the hydrogen-rich fuels relative to those for the natural gas, which is consistent with the literature. Further, they also suggest a plausible explanation for the consistently observed lean air-fuel ratio for peak thermal efficiency. This appears to be primarily a trade-off between higher in-cylinder heat losses at richer conditions and higher unburned fuel losses due to flame quenching at leaner conditions, the latter considered in a previous work by the group. Thus, the physics of premixed turbulent flame propagation and the in-cylinder heat losses appear to combine to be strong determinants of the performance of gas fuelled engines.