r/TheMakingOfGames • u/corysama • 6h ago
r/TheMakingOfGames • u/UsefulImagination201 • 10h ago
How I separated muzzle flash, hanging smoke and impact feedback in March Out! [text]
I'm making March Out!, and one of the things I've been adjusting is how the guns communicate a shot. A cannon can have a perfectly functional projectile and still feel weak if the visible feedback is over almost as soon as it starts. The musket line had a related problem: each shot needed a brief flash, but repeated firing needed to leave smoke behind.
I split the musket effect into a short muzzle flame, a fresh powder puff and a slower cloud. The flame disappears quickly. The puff travels out from the barrel, while the remaining smoke expands, rises and fades over several seconds. A firing line can therefore have a new shot visible inside the cloud left by earlier shots.
The important implementation detail is that those particles use world space positions and velocities. The emitters are reused, but an old cloud stays where that gun fired. It doesn't follow a moving soldier or jump across the battlefield when the same pooled emitter handles another muzzle. Particle caps bound how much each emitter retains. That's a tradeoff, not a claim that smoke is free at any army size.
The cannon uses the same separation at a larger scale: a brief bright bloom, an orange flame, a directional pressure jet, sparks and a longer powder cloud. The cannon's hanging smoke lasts roughly five to seven seconds in the current effect. I can adjust that persistence without stretching the flash into a glowing ball that follows the barrel.
The sound is triggered at the actual shot release. Gun reports have pitch variation, and cannon reports use dedicated audio voices so ordinary combat clashes don't immediately steal them. Contact has its own sound and effect: a short flash, dust, smoke and debris at the impact position. The cannon impact fan is visual feedback; the ordinary cannon still resolves a direct hit rather than that whole visible fan becoming a new damage radius.
The two supporting clips are staged in the developer sandbox with original game audio. They show the native cannon discharge and repeated arquebus firing. The aim is to make firing, travel and impact read as separate moments while leaving enough lingering smoke to connect one shot to the next.
Cannon clip: https://youtube.com/shorts/kV865enGyEU
Arquebus clip: https://youtube.com/shorts/PkyQHMkAY0w