How was gunpowder used in China and why didn't they invent guns instead of Europeans?

by CK2Benchmarks
hborrgg

Much of this comes from Tonio Andrade's The Gunpowder Age.

Many early Chinese gunpowder recipes burned relatively slowly making them ill suited for propelling a projectile. As a result early gunpowder weapons largely took the form of fire arrows, firebombs, and firelances (a small hollow tube fixed to the end of a pole or spear which would spray fire at the enemy, a bit like a flamethrower). Because Chinese fortifications tended to be thicker and wider at the base than castle walls in Europe at the time Chinese siege tactics tended to revolve more on attacking the gate or setting the buildings inside on fire rather than battering down walls, and as a result these incendiary weapons continued to play a role in Chinese warfare throughout the middle ages.

Nonetheless your premise is incorrect, the Chinese did eventually develop more explosive recipes for gunpowder and guns before the Europeans did. They were able to make new explosive "thunderclap"-style bombs as well as early cannons and "improved fire lances", which used a metal tube to shoot a round, metal bullet and could be reloaded. For most of the late middle ages up until the second half of the 15th century European and Chinese gun technology seems to have been more or less on par and if anything the Chinese seem to have had the advantage. Over the next fifty years however the matchlock arquebus and the "classic"-style, long-barreled cannon were developed in Europe. These weapons then remained unknown to China until the technology was brought over by Portuguese explorers in the 1520s.

Exactly why these weapons were developed in Europe rather than China is not clear. Andrade suggests that it had do with the relative amounts of warfare seen during this period. Essentially, in 1450 the Ming dynasty had finished stabilizing it's rule and with no major military threats there was no longer much need to develop new gun technologies. Meanwhile conflicts between European states continued to rage.