I swear writing long, rambling blogs about SDL is not
my full-time job, but there's a lot to cover, so here's one last post about it for now.
Back around the dawn of time, when we were planning to branch off for SDL 1.3, as it was called before the ancient Greeks invented integer two, we decided to make promises^W^Wwrite a roadmap for where we wanted the project to go next.
The original plan ended up here, literally in my .plan file:https://icculus.org/cgi-bin/finger/finger.pl?user=icculus&date=2007-10-07§ion=sdl13
(...and history is a big ball of wibbly wobbly timey wimey stuff. The first commit to the SDL-1.3 branch was a year and a half earlier: April 27th, 2006.)
So how did we do?
Overall, pretty well. We hit much of this list, and added tons of things we hadn't even dreamed of at the time (like the brilliant Game Controller API, or Thread Local Storage support, or power status or GLES or SDL_assert, or hell, anything to do with phones).
Some of the bigger stumbling points were in the audio subsystem, which were my fault: I rewrote almost the entire thing and was careful to keep the 1.2 API intact, but didn't get a whole bunch of important things in there, like 7.1 audio, or hell, audio recording. They're all still planned for a future version. Interestingly, SDL's resampler is still totally busted if you aren't converting between multiples (so 11025Hz to 44100Hz? No problem. But 48000Hz? Buffer overflow.), but pretty much every modern audio API will give you whatever you ask for and convert/resample on your behalf, so this is actually much less important than it used to be, believe it or not.
Also worth noting: I thought my perl script to generate audio data converters was brilliant, since we could do just about anything in one pass over the data with the final C code it spit out. Turns out there's so many variations, though, that we've basically stuffed the library full of tons of code you'll never use. That's going away at some point. It works, but at this point, it'd be better to shrink the library and try to work with SIMD instructions in a cache-friendly way, which would have been faster in the first place, too. Live and learn, best intentions, bygones, blah blah blah.
The biggest request I get, from all over the Internet, is the multiple mouse support, which is notably absent in 2.0.0. We originally had a Google Summer of Code student that we asked to merge ManyMouse ( http://icculus.org/manymouse/
) into SDL, but he went off and did his own thing and it just didn't work out, so we yanked it. This will be coming in a future release. ManyMouse still works alongside SDL2 in the meantime.
So, okay, what's next?
Here's the start of the next roadmap. I'll be migrating this to the wiki sooner or later. It's not a promise of anything, it's just things we'd like to look into, and maybe do. Comments, complaints, suggestions, and requests are all welcome.
Maybe we'll all be chuckling at this post in 2021, like we do that .plan file for SDL 1.3, when we still haven't shipped SDL 2.1 yet. Fortunately, Google will probably have cancelled this service by then and I'll be saved the embarrassment.
Hopefully Google+ won't mangle this list too badly.API/ABI BREAKING THINGS (goes in SDL 3.0.0+)...
- Add SDL_HAPTIC_SQUARE back in. We need more than 16 bits for new force-feedback effects, and we killed this one at the last minute to add SDL_HAPTIC_LEFTRIGHT, to expose the exact functionality of Microsoft XInput for all those X360 controllers on Windows.
- Finally retire KMOD_*? It drives me nuts that these don't have an "SDL_" in front of them.
- AUDIO_* should be SDL_AUDIO_. Same as the KMOD_
- Why do we have SDL_Init() and SDL_InitSubSystem()? Maybe remove one of these?
- Why do we have SDL_AudioQuit(), etc, and also SDL_QuitSubSystem()? Maybe remove one of these.
- SDL_OpenAudioDevice's "iscapture" should be an SDL_bool.
- Remove SDL_OpenAudio() and only allow SDL_OpenAudioDevice(). Actually remove the compatibility code for the 1.2 audio API.
- Should we remove the window parameter from SDL_GL_SwapWindow()? Maybe require it to swap the current context, regardless of window? We can't make sense of how this should work across every platform.
- Since SDL_free() is now a real symbol, let's get rid of SDL_FreeWAV().
- SDL_assert_data should be SDL_AssertData.
- Make SDL_GetTicks() 64 bit?
- Add a formal event struct for SDL_QUIT that enumerates ways the event was generated (destroyed last window, Apple-Q, SIGINT, etc).
- Change SDL_TouchID to SDL_TouchDeviceID? It's easy to confuse with the fingerID right now.
- Remove joystick balls? There's been like one joystick, ever, that used this, and it was from 1998.
- Joystick API reworking (motion controllers? guitar hero controller things? Wiimotes and Move and Kinect? no buttons only axes, etc)
- Add a version of SDL_AddTimer() that gets processed on the main thread in the event loop - maybe just add a timer event and timer ID parameter?
- Constify everything.
- Remove SDL_GetWindowSurface() from the public API? Let the software renderer access it, and not applications?NEW APIS THAT CAN BE ADDED WITHOUT BREAKING STUFF (SDL 2.1.0+)...
- Audio recording (microphones)
- Video capture (webcams)
- Locale API (Find out user is in the "en_US" locale, etc).
- Reintroduce multiple mice
- An API to fill out app data (for the Mac About box, defaults for PulseAudio, etc).
- An API to name the output on the audio device (for PulseAudio).
- SDL_CreateRendererByName() convenience function.
- Audio device disconnect notification (query and event).
- Move+Resize windows in one API call.
- Add an SDL_DEPRECATED define, start deprecating things.
- sRGB GL context supportSTUFF THAT CAN CHANGE WHENEVER (refactoring, new targets, etc (SDL 2.1.0+ or SDL 2.0.1+)...
- Wayland support
- Mir support
- Raspberry Pi support
- Merge all the EGL targets into one backend with a few #ifdefs
- 7.1 audio support
- Add Linux /dev/input support for Raspberry Pi mouse/keyboard without X11?
- PS4 port? How indie-friendly is Sony actually going to be? :)
- Replace win32 KEYDOWN/KEYUP with RAWINPUT?
- Rewrite the audio loop (fix resampling, improve converting, etc).
- Throw out the audio converter perl script, do something that sucks less.
- Try to unify all the dynamic loading code all over the place.
- Look for FIXMEs
- Move from Xlib to xcb?
- SDL_WINDOWPOS_UNDEFINED and SDL_WINDOWPOS_CENTERED do the same thing internally. Extend the backend to allow the window manager to really handle SDL_WINDOWPOS_UNDEFINED?
- Make various renderers support more than SDL_PIXELFORMAT_ARGB8888
- udev support for audio device connect/disconnect
- I really hate the audio conversion API. It's way too complicated to explain well.
- Should SDL_RWFromFP() always take a void*, removing the #ifdef
- Is left/right/middle/x1/x2 still all the mouse buttons we should support?INFRASTRUCTURE (non-code stuff)...
- Update Bugzilla to 4.4 or whatever
- Maybe replace Bugzilla with something else?
- Get Markdown support on hg.libsdl.org
- Replace buildbot with Jeeves or something?
- Migrate buildbots elsewhere so Ryan can reboot his workstation occasionally? :)
- Make documentation easier to ship offline?