Hi, I'm Macoy Madson. I am a professional software engineer in the game industry. Here you can find writings about game development, my personal projects, technology, and various other things.
I designed a 3D-printed case for my Minimal Phone MP01 : I wanted to protect the phone's keyboard while it is in my pocket, so it has a sliding cover like a calculator: I keep the cover in my pocket so that people don't notice I have it, because it is unusual. The bottom and the camera are the only things exposed while the cover is on. You can see the cover is less than a millimeter from the…
I would like to introduce my single header libraries . For now there is only one, but I have some others on the shelf I will eventually clean up and post. Single header libraries are a way of bundling C code popularized by STB . All of my libraries are licensed under the MIT license. DataBundle.h This library creates object files from arbitrary files, which then can be linked into any program and…
I was in Japan in January and bought a bunch of stuff from Book Off/Hard Off (which I highly recommend; Hard off is your dream place ). I got a half-dozen Pop'n Music games and a Japan-region PlayStation 2. I also got an official Pop'n Music controller. It isn't very good (rubber dome switches and is much smaller than the arcade), so I decided to build my own arcade-style controller (for which…
I recently delivered a talk, Driving code with data , at Handmade Cities D.C. Eventually there will be a recording of this talk made so the public can view it. For now, past attendees can view builds of the presentation: Platform Download Windows DrivingCodeWithData.exe Linux amd64 driving-code-with-data-amd64 The full source code is here . It is licensed such that you should feel free to write…
This is going to be a brief post in case someone else also ran into this issue and wanted a head-start on it. The AutoCAD DXF format is documented here (AutoCAD "About the DXF Format (DXF)"). I'm going to assume you are already familiar with the basics if you have arrived at this page. The goal My program is a CAD software so it is important that it outputs drawings it creates in an industry…
This is a challenge to create a personal computing system which is: Simple. The source code must be a relatively small size, following the assumption that more code roughly equals more complexity. Useful. A human can plug in their display and keyboard and start using the system to do useful things. Complete. The system can be used to create and run new programs. It doesn't depend on other systems…
I virtually attended Handmade Seattle 2024, where Mason Remaley presented "It's Not About the API" (link eventually), which discussed Vulkan. There was a question about how the buffer data layouts work on the GPU, and the speaker didn't have a clear answer. I don't want to come across as criticizing Mason by saying this; rather, I'm saying this kind of low-level information on GPUs is hard to come…
I created Bunny Semiconductor ( Itch.io , source code ) for the Free-Software Purism Game Jam 2024. It's the first game jam I've done since 7 Day Roguelike 2018 . This is the first finished project I've had in a while that I can show and talk about. Origin of the idea I have been thinking more about computer hardware since I worked on Raspberry Pi bare metal . I started dipping my toes in to PCB…
This article details how to debug the Raspberry Pi 4 and 5 CPUs using hardware interfaces. This is useful for bare metal programming. While there seems to be a great many steps and complicated configuration, remember that this will allow you to step debug the hardware, which will doubtless save you countless hours of frustration when your bare metal project doesn't work. Seriously, if you think…
See the forum post here. I am very excited to show you all the first results of my single header v3d interface in C for Raspberry Pi 4. This is a picture of 100,000 randomly colored, evenly spaced triangles rendering at 177 FPS 1080p: The full example source is here . It is based heavily on the valuable work done here , without which I would not have been able to succeed. It currently lives in my…
Update (2024-04-11): I have finished the Dactyl. It uses the Pico code, and can be found here . I got the Adafruit KB2040 to make a USB keypad and (eventually) a Dactyl . I had a difficult time finding a good explanation of how to use the RP2040 to make a USB keyboard without relying on a keyboard-only firmware like QMK. I hope this article can help others with similar goals. The end result is a…
I wrote to Ryan Fluery after reading some of his articles on software. He replied in an article which I am now going to reply to here. The email First, my email to Ryan, with some light editing: Hi Ryan, You may remember my name from Handmade , where I sometimes post about my Cakelisp project. I have been catching up on your Hidden Grove blog . I agree with you on many of your points about the…
I have been working on a voxel-based game for the last several months. As part of its development, I created a binary versioning and migration system that I haven't seen before. Game data goals Arguably the most important aspect of a game's technical architecture is its data model. The choice of the data model has wide-ranging impacts on iteration speed, development time, game design, player…
It has been a while since I talked about my dynamic environment work mentioned in this post inspired by this post . I thought I would give an update, although unfortunately I don't have great news. My modifications The approach I settled on for enabling a dynamic environment in a compiled C world was building off of Tiny C Compiler. I made several changes to TCC for environments, including: Custom…
I started my morning off with Alan Kay's talk Programming and Scaling . There are several things I agree with and disagree with in that talk. It got me thinking about software as a whole, and my part to play in it. Background I have long been a fan of Jonathan Blow and Casey Muratori. Two talks in particular have been especially influential for me: Preventing the Collapse of Civilization by…
I have been hard at work on my dynamic environment based on Tiny C Compiler. It has been going worse than I hoped. I am attempting to static link SDL 2 with an application I want to test the dynamic environment on. I am soldiering on, and hope to have something useful before the end of the month. If I can't get it by then, I may need to look for other options. It has been an uphill battle mainly…
News It has been nearly a month since my last post, and there have been some interesting developments. RSS now supported This blog now has RSS generated . I wrote the generator in Cakelisp, of course. You should be able to add this blog to your favorite feed reader by entering https://macoy.me as the URL. Note that HTTP is not supported, so depending on your feed reader's defaults, you will likely…
In my last article I wrote about integrated development environments . Lately, I have been thinking about how regular applications would benefit from being easy to modify. Imagine every application also included a development environment tailored to the application. Stop Writing Dead Programs by Jack Rusher captures a lot of where my head is at here. There is a huge amount of value both for the…
I spend a lot of time thinking about development tools. In this article I want to discuss integrated development environments. These are programs that provide text editing (usually code) as well as a variety of features tailored to making the software development process smoother. Why you should care Better tools can make the development process more efficient. This doesn't just save you time, but…
Cakelisp is now developed here . The GitHub branch is already stale, and I do not plan on mirroring to GitHub. While I had many reasons for migrating, the straw that broke the camel's back was Copilot, which in order to resist I must keep my code off of GitHub entirely. Migration progress The GitHub migration I planned has gone slower than I expected. I didn't have an urgent reason to move, so I…
It has been a while since I felt the need to add features and make some more significant changes to Cakelisp. Two came in this past month: defer and CRC builds. defer The defer feature is one I had been wanting for a while, but was unsure about how I wanted to implement it cleanly. Here's an example usage of defer : ( defun main (& return int) (var file ( * FILE) (fopen "File.txt" , "rb" )) (…
In order to effectively write applications that communicate via sockets, there were some realizations I needed to make that weren't explicitly told to me by any of the documentation I read. If you have experience writing applications using sockets, all of this information should be obvious to you. It wasn't obvious to me as an absolute beginner, so I'm trying to make it more explicit in the hopes…
I have been migrating all of my code from GitHub to my self-hosted Gitea instance . My Gitea instance has been mirroring my GitHub code when it changes. In the next week or so, I will be deleting my code outright from GitHub. Here's article that pushed me to finally do it: Give Up GitHub: The Time Has Come! I am doing this for several reasons: I don't want my code plagiarized by Copilot.…
I have several projects written in Cakelisp that I have been chipping away at. File Helper I haven't made much progress on File Helper , but I do find myself reaching for it and hope to revisit it. I want to create a command-line interface for creating an index of files on systems I have which aren't graphical. I can then tag and visualize the file system on my work station. Machsearch My newest…
My linker in development was crashing on free . It was calling one malloc but then freeing with a free associated with a different malloc . This subsequently caused a segmentation fault because the free expected a metadata structure that didn't exist in the other malloc (at least, not at the same size). This took a lot of sleuthing. I knew it was a problem with my linker/loader, but couldn't…
I'm writing a linker. It's an unusual linker. It's focus is not on producing executable files. Instead, its focus is to facilitate rapid iteration on a program without having to re-link or re-open it after making changes. It is hot-loading of code at an object-file granularity. I realized from reading Andreas Fredriksson's Hot Runtime Linking ( archive.org ) that the dynamism I've been wanting in…
I have invested a significant amount of time in building Cakelisp for several reasons, but I think the main one was easier access and better integration of code generation. In this article I'm going to give a high-level view of what I mean by "code generation" as well as a taste of how it can be used. What is code generation? By "code generation", I mean a piece of code which outputs more code. A…
In the late 1950's, Lisp was invented, which used the S-expression syntax style. It looks like this (in this case it is Cakelisp , the programming language I made): ( defun main (num-arguments int arguments ([] ( * char )) & return int) (fprintf stderr "Hello, Cakelisp! \n " ) ( return 0 )) In 1998 the XML specification was published. XML looks like this: <?xml version="1.0" encoding="UTF-8"…
Update: See the good discussion on Hacker News and Reddit /r/programming . I have been relatively busy lately due to unpacking all my things from my cross-country move. Some of my hobbies have been receiving more time. However, don't worry, Cakelisp and GameLib development still continues. For this month, I'm going to write a short article about an approach I take to difficult programming tasks. I…
I started working on Cakelisp a little more than a year ago. I started the project after searching for a programming language that met all my requirements, and found nothing which matched. I figure this is a good time to take stock and talk about what is in the future for Cakelisp. Popularity My goal was never to make a language that everyone wanted to use. I always approached Cakelisp with the…
I recently released File Helper , a file organization application I wrote using Cakelisp. This application had only two external files that were necessary for it to fully function: A font An application icon I packaged File Helper in a .zip or .tar.gz for Windows or Linux respectively. These archives contain the platform executable as well as a license file and the two necessary font and icon…
It is convenient to only have a single executable file when distributing an application for several reasons: It's no longer required to put the executable in a .zip etc. archive with the necessary loose files/directories The user cannot break your application by moving the executable but not copying the necessary relative data The user can run your application from any directory without breaking…
This post is also available on Handmade Network . It is common advice that it isn't worth automating something unless the time saved doing the task is greater than the time required to automate it. Randall Munroe has two relevant xkcd comics ( license ): This comic is the most relevant to this article: When I talk about automation, I include things like code generation and macros, which automate…
Demo Here is the showcase video . Code The code is hosted here . Description This is a library which automatically generates color themes based on the user's background image. I made this project as a part of the Wheel Reinvention Jam , using the jam as an excuse to work on a project which feels frivolous, but should come in handy for prettifying future projects. Here's the jam submission post .…
This post is also on Handmade Network . I have been working hard on a file organization application written in Cakelisp. This is part of my career goal to sell my software. The project's name is File Helper (I haven't spent any time trying to come up with a better name yet). I believe I have a good approach to thinking about my projects. It is sometimes hard to define project success in terms…
The following post is mirrored on Handmade Network . I have been making progress on several fronts with Cakelisp and GameLib , but in this post I wanted to focus on an exciting work-in-progress addition I have: type introspection. What it is Type introspection refers to the ability to inspect types at runtime. Reflection is the ability to both inspect and modify types at runtime, which I'm not…
The following post is mirrored on Handmade Network . It has been a while since I last wrote an article. Last month, I left my previous job after six years there. I moved from California to the East Coast to start at a new job, which I have been enjoying so far. The change has been especially good for showing both how much I know and how much I have to learn. I also had several realizations about…
The following post was submitted to Handmade Network and is mirrored here. I have been working through LearnOpenGL lately because my graphics programming knowledge lags behind. Last time I did graphics, it was all fixed-function pipeline. The problem In order to use OpenGL, it is generally recommended to use an OpenGL loading library . These libraries facilitate requesting the gl* function…
The following post was submitted to Handmade Network and is mirrored here. There were several cleanup and features added to Cakelisp since the last post: Precompiled headers Precompiled headers for comptime compilation is now merged to master. I put in a lot of work to get them working on Windows as well, though I didn't see the performance improvements I was hoping for on that platform.…
The following post was submitted to Handmade Network and is mirrored here. I am happy to be a new part of Handmade Network! Progress since submission There have been several things I've been working on since I submitted Cakelisp to the network: Kitty Gridlock completion Kitty Gridlock is a game I made in about 3 weeks (off-hours, weekends primarily) for my girlfriend. I had a deadline to deliver…
I was quite annoyed by the top comment on this thread being "just use printf". This post is a more fleshed-out version of my comment on that thread. Debuggers are drastically better than just using prints for many problems. An hour of research on this now will save you countless hours solving hard problems later. In short, debuggers let you run your program in "human time" rather than ultra-fast…
Update: See feedback on /r/gamedev and /r/gameenginedevs . I originally wrote about this as a reply to this comment (I am /u/makuto9 on reddit). To me, the comment is arguing that learning how games can be built from scratch is useless, because game engines can accomplish so much more in the same amount of time. In this article, I don't necessarily want to argue for writing games from scratch. I'm…
Update: See /r/gamedev and /r/gamedesign commentary on this article. There are some great points I didn't think of while writing this. This is a bit of a rant about a game design mechanic that I realized is terrible: wait-bars/gameplay-stopping timers. These timers require the player to stand in the same place, holding a button down and watching a bar fill until they complete the task. Sounds…
I wanted to write this to share what things tripped me up and what I thought about the experience of porting Cakelisp to Windows. Maybe these notes will help others in porting their projects. What is Cakelisp? See Cakelisp: a programming language for games . Cakelisp is an S-expression syntax language which outputs C/C++ code. It also contains a powerful C/C++ build system and other features.…
Epic Games acquired RAD Game Tools recently, which is another event in the worrying trend of an increasingly centralized game industry. RAD Game Tools may be the most prolific game middleware company. Just watch for the "Bink" logo when starting up games and notice how widespread it is, to get an idea. My goal with this article is to inspire some consideration as to where our industry is going,…
This is going to be a quick post to explain a simple mistake that caused me a couple hours of confusion. The Problem From my recent post , you may know I have been working on a programming language, Cakelisp. I recently added the ability to easily run arbitrary processes in build hooks. This is so that GameLib can build its third party dependencies (SDL and Ogre) during pre-build rather than…
Update: See the Hacker News thread , /r/programming , /r/ProgrammingLanguages , /r/gamedev , and /r/lisp posts for discussions on this article and Cakelisp. I have been working on a new programming language since the end of August 2020. It is hosted on my site . If you want to see a working example first, VocalGame.cake is a simple audio looper with Ogre 3D graphics and SDL for windowing, input,…
The entire setup is available here . I recommend going through this guide if you want to know the significance of each part. I found it difficult to get set up with Ogre 2 in a way I was comfortable with. I think most users still use v1, so 2 is lacking in documentation. This guide is my contribution to improving ramp-up for Ogre 2. Notably, I cover everything from initial project set up to…
What have I been up to? 2020 edition I have been fairly active when it comes to making things in my off-hours. Game projects I worked on Spargus Vehicle Prototype , which is an attempt to get a similar feel of the dune buggies in Jak 3. I plan on having a thorough post about it soon, so I'm just teasing it here. Andy Gavin himself forwarded me to the programmer who made the Jak 3 buggies. I'll…
My work on the AI Director in Magic: Legends An article ( Archive.org backup ) is up now which has a high-level overview of the AI Director in Magic: Legends. I designed and implemented the dynamic enemy placement and spawning system for this AI Director, and worked on other components of it, like the debug utilities pictured in the article. It required a good amount of creativity and bespoke…