I recently tried to load a PNG file into an SDL_Texture to render on screen. SDL supports BMP only by default, so I’d need to grab a library. SDL_Image exists as an extension to SDL and runs on any platform supported by SDL. It’s a great option that I’ll probably use it at some point, but I’ve always been a fan of the lightweight stb libraries. So for fun I decided to go with stb_image.
Just a small trick I wanted to share. As I mentioned in my last post, I often launch the command-line via shortcut with a script (
shell.bat) that initialises the environment for working on a specific project. This shortcut is usually pinned to the start menu so I have easy access.
I recently took the time to set up a new VSCode project to work with SDL as a learning exercise. To do this, I adapted this LazyFoo tutorial for Visual Studio. The whole process probably took me an hour or so (less than it took me to write this blog post, sadly).
Let’s start off by looking at the project layout.
As I mentioned in Part 1, I wrote almost all of the important code for the extension in the first afternoon. The difficulty came in wrapping my head around the Visual Studio Extension framework and environment. The full source code is available on GitHub should you want to check out the implementation. I’m writing this out here in the hope that it could help others who face the same difficulties I did.
I recently wrote my first extension for Visual Studio called VSBlockJumper. It came about as I was watching Casey Muratori’s Handmade Hero series and noticed he was jumping over blocks of code in Emacs. As a programmer I’m always looking for things that might speed up my workflow and this seemed like it could be one of them.
Having my own blog is something that’s been in the back of my mind since around 2008. That’s the year I graduated from University and started working full time at THQ. It’s also the year Braid came out. I think it was the first game in which I actively followed the development process. I did so via Jonathan Blows blog, which I began following after watching his Indie Prototyping presentation at the Independent Game Summit (GDC) in 2007.