Hello! I'm Max Cantor, and this is my professional portfolio site.
Full source code is available for any project on request (except Crea, which is owned by Siege Games).
These projects represent some of the highlights of my career in programming.
They are arranged (mostly) in recent order, going further
back in time as you go further down the list.
Discord Full Moon Room
In the depths of the Internet, there is a channel that only appears during the full moon...
From cheat sheets to dotfiles and lectures, my long history with Vim is full of noteworthy artifacts.
"How to Do 90% of What Plugins Do (With Just Vim)" is a goes in depth into some of Vim's underappreciated features.
A learning project that allows the user to explore, record, and play back
chains of browser events as they bubble up and down through the live document model.
During the pandemic, I started running a small Discord server for some friends.
I wanted to add some kind of structure to the server, something that would
help us contextualize time passing even as the months slipped by during isolation.
So I decided that I would program my server to have a special channel that's
only visible when the moon is full. I called it: The Where Lounge.
Discord is a modern communication platform based on the 1988
Internet Relay Chat protocol. It offers an API allowing developers
to build apps and bots that provide social features for users
of servers that opt-in. A Discord bot is a combination of a Discord account and a program that manipulates the account similar to how a human would.
After a few early attempts at so-called moon weather REST APIs, I decided
to do a little research and change my approach.
It turns out that NASA, through their Dial-a-Moon service,
provides an entire year of moon forecast information at a time, in the form of a convenient JSON file!
The data looks like this:
I wrote an internal API for dealing with NASA's data,
using a very simplistic JavaScript prototype-based approach. As I add more features,
I'll probably transition to more modern class-based syntax to keep things simple. The
entire source code of my Moon API is reproduced here for your perusal:
As for the Discord API bot itself, it checks the current moon phase every time
any message is sent on the server, even automatic announcements from other servers.
This was also for simplicity, because it works without needing an external cron
or other task scheduling process. Theoretically, it's possible that the opening of
the Where Lounge could be severely delayed on a slow day, but in practice, my
sleepy server gets just enough traffic and community announcements that it never
lags by more than a couple hours, which is plenty good enough for our needs.
When the threshold is crossed, the bot supplies a callback function to be
triggered that looks like this:
// Called by the Moon library whenever the fullness changes
// from full to not full or vice-versa
async function onFullChange(is_full) {
let guild = bot.guilds.cache.get(MY_SERVER_ID);
let channel;
let announce = guild.channels.cache.get(FRONT_PORCH_ID);
let msg;
if (is_full) {
// ... open the lounge ...
} else {
// ... move the lounge channel to a hidden category ...
}
}
Built into the open/close functions is another Discord API call that dispatches
a message to the server that the lounge is now available (or unavailable).
This year, I decided to celebrate by lowering the fullness threshold to 50%,
so as long as the moon is at least half full, the Where Lounge is open.
Ludum Dare is an online weekend game jam.
Game jams are collaborative events where game developer (professional, aspiring,
and everyone in between) get together and see what they can create in just a
few short days of focused work. Some of the most notable video games ever made
began as humble game jam entries, including Hollow Knight, Celeste, and The Binding
of Isaac.
Sow Happy! was built with Unity and C#. Pixel art in Aseprite.
Each character wants a 9-tile square “home” of their own. In the center
you have to put their house.
The digging goggles guy lives in the lean-to with the log
The gasmask guy with rainbow hair lives in the round boulder with a door
The scythe guy lives in the farmhouse.
In the other 8 tiles,
you need to place tiles that the characters like. They’ll tell you which
ones they like if you walk near them and press “I” to Inquire about their
preferences.
About My Contributions
This game was a collaborative effort from many people.
The music was custom written on the spot for our game by
another very generous game jammer at the coworking venue
that day (Another Castle in Greenfield, MA).
I created and animated the character sprites, designed the
core game loop, and implemented the algorithm that
checks tiles surrounding a home tile and tallies up
how many tiles match the corresponding wanderer's preferences.
Vim is a ubiquitous and free text editor with a stunning wealth of interesting features.
It's notorious for being hard to learn but incredibly powerful in the hands of an experienced user.
While its popularity waxes and wanes, its keybindings are core features are imitated and
emulated in hundreds of other applications, including VSCode.
My contributions to the Vim world are many, but here are two cheat sheets and
a NYC.rb lecture on the Thoughtbot YouTube channel that remains in circulation.
How to Do 90% of What Plugins Do (With Just Vim)
This 70~minute talk covers a wide range of Vim features, many of which
can be squeezed just right to produce functionality that covers a surprising
amount of common plugin functionality, including fuzzy-finding, autocomplete,
and file browsing.
Beginning as a Kickstarter project,
this cheat sheet attracted a lot of attention, and remains available through a print-on-demand service (ScalablePress).
It's intended to serve as a definitive, though not exhaustive, reference for a host of Vim's best core features.
Vim Fundamentals Cheat Sheet
Almost a decade after the first design, I released another design more focused on the very basics and history of Vim.
Crea is a project by Jasson McMorris of Siege Games, who hired me to help
port the game to Linux, design equipment progressions, and improve world generation.
Like my humbly-named project "Betteraria", Crea was inspired by the blockbuster
2D sandbox game Terraria, and is focused on exploring and crafting in a procedurally-generated
world.
After first starting
at Siege Games, I contributed some ideas for player equipment and other game systems.
One of my biggest contributions was taking world generation
through an overhaul. I had identified a problem that underground areas above our "worldgen equator" wouldn't
be populated with caverns, which made them incredibly unfun to explore, so I updated it to consider subterranean
territory all the way up to the actual surface, not just anything below sea level.
I also introduced
the project to its musician, and later reworked the build process to port the game to Linux and
generally simplify the process down to a single command with Makefiles.
Driven by curiosity about Unity's class relationships, this project grew out
of an afternoon of querying Unity's bytecode with a tool called NDepend.
I created a custom browser-based graph editor (see "Treemax" under Other
Projects) to design this chart, and was pretty happy with the results.
The DOM, or "Document Object Model", is one of the most important data
structures in all of web development. It allows the programmer to interrogate
and change a webpage (or "document") with JavaScript, a language built-in
to all modern web browsers.
This was originally developed to assist with programming another small project
called scopey, which
required a lot of very fiddly DOM changes. Creating this exploratory tool
helped develop my intuitive understanding of how DOM events (in this case, specifically clicking and mouse hovering) bubble up and
down through the element hierarchy when triggered.
This tool lets you inspect specific points in the event chain relative
to three nested HTML elements, green being the parent, orange the middle,
and pale purple the most deeply nested child element. Toggle event attachments
using the panel on the right, and fire events by interacting with the elements
on the left. Event chains can also be saved in a queue, replayed at varying speeds,
and cleared entirely.
Mugen is a free fighting game engine from the 00's.
Its last update was in 2011, but it lives on in the manner of a cult classic film, with communities
of enthusiasts continuing to enjoy playing, creating, and comparing new characters.
The pizza slice character was born in the middle of some truly hectic projects,
when I just needed a break to play with something fun. Mugen characters are comprised
by a collection of sprite graphics and some text-based source files that resemble
old-school INI files in syntax.
Programming a Mugen character is painstaking work that requires a lot of coordination
between different source files. There are separate files and unique syntax for defining the character's statistics, specifying
command inputs, attaching the inputs to special attacks, and defining the properties and
timings of the attacks themselves.
There's still plenty left to do before this project will be considered complete.
A fully fleshed-out fighting game character also has personal animations (or "taunts"),
win and lose quotes, super attacks, throws, and even unique animations for winning
a fight or losing by time-out.
An extremely ambitious project that yielded much learning and little in the way of actual gameness.
This project is a pure C codebase, compiled by Makefiles, with almost no dependencies beyond
SDL2, a cross-platform multimedia library. The challenge posed to myself was to see what I could
accomplish staying close to the metal and without any modern frameworks or tooling.
The general idea was to put the player into a sort of abyss with only a glowing crystal,
and to start the game by creating some "world" for the player to mess around with when they touch it.
Returning to the crystal would add more and more tiles to play with, eventually expanding
into new biomes and spawning interesting encounters, though the project did not make it past
the worldgen stage.
The game's server uses socket polling to listen for new connections and accept commands
from players on disparate client machines.
src/server/main.c
src/server/server.c
Text adventure
Dwarf Fortress Cheat Sheet
Frontend Web Development Cheat Sheet (WIP)
Built in CoffeeScript, SemanticUI, and UnderscoreJS.