Home Creators Posts Import Register Favorites Logout

Content

Still waiting on that Epic Megagrant money. You know that thing in Fight Club where Tyler makes the space monkeys wait on the porch for several days before he'll let them into the house? I feel like a space monkey, waiting to get my head shaved.

I'm sure that mayhem project will eventually kick into gear. In the meantime, I thought it might be interesting to write a basic WinAmp-sort-of-thing from scratch, and record myself fumbling through it, twenty minutes or so at a time. Here's the first piece.

Did you know that, with SDL, you can be up and playing audio files in about 30 lines of C code? We've got a long way to go on this, but I hope it'll be interesting enough to serve as a gentle introduction to how to use SDL for apps and games.

In an ideal world, I'll do 20 minutes a night, like a little bedtime story for y'all. We'll see how it goes!

And hopefully my wait on the megagrant porch will end soon and I'll have more to say here about shaders and rendering pipelines and such, too. I'll keep you posted! By posting!!

Files

Writing a simple media player with SDL, part 1.

I can't sleep so this is some basic first steps on writing a media player with SDL. This assumes you know some C (but nothing too extreme) and doesn't spend time on setting up a build environment. Go ask someone. Make sure you set this thing to 1080p quality and put it fullscreen, so the text is actually legible. I'll try to get the video to encode better next time, too! The code at the end of the video, all 30 lines of it: https://github.com/icculus/sdlamp/blob/7527bbffbf20224be204b32cf4632e3368016209/sdlamp.c Think this is interesting? Let me know if I should keep building this in future videos. Think _i'm_ interesting? Contribute to my Patreon: https://patreon.com/icculus

Comments

SoVeryBlissful

I remember this time when you started with SDL. I think that the project was called SMPEG. That was the first media player on Linux which just worked for me.

SoVeryBlissful

I always thought of you at Loki games as heroes. You have ported so many games for Linux without any existing infrastructure (hence SDL). That must have been so incredibly difficult (even without knowing the code quality of the original games). Well, I know that even C++-code was so difficult to port between compilers at that time. I bought nearly all of your games. Sadly, things didn't work for Loki. Then, I stopped playing. And now I have come back to gaming and the whole world around Linux gaming has changed.

Josh 'Cheeseness' Bush

I can relate to that waiting feeling. I recently received a grant for a thing, and its date of arrival was about the projected project length past when I was anticipating receiving it when I was working on my application.