I ran into a sound issue in the game because each shot and movement had its own sound. This meant that during big battles like Waterloo, with around 300 units, the app was trying to play a ton of sounds at once. That led to bugs, like the sound suddenly cutting out, as you can see in this video: https://www.youtube.com/watch?v=fDBbn4Lpfmc.
To solve this, I added sound prioritization. Now, if multiple shots happen at the same time, only the closest one will play. The same goes for movement—if several cavalry units are moving, you’ll only hear the sound from the closest one.
Since there’s so much shooting in Waterloo, I also introduced a slight delay before new shot sounds can play. I’ve set it to 200ms, which helps keep things under control.
All in all, these changes have made the game’s sound system more manageable and smoother.
This will be available in version 1.4 I'm preparing.
️ Play the Alpha version!
Web: https://lines-of-battle.onrender.com
Android: https://play.google.com/store/apps/details?id=com.sophiegames.linesofbattle
Discord: https://discord.gg/Xh4JSX9ew5
Patreon: https://www.patreon.com/SophieGames
Reddit: https://www.reddit.com/r/LinesOfBattle/
Instagram: https://www.instagram.com/sophiegamestv
TikTok: https://www.tiktok.com/@sophiegames32
X: https://x.com/SophieGamesLOB
What is Lines of Battle?
Lines of Battle is an indie game I'm developing that features simultaneous turn-based online gameplay set during the Napoleonic Wars. I wanted to share some progress and gather feedback from the community!
In this game, players engage in strategic Napoleonic battles where every decision counts. Unlike traditional turn-based games, where players alternate turns, all players plan their moves at the same time, creating an added layer of unpredictability and tension. When the turn ends, all actions are executed simultaneously, leading to dynamic and realistic battlefield outcomes.
The idea behind simultaneous turns is to give players ample time to plan their strategies while watching all the orders play out in real-time, eliminating the back-and-forth "I go, then you go" feel.
The game will be available on both PC and mobile, so you can enjoy Napoleonic battles on your preferred platform!
I’d love to hear your thoughts on what you’d like to see in a Napoleonic turn-based game, what mechanics you think would make it stand out, or any questions you might have!
Lines of Battle: Sound prioritization