Getting SDL2 Working

I am not going to get any payment for any of the below products mentioned below. I also paid for them with my money. I am following a tutorial from Parallel Realities. I am using Windows. I did try to get Linux subsystem working on my computer in order to run the Make file to build the project. I couldn’t figure it out. I did get it working in a Linux environment. That was quite a journey to get that working. I was humbled by how little I understand a Linux environment.

I read through the Make file. It looked pretty simple, so I decided to try to get SDL2 working on my Windows machine and Visual Studio 2022 Community edition. I downloaded several zip files I need for SDL2 and tutorial to work. I needed SDL2 Mixer, SDL2 Image, SDL2 TTF, and SDL2 itself. I had to pull out files of Mixer, Image, and TTF into their respective folders. For example, there are x86 and x64 library files that need to be in their x86 and x64 folders. I then had an environment variable to point to directory that store the SDL2 files and folders.

Visual Studio 2022 Community is slow on my machine. I decided to use 4Coder and RemedyBG. I had 4Coder for a while, but kept pushing using it off. I bought RemedyBG recently and wanted to try it out. So I watched a tutorial on how to start using 4Coder. I was able to make a batch file to create a x64 executable. I was able to get it working easily for x86 executable, but RemedyBG doesn’t support x86 debugging.

Once I got RemedyBG up and running, I was shocked on good and smooth it runs compared to Visual Studio 2022. I will admit there are a few quirks I encountered with 4Coder and RemedyBG that Visual Studio is better at. Visual Studio 2022 Community is free. 4Coder doesn’t seems to support copy and paste the first time something is copied (not quite sure if that is bug, but it’s a tad annoying). RemedyBG doesn’t have syntax highlighting for the source code.

I was struggling to find the URLs where I downloaded the files I needed to run SDL2. This is the true reason I am writing up this blog post, so I can go back and find them: SDL2, SDL2 Image, SDL2 Mixer, and SDL2 TTF. People might be wondering why I was struggling when you can Google for them. I agree except for SDL2 TTF. It was telling me to go to Github and build it for my machine. I couldn’t figure out how to build it correctly. Luckily, I was able to find the release builds for TTF.

I still need to improve my understanding of both RemedyBG and 4Coder. I also haven’t master the keyboard shortcuts for 4Coder. I still want to add in Vim keyboards into 4Coder, however I might break 4Coder and I don’t trust my ability to fix any errors. I am not sure how to find the documentations I was looking for. Despite the challenges, I am excited to continue to go through the SDL2 tutorials for game development.

Leave a comment

Your email address will not be published. Required fields are marked *