|What's the most important piece of code you've written?|
My answer is as follows... The most important piece of code I've written was a rudimentary 2d tile engine in QB64 for an RPG I never finished. It's memorable and important to me because of what writing it did for my confidence as a developer. At the time, writing a tile engine "from scratch", in my mind, would make me a "professional".
I had been following a Game Development YouTube series called "Adventures In Game Development". I wanted to be a game developer! It was my dream! I was a novice developer when I took on that challenge. After a few articles and discussions with some people in various IRC channels, I began.
A few hours later, I saw a map appear that I had hardcoded which contained 0's, 1's. When I saw the square patch of grass with water in the middle (my clever map design), I thought I could accomplish anything. It was one of those moments that changed my life.
I'm not kidding when I say I had wanted to write a tile engine for a year, at least, before I was actually able to do it. I was probably around 14 years old, at the time.
I hope you enjoyed reading my answer to this question and I look forward to reading yours!
I found the link to one of the articles I read when writing the tile engine.
Another important piece of code I've written was the prototype for this game.
I helped with the commercial version a bit but it was awesome to see my prototype turn into the first commercial game that I helped release. The prototype was simple but it had the basic functionality that Hexapod Defense Force has.