Network coding has recently emerged as an effective solution for multicast and broadcast communications in ad hoc networks. We focus on broadcast traffic and design a network coding-based scheme that we compare against simpler solutions, through extensive simulations in the ns-2 network simulator. Indeed, while often the benefits of network coding have been shown via theoretical analysis or in simplified simulation scenarios, our aim is to assess the performance of network coding in ad hoc networks when realistic MAC and physical layers are considered. The performance of network coding for traffic broadcasting strongly depends on the network node density and on the generation size. In particular, network coding fails to work in sparse networks, where connectivity is low, and leads to significant gains in terms of end-to-end packet loss probability in dense networks, where congestion is likely. It requires neither a global nor a partial view of the network, nor does it require information about neighboring nodes. Moreover, achieved results show that the protocol delivers broadcast data reliably with minimal network overhead, by eliminating redundant data transmissions, even under adverse network conditions.