I have understood that no particular libraries can be assumed to be found in the machine that is running the demo.
Everything should be in the 4k executable, Am I right?
It's very convinient for the user if your intro runs straight out of the box without the need to install additional packages.
This way you have to do everything on your own, though.
For example creating your window with x11 calls instead of a simple "SDL_SetVideoMode" - which requires noticably more size.
If I'm writing a project that uses OpenGL can I statically link it into executable and still get it all fit into 4k?
OpenGL is a shared lib and most of the functionality is inside the driver anyway, so there's not much to include into the binary.
I'm going to work in linux environment and don't have a clue of what to use for audio.
I had admittedly quite a lot of "what the fuck?!" moments when porting my windows sound stuff over to linux.
At the end I was quite happy with alsa, though.
You can simply register a callback function using "snd_async_add_pcm_handler". The kernel then calls your function whenever more audio data is needed.
So you usually won't even need a thread - or even a buffer.