I had a bad experience with Visual Studio

Biscuit's Cookie Algorithms
4 min readAug 29, 2024

--

Photo by Rubaitul Azad on Unsplash

The GMTK Game Jam was hosted some time ago, and the jam taught me something about software development that I couldn’t have learned by other means.

  1. I learned what crunch time is like
    Even though the jam was 96 hours, I wanted to be able to say to everyone that I made a game in less than 48 hours, because that would be more satisfying than 96. As such, I worked like a machine at times to get the game to a finished state. I didn’t even touch the Xbox during these two days, or talk much to anyone at all. I think that’s why the jam’s time was extended, but I’m fine with all the intense grinding I did.
  2. I learned that JavaScript is way too permissive
    One thing I don’t like about JavaScript is that it’ll create variables for you, even after the class has been defined and instantiated. I was looking at a tutorial for how to create buttons on a Canvas2D, and the person teaching me used a slightly different approach to creating buttons. He used a class, but I was using a list of JavaScript objects, because I only needed three buttons. Like any programmer, I obviously skimmed his function, found out what it was doing, then copy-pasted it into my own. Imagine my confusion when I saw logic errors in my game’s UI. This was because his button objects has height and width values, but my height and width values were named “h” and “w”. When JavaScript saw this, it created “height” and “width” variables attached to my JS objects with values of null. Yes, this was negligent on my part. But I wish JavaScript threw an error in these situations instead of being so laissez-faire.
  3. I learned that Visual Studio’s linking can be really difficult
    After getting over the initial shock that was seeing VS 2022 run way better than VS Code on my 10+ year old system, I tried setting up a coding environment with CMake and C + SDL2. I followed some documentation made by Microsoft using vcpkg to set up a CMake project. But there was a certain library that I needed that couldn’t be installed using vcpkg. So I used GitHub, and moved the header files into my project folder.
    And I got linker error after linker error after linker error. I didn’t face nearly the same amount of trouble when coding my first C++ game in Notepad++, no IDE whatsoever. My solution was to create an entirely seperate project, copy the files that weren’t from vcpkg there, modify the library to prevent MSVC from raising errors, use Visual Studio to compile those files into a .obj file, move that .obj file into my main project directory, then change the environment variables to link to this specific obj file. Even using vcpkg to install SDL2 was a pain. The compiler can’t find this, the compiler can’t find that, configure this setting, unresolved external symbol, and I kept getting errors like these for days. At one point, CMake couldn’t even find MSVC. I struggled with this for days, both before and after the jam started. In fact, 10 hours into the jam, I quit trying to use C and started using JavaScript to make my game. And, yes, I am sure that it wasn’t just my code.
    After I finished my game, I tried to make another CMake project. My experience was just as bad as before. This time, I was trying to write a tokenizer. I spent the first day working entirely in a .c file, and I thought that the fact that I could successfully include my header file into my main file was enough evidence that the linking worked. But the second I started calling functions, I got the same linker errors as before. I checked my code so many times, but was met with the same error. To make sure it actually wasn’t just negligence on my part, I copied and pasted my code into a Repl. I then compiled and ran without any linker errors.

At the end of the day, maybe it was just me. Maybe I forgot to do something, or maybe I forgot to configure this setting. But when I use an IDE, I expect seamlessness. I expect things to work without me thinking about it, or watching a lot of tutorials on how to configure and use it. The way I see it, I should not have to add the IDE’s compiler to my environment variables, create entirely separate projects just to get an OBJ file, or modify libraries to get my code to work.

--

--

Biscuit's Cookie Algorithms

I am a game developer who wants to document the development of his games, and also gather support for them.