Day 6 - Bug Hunt
Yesterday, I rolled out a release and confidently labeled it as "final" (oh, the irony of that "final" tag).
Today, while testing the code across different platforms, I discovered a significant audio glitch that affected Linux users. It resulted in lags and, in some instances, outright crashes. I promptly turned to the pyglet documentation and adjusted my code, hoping that letting pyglet handle the main loop would solve the issue.
Alas, it didn’t. Tweaking the audio backend offered no relief. And pivoting to pygame.mixer? Not a feasible solution.
In the end, I had to resort to a less-than-elegant quick fix, inserting an ad-hoc patch specifically tailored for the affected platform.
Allocating an extra day before the deadline proved invaluable. The fix was implemented successfully 10 hours before the deadline.
While I uncovered numerous bugs in my dependencies, in reality, these are minor inconveniences. They include:
- I could not record video of the pyglet fullscreen window on windows (it should be borderless fullscreen, no option for that).
- I could not make an audio loop with pyglet.media
- I had to do my audio handler, for some reason audio was playing out of range. To detect such I had to look for playing time > audio length.
- I had to hack wav format on raw data to play it with pyglet.
- PyGLM objects are not immutable.
- PyGLM quaternions passed to GLSL has a messed up x, y, z, w components
After testing on multiple platforms, I had the impression that a linux environment is hostile to gamedev.
From my perspective all the issues I found are really easy to fix, maybe just no one addressed them before.
Having learned from this experience, I feel motivated to create an out-of-the-box solution for the window + audio.