I did not expect such a detailed code review (the fact that you wrote it on mobile impresses me even more), but I strongly agree with everything you mentioned. I think I was so caught up learning GLSL and its quirks, then playing and experimenting with the simulation, that I “forgot” my coding standards. Anyway, I’ll make sure to take some time to update both the code and the article following your recommandations.
Thank you for the link. I’ve seen it posted a few days ago.
The caching proxy for this tutorial should easily work with any tile server, including self-hosted. However, I’m not sure what the benefits would be if you are already self-hosting a tile server.
Lastly, the self-hosting documentation for OpenFreeMap mentions a 300GB of storage + 4GB of RAM requirement just for serving the tiles, which is still more than I can spare