In the quiet Sun, convective motions form a characteristic granular pattern, with broad upflows enclosed by a network of narrow downflows. Magnetic fields tend to accumulate in the intergranular lanes, forming localised flux concentrations. One of the most plausible explanations for the appearance of these quiet Sun magnetic features is that they are generated and maintained by dynamo action resulting from the local convective motions at the surface of the Sun. Motivated by this idea, we describe high resolution numerical simulations of nonlinear dynamo action in a (fully) compressible, non-rotating layer of electrically-conducting fluid. The dynamo properties depend crucially upon various aspects of the fluid. For example, the magnetic Reynolds number (Rm) determines the initial growth rate of the magnetic energy, as well as the final saturation level of the dynamo in the nonlinear regime. We focus particularly upon the ways in which the Rm-dependence of the dynamo is influenced by the level of stratification within the domain. Our results can be related, in a qualitative sense, to solar observations.