I was reading an issue of Linux Format today, and saw a parallax starfield in SDL. I hadn't tried SDL before, so I gave it a shot, and added some extra functionality like bliting images of planets, etc. I was surprised how easy it was.
Anyone else played around with SDL before? How do you rate it vs other graphic libraries?
I've included the code I threw together as an attachment if anyone wants to play with it. Just chmod +x build, then ./build to compile it, and ./cosmos to run it. It's hardcoded for my resolution (1080p), but it's easy enough to change the defines at the top of main.c.
It's funny when thieves accuse other thieves of stealing. Ai companies just blatantly siphoned all the knowledge of the internet without consent and are now selling it with their service... so excuse me if I find this a bit ironic.
Question
simplezz
Hi,
I was reading an issue of Linux Format today, and saw a parallax starfield in SDL. I hadn't tried SDL before, so I gave it a shot, and added some extra functionality like bliting images of planets, etc. I was surprised how easy it was.
Anyone else played around with SDL before? How do you rate it vs other graphic libraries?
I've included the code I threw together as an attachment if anyone wants to play with it. Just chmod +x build, then ./build to compile it, and ./cosmos to run it. It's hardcoded for my resolution (1080p), but it's easy enough to change the defines at the top of main.c.
cosmos.zip
Link to comment
https://www.neowin.net/forum/topic/1108349-parallax-starfield-sdl/Share on other sites
10 answers to this question
Recommended Posts