My old projects

Preface

I primarily developed as a programmer through personal projects, reading good code I’ve found, and watching YouTube.

I’ve learned a lot from the Gunslinger graphics framework and later the RAD Debugger project.

At first I watched YouTubers like The Cherno, Bisqwit and javidx9. Later I watched the people you can see in this post, but I don’t spend much time on YouTube anymore. I have also watched a lot of different electronics channels.

The projects (in order)

It’s difficult to mention my completed projects concisely, but I tried listing most of them here.

Unreal Engine

My programming journey started during the first summer break of secondary school. I learned C++ and Unreal Engine with a Udemy course.

It was overwhelming. I couldn’t solve anything by myself. On the bright side, I received a large stream of information, which set me up for further learning.

I got bored after working through a good chunk of the course, and I attempted to create a game with what I learned. Instead of C++, I used Blueprint, but I still got stuck at rudimentary logic and math.

Weeb Bot

As cringe as it may be, “Weeb boot” was my first successful independent project. It was a discord bot written in Golang.

I made the bot in 2018-2019 during secondary school (I was around 14-15 years old). I didn’t know much programming. I could only read examples and write if statements.

The bot provided storage retrieval, automated responses, string transformations, and web scraping.
I later added the Anilist GraphQL API.

weeb bot screenshot

Drones

I’ve been involved in making two drones.

My dad made the first one. He made the structure using wood and a plastic box to house the electronics. The drone had a commercial flight controller and motors. Sadly, it never flew that great when we tested it.

The second time, we decided to buy a ready-made kit for a drone frame. I assembled and soldered it together. However, I never got far enough to fly and test it properly. This was partly because the configuration tool for the new flight controller was hard to use, and I was unsure if I had broken connections. I didn’t assemble it in a repairable manner, so it was hard to debug.

Snow plower

I made the snow plower roughly at the same time as Weeb Bot, maybe slightly later. It utilized a Raspberry PI running ROS, and the navigation and mapping information came from a lidar.

lidar

It would then navigate and plow the snow autonomously, like a robot vacuum.

The snow plower’s hull reused an old defective snow blower (it had tracks, so it looked cool). The plan was to fit it with electro motors to substitute the removed gasoline engine.

The project never got further than half-working simulations and rudimentary mappings with the lidar. It would be cool to complete it now that I’m more experienced.

Traffic light

I made a traffic light simulation with an Arduino. It marked the first time I properly tried to use OOP. Read my post about OOP, or my list of software rants worth watching if you want to know more about my stance about it now.

The traffic light was a school assignment, but it never counted towards my grade due to the low completion rate.

Traffic light

Anders Tale (Godot)

I began working on Anders tale once I finished the Traffic Light

I’ve primarily programmed the game, but it’s a “group” project. The original vision wasn’t mine. A friend came up with it. The concept has been a joke in my friend group for many years.

Programming has been an on-and-off effort. The main source code is not public, but there is a joke website you can view (not made by me).

Anders Tale cover art

As a Co-Op roguelike, the campaign was supposed to be the highlight. Despite this, the PvP mode saw the most development. The free-for-all was very fun, and we genuinely played it.

Anders Tale screenshot

The game was made in Godot 3 with GDScript. The biggest stop-point was the poor lighting performance, so the game looked plain.

I picked the project up again during the end of summer break in 2024 from a clean slate in Godot 4. It was surprising how far I’ve matured as a programmer. I had become so used to working without game engines that it nearly felt in the way.

I want to continue on it someday.

Rick & Morty Portal Gun

I made a Rick & Morty portal gun with a friend from primary school. He led the physical design while I did the electronics.

The project had a constricted time frame from late May to early June 2021. The portal gun was a parting gift my friend gave someone.

It housed an Arduino, an mp3 player, a rotary encoder, a couple of AA batteries, and a three-wide 7-segment display.
It had a boot-up sequence and allowed you to “select” different world coordinates, with a bias towards C137. Depressing the rotary encoder fired the gun, turning on the front lights and playing a sound effect.

