If you want to play this game, you can do so here: https://zeel01.github.io/dt2165/index.html
Driver Test: 2165 is one of my first complete coding projects. It's a simple game with simple rules, navigate a car along a course of random obstacles without crashing. The longer you go, the higher your score.
This project is a critical part of my journey as a developer, and a critical part of why I am where I am today. Allow me to tell you a story:
My interest in software development started in middle school and early High School. At the time, I was playing an online game called "Spybattle: 2165" which is a simple text only browser-based game. I started my programming journey writing userscripts, small JavaScript programs that browser extensions allow you to run on top of websites, to enhance that game. You might have noticed the name! Yes, I set the "story" of dt2165 in th same year that Spybattle is set, though that's where any similarities end.
In high school, I was obsessed with computers and any kind of electronics. It should come as no surprise that I installed apps and games on my Ti-84 graphing calculator. One such game was a very simple pixelated driving game in which the player uses the arrow buttons on the calculator to move a car left and right across the screen to avoid obstacles. As the game progresses, the score increases, and so does the speed of the game. I really enjoyed this game, I could sort of zone out and play it without really thinking.
Toward the end of highschool I started to search for a college. My first choice was Full Sail University and their game development program, but it was a financial long-shot. My application was accepted, but that was only the first hurdle. It's not just an expensive school, but an expensive area in Florida where I would need to pay for an apartment. Full Sail offers what they call the "Creative Minds scholarship" to prospective students, which is a pretty sizable scholarship that involves entering a project into a contest. For the game development major that meant creating a game of my own.
Armed with a concept, a name that nobody would understand the reference to, and a tutorial about writing a Breakout clone in Java, I got to work. I based the gameplay on that Ti-84 game, and I drew all my own pixel-art cars and obstacles. Start to finish, the game took me a week to write - spring break of my senior year in high school. The original dt2165 was written entirely in Java, and that is the version which I submitted for the scholarship. I don't fully recall why I chose to write the game in Java, I think it was a combination of available graphics libraries and the ability to run the program either directly on a desktop environment or embed it in a web page.
And I won! The news was both extremely exciting and somewhat troubling. The scholarship was big, but the price tag was bigger. Ultimately, despite winning, I had to turn the scholarship down and go to a less expensive school. It just wasn't possible for me or my family to afford the rest of the tuition, much less room and board. Instead, I went to The University of Akron, and that decision has shaped the trajectory of my life. Where I live, where I work, meeting my wife... none of it would be the same if I had decided differently, taken out some crazy big loans, and moved to Florida.
You might have noticed that this repository doesn't contain any Java. After the scholarship competition, I didn't put dt2165 away for good. Instead I used it as I learned new things. I re-wrote the entire game from scratch in JavaScript, though the gameplay and mechanics are the same, and my hand-made graphical assets are the same ones I used in the Java version that I submitted.
The JavaScript version of Driver Test: 2165 is written in Object-Oriented JavaScript, and uses the "new" <canvas> API. The word "new" is in quotes because this was over a decade ago. There are no dependencies, other than a "modern" internet browser. This was written before big graphics libraries like PIXI.js were available, so the graphics are handled directly through the canvas API, it's also a bit older than the modern class syntax for creating JS classes, so it uses the older function as a constructor paradigm.
There is also a critical bug - the game runs at the framerate of the user's screen, this includes not only rendering but the logical calculations of the game. When it was created, this wasn't a big deal, screens didn't have the kind of frame rates they do today. However on a modern computer, this makes the game far more difficult. At some point I intend to make some upgrades to this project and correct this defect, but I will probably leave this version available with quirks intact.