How to calculate altitude in a flight simulation?
You can't directly calculate the altitude of an aircraft from any set of control settings. The altitude is dependent on the history of the aircraft. For example:


Fly level at full power for one minute, and pitch up suddenly. You will be near the ground, having quite some speed.
Climb at full power for a minute. You will be at high altitude, going quite slow.


In both situations, your aircraft is pitched up and at full power, but at very different altitudes. So, what are then the minimum variables needed?

This answer is quite difficult to give. If you're making a professional simulator, thousands. If you're making a platform game, just pitch and power, as well as some way of knowing the history of the aircraft. Usually, this is just a stepped simulation: at each moment in time, determine what your current pitch and power do to the attitude and altitude of the aircraft, and save it for the next time step. Of course, you need some model for relating these variables to actual accelerations of your airplane, and again, this model can be as complicated as you want or need it to be. See Koyovis' answer for more details on such a model.