r&m picute back r&m picute front r&m picute inside

Minesweeper

Minesweeper was my first C project. It marked the birth of a new era for me. I finalized it at the end of April 2021 and used Raylib to do the graphics.

Minesweeper screenshot

gs_snake

gs_snake was a snake clone I made with Gunsligner.

I have since programmed a lot with Gunslinger. I am active in its discord server. Discovering Gunslinger was a critical part of my development as an early programmer. It made me discover new ways to program. I uncovered a lot from reading John’s code, and I learned about Jonathan Blow, Casey Muratory, Handmade Hero, and Ryan Fleury.

gs_snake screenshot

HS

HS is an OpenGL wrapper. It simplifies resource creation and usage.

I wanted to try making a library while following along Learn OpenGL. The project remains incomplete, and I never made anything proper with it.

HS Screenshot

Anders Tale (C version)

I figured I could use HS to make something, and re-making Anders Tale seemed fun. It would be a pleasant way to have some focus.

The notable part about the game was its simplistic tile-map system and an AABB collision. It supported “allowed-areas”. Instead of mapping each wall as large collision shapes, they pushed the player inside a room.

I never got far with this version of Anders Tale.

Anders Tale Room editor

Anders Tale Room editor was the tile-map editor for the C variant of Anders Tale.

It was another project made with HS, and it used Nuklear for the Gui.

This project was my first real introduction to serialization and de-serialization, and I made a custom file format for the tile maps. I added font rendering through STB TrueType, which taught me a lot.

Anders Tale Room editor Screenshot

Ghostbusters Costume

The Ghostbusters Costume is another undertaking with my friend from primary school. The proton pack is the main project we’ve had together.

We are both avid Ghostbusters fans and the earliest dreams of our very own costume came during fourth grade. We made many revisions over the years. Naturally, all the early attempts were awful, as we were very young.

As with the Rick & Morty Portal Gun, my friend did most of the prop design, and I did the electronics.

The final variant used an Arduino mega connected to an mp3 player, neopixels, LEDs of different colors, an audio amplifier, a lithium drill battery, both a 12V and 5V supply, a vibrator motor in the gun, a bunch of buttons and switches and a rotary encoder. The realistic exterior, lights, sounds, and effects made it even more awesome and movie-accurate than I ever imagined.

Ghostbusters Pack Ghostbusters Pack lights Ghostbusters Pack unpainted

SE

SE, the Simple Editor

SE was a decently sized project I predominantly worked on during December 2021 and early 2022.

My editor was (and still is) Doom Emacs. Emacs is extremely slow, and I envisioned an editor with features I used without the bloat.

I started with the code base of ST, the Suckless Terminal. Ripping out the terminal part left me with a minimal X11/Xft monospace text renderer.

SE continued in a simple and Suckless fashion. You configured it by changing config.c. It had a callback interface where you registered extensions without inserting code into core files.

The syntax highlighting and auto-indents employed a custom state-machine-like rule system.

I implemented a reasonably complete Vim support. It was a big undertaking, but I got quite far. The main missing features were only macros and markers.

SE screenshot 1 SE screenshot 2 SE screenshot 3

ArduinoNative

ArduinoNative was a header-only C++ project implementing the same top-level features as the Arduino library. It used the console to expose a virtual board interface and monitoring functionality.

ArduinoNative is probably the most usable of my projects. The code isn’t that great, but the interface is clean. Compared to other ways of simulating an Arduino, using ArduinoNative is very simple.

Serial and AnalogRead Example

#define AN_BOARD_NANO
#define AN_IMPL
#include "ArduinoNative.hpp"

int analogpin = A7;

void setup()
{
        Serial.begin(9600);
        pinMode(analogpin, INPUT);
}

