Tumbolisu

So, here is my programming stuff.

You will find that I'm least productive in winter. This is partially due to seasonal depression, school and university breaks being in every other season, and a good amount of random chance. I just make things whenever I have time and motivation to.

What follows is a selection of noteworthy (at least in my opinion) programming projects that I have worked on or played around with.
New stuff first, old gunk further down.

Under Construction

Advent of Code 2021 (Learning Rust)

I had recently learned about the programming language Rust. I also hadn't done Advent of Code in a couple years. So, I decided to learn Rust by solving the first few days of AoC 2021. I managed to get 7 stars before running out of steam. This gave me plenty of time to learn how Rust works.
My conclusion:
Rust is a powerful language for certain applications, especially where memory safety is top priority. The syntax and the standard library are great, but in the end, the borrow checker is not my friend. I respect anyone who choses Rust for their projects, I just don't want to use it myself.

Pseudorandom Number Generator Research

I randomly thought of a simple way to generate random numbers via floating-point number divisions. So, I did what everyone would do and spend the next two weeks reading about and implementing various tests. My main source was the April 2010 revision of the NIST paper "A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications". Despite only implementing the first 6 out of 15 tests from the paper, I learned quite a bit about random number generators, cryptography, linear algebra and discrete fourier transforms. The Binary Matrix Rank Test in particular fascinated me at the time.

Breakout Clone (C++ Project)

In the middle of the summer of 2021, I randomly decided to create my own rudimentary Breakout clone from scratch. Why? I was watching Jerma985 play some old retro games, which included a Breakout-like game. I immediately thought to myself, "I bet I can code up a Breakout clone in just a few days."
The very next day, I started programming away, and after just two days, the first working version was finished. It used simple ASCII graphics because I didn't want to deal with that yet. After reading up about Windows GDI, I spent another three days rewriting it with proper graphics.

Screenshot of the first working version of the game using ASCII graphics. Screenshot of the latest version of the game using proper graphics.

How To Play

WINDOWS ONLY!
Launch the game executable through the terminal or double click it (which will open a console window). The game starts immediately! Use the A and D keys to move your bat at the bottom of the screen left and right. Hit the ball at various angles to guide it into blocks to destroy. Prevent the ball from ever falling out, or it's game over!

About the Code

Through heavy usage of the Windows library, the whole game is programmed in just one single file, spending about 300 significant lines of code. However, this means that the game only runs on Windows computers. I used Dev-C++ as my IDE, partially because I didn't know better and partially because I was still a beginner at compiling C/C++ projects. (The whole Makefile build system isn't exactly beginner friendly.) If you are experienced, compiling the game yourself should only require a single console command, like so:
g++ breakout.cpp -o breakout -lgdi32

Downloads

Download Game
Download Source Code

Advent of Code 2020 (C/C++ Practice)

...

Advent of Code 2019 (C/C++ Practice)

...

Vib-Ribbon (Audiosurf 2 Mod)

I like programming, I like modelling, and I like Vib-Ribbon! (Well, I like the artstyle of the game and I like the character Vibri.) Naturally, I had to do something that combines all three: A mod for Audiosurf 2 that mimics Vib-Ribbon.
The end result is a faithful, but simplified recreating of Vib-Ribbon. I didn't have the energy to create animations for all 4 shapes of Vibri, so there is no upgrade/damage mechanic. My biggest grime is the scoring system. I had no idea how the scoring in Vib-Ribbon works, so I came up with my own terrible one that heavily punishes you for making a mistake late in the song.
Now onto the technical side of things:
I picked Audiosurf 2 simply because I happen to own the game and because it has easy modding support. For this project I had to learn the programming language Lua, which was my first exposure to scripting languages. (I wouldn't learn Python for another 3 years.) After having only ever worked with C/C++, it felt confusing as to what is actually happening behind the scenes. However, after I got the hang of Lua tables, I felt quite productive and quickly finished the code.
The biggest hurdle was actually animations. I ended up spending two weeks total on the project, but most of the time was spent on just creating the animations. I didn't have a game decompile I could use, so I had to recreate them by hand and eyeball everything. And if that wasn't enough, Audiosurf 2 did not support animations for models! However, it did support vertex morphing. So, I created dozens of "keyframe" morphs for Vibri, which I then blend between to create animations.
Sounds were also a difficulty, but I eventually managed to get a few clean-ish recordings myself, averaged them, and manually smoothed out the audio samples in Audacity. (Yes, I literally used the pencil tool.)

TODO: Screenshots

Steam Workshop Page

Chess (School Project)

sometime between and

This was it. This is where I first learned about programming.
We had two different teachers teaching us how to program in C, starting from the fundamentals, with Dev-C++ as our IDE. One of the teachers was insane and gave us the impossible task to create a console-based chess game. Most students couldn't get anything done; they were completely overwhelmed. Meanwhile, I was so autistically fascinated by programming that I spent all my time in class as well as at home working on this thing. I managed to render the whole chess board by coloring individual pixels and hardcoding one-bit pictures of chess pieces. However, the game was barely playable. There were multiple bugs, such as the game thinking that knights could reach various impossible spots.
Sadly, I do not have a copy of either the code or the compiled program. I kept the project on a USB flash drive so that I would work on it both at home and in school, and one day I probably cleared that drive without paying attention. It's possible I had a backup on my computer, but since then I have wiped that PC clean and gave it to my mom.
Either way, this class and this project started my journey as a programmer. For the next few months, I only wrote small C programs to calculate random stuff, such as my average school grade.