Hello!
I’m a beginner with Unity, and my first project is a minimalist rhythm game. I have been able to make it work fine in the editor on Linux, and have recently built it for a first beta.
Unfortunately, while the game was running well on Linux, I discovered that on Windows, it was having a nasty stuttering in audio! For game relying on music, that’s not really cool.
So I switched to Windows to try to fix that, and discovered this:
I had the audio settings "DSP Buffer File"set to Best Latency. Since I want it to be a quite precise game, it seemed logical at the time, and it actually made the game more reactive. But, on Windows, it was actually the cause of the audio stuttering! So I had to set it to “Good Latency” in order to have a pleasant sound.
However, now, the game has latency (it makes sense alright)! It’s a short latency, only a fraction of second between player’s input and game’s reaction. So it doesn’t make the game unplayable, but… it’s not great either. For someone like me used to Rhythm Heaven, it feels really weird to push the button “in advance” to be in rhythm.
Ironically, I still don’t have any latency on Linux. Well, I guess I can now tell Windows users “Your OS might have more games but they don’t run well!”. ![]()
Anyway, that situation concerns me. It should be possible on Unity to have a game with very little (to none) latency, while still being able to play music. Right?
I’ve tried several things. Like settings Load Type of audio assets to Streaming instead of Decompress on Load, but to no avail. I’ve also checked CPU usage, and it doesn’t seem to be a problem at all.
So, my first question is: if you have experience with rhythm games in Unity (or even fast paced games), would you suggest to set DSP Buffer File to Best Latency, Good Latency or Best Performance?
And my second question: Um, well, any idea on one of the two issues mentioned above?
Actually I could even go with a third question if you want to try out the game. Do you also perceive a latency? Yeah, there’s the dumb possibility that it is caused by my machine, and I still haven’t had many testers yet. So regardless of the game itself, I would like to know if you also can hear a delay between the moment you press a button, and the moment the game reacts.
Edit: I’ve finally been able to test it on other machines, and the latency is there as well. So that’s settled.
I must confess, I initially feared, while working on Linux, that the game would just not compile on Windows. Well, it does, and it works. But badly… In some aspect, it might be worse, huhu!