void loop()
{
#ifdef ArduinoNative
        an_request_voltage(analogpin);
#endif
        unsigned val = analogRead(analogpin);
        Serial.print("Read value ");
        Serial.println(val);
        float voltage = map(val, 0, 1023, 0.0, 5.0);
        Serial.print("Voltage on pin is: ");
        Serial.println(voltage, 2);
        delay(30);
}

Output:

set voltage of pin 21 to: 3.2
Read value 654
Voltage on pin is: 3.20
...

nisse

nisse, the not intricate serialised s expressions

nisse  __
    .-'  |
   /   <\|
  /     \'
  |_.- o-o
  / C  -._)\
 /',        |
|   `-,_,__,'
(,,)====[_]=|
  '.   ____/
   | -|-|_
   |____)_)

An evening in November of 2022 inspired me to make a simpler version of JSON. It’s essentially an S expression parser with some helper macros. Like my previous parsing projects, it’s made raw without a tokenizer. It doesn’t support escaped characters, which is probably the primary feature it lacks.

I have considered creating a new version with slice-based strings, an arena allocator, and a tokenizer. It would be a good exercise.

gs_ddt

Gunsligner Drop-Down Terminal was a simple debug terminal I decided to write when I started college. It allowed you to invoke custom commands inside your game. It’s been a helpful tool, and I’ve had it in all my Gunslinger projects since.

I made an example program for it.

gs_ddt screenshot

gs_avdecode

gs_avdecode was a media decoder for playing videos in Gunslinger using the avcodec API from ffmpeg.

I also created an example program for this utility.

The latest revision of the program isn’t the one GitHub, as I decided to keep it private (it’s a bit more integrated into work code now).

I still think gs_avdecode is an alright reference if you wish to learn avcodec.

gs_bucket_array

gs_bucket_array was a generic data structure I made for Gunslinger.

It operates similarly to std::deque. It’s a dynamic array that contains pointers to chunks or buckets. The array grows by appending a fixed-size bucket, which gives a good compromise between size and insert/delete/iterate times while retaining pointer stability.

The implementation additionally came with an optional packed free-list.

I don’t use this project anymore. I would rather use a linked list or static allocation.

gs_bucket_array(float) ba = gs_bucket_array_new(float, 100);    // Bucket array with internal 'float' data, where each bucket is 100 floats
gs_bucket_array_reserve(ba, 2);                                 // Reserves 2 buckets
gs_bucket_array_push(ba, 3.145f);                               // Pushes 3.145 onto the end of the bucket array
float* val_p = gs_bucket_array_getp(ba, index);                 // Returns a pointer to your data
float val = gs_bucket_array_get(ba, index);                     // Dereferences your data as well

uint32_t bs = gs_bucket_array_bucket_size(ba)                   // Returns initialized bucket size
uint32_t bc = gs_bucket_array_bucket_count(ba)                  // Returns the amount of buckets allocated
uint32_t ba_cap = gs_bucket_array_capacity(ba)                  // Returns bucket_size * bucket_count
uint32_t ba_size = gs_bucket_array_size(ba)                     // returns index+1 of the last element
gs_bucket_array_free(ba)                                        // Free's the entire array, make sure your elements are free'd first

awaC

AWA5.0 is a stack-based esoteric programming language where you manually write the bits with wa or awa.

awa screenshot

JavaScript was the chosen language for the original implementation. Others have also made their interpreters and compilers for it. I made mine in C and called it awaC

I originally planned to use awaC as an excuse to make a graphical debugger, but I never got to that part. The interpreter only provided debug printing of the stack and program counter.

After watching a Tsoding stream about making a web server in the flat assembler, I knew I wanted to do that with AWA5.0. All I needed was to extend the instruction set with syscall, and painstakingly write over a kilobyte of awa awawaw awawaw awawa. The website I ended up hosting was a JavaScript interpreter of AWA5.0.

awa web server screenshot

· writing, programming, electronics, C