Re: TurboSphere
Reply #589 –
I totally agree, but I base what a dependency is on more than just the number of files. I consider Allegro a very heavy dependency. It handles audio, image loading, video, has an entire software renderer...
The same is true of SDL (although less so), and similarly you can compile things out. Someday I want to be rid of SDL2 completely, and call into WGL/GLX/EGL/CGL myself (I've done it before, they have extremely similar semantics). The main thing that stops me now is input handling, which is horrible everywhere except for Cocoa and Android. X input is a total cluster, and Win32 is ridiculously verbose about it, without even offering the kind of flexibility you would think would come with it.
Perhaps one day I will distribute a subset of SDL2, just the input handler imported into a TurboSphere plugin.
I'd rather have three very small dependencies than one all-mighty one. Like using libsndfile and OpenAL, as opposed to just SDL2's audio--why would a sound driver know anything about file types? Why would your graphics library know anything about sound? In particular, why use an audio library when your OS already has one that you're sound library is calling into? That's why I am using DirectSound itself, not OpenAL, on Windows. OpenAL is a part of CoreAudio on OS X, but I do want an ALSA and an OSS backend for the audio plugin, too. OpenAL at least also does 3D audio mixing, which would be very complex using any other backend.
ICU is different in some ways. There is no UTF-8 handling on Windows or some Unixes. Want UTF-8? You need to do it yourself, or use ICU which does it itself. NSPR is silly, though, since Win32 and Posix both have their own threading libraries. Only writing two backends is simple, and I know from experience that Win32 and pthreads are very similar.