Im getting
(snd_pcm_open_noupdate) Unknown PCM default error when i try to play sdl games on my gentoo system everytime i need to give "export SDL_AUDIODRIVER=pulse" command before starting games to get sound. is there a way to automate that or setting SDL to use pulseaudio driver permanently?

For automation of exporting environment variables you can put it into a file in /etc/env.d/. Look at the other files in this directory for the syntax. Afterwards you need to run etc-update and to source /etc/profile or restart X or just reboot.

I think the defaults for SDL are permanently set up at compile time, but I'm not sure.