Environment setup
Typically, homebrew retro-gamedev development with C/C++ is a bit messy to setup and build. Even though Go has very easy way of handling things, we're still building actual Nintendo 64 games here. But donβt worry β weβve automated everything. There are no Makefiles, no cmake and no crying. Also, whether you're on Windows, macOS, or Linux, the setup is exactly the same.
All you need is actually to install some modern version of Go and Mage, and you'll be ready to build games that run on real N64 hardware.
π§° What you'll need
Before you dive in, youβll only need two things installed:
-
β Go (any modern version will do) β Install Go
-
β Mage β a task runner we use for setup automation:
go install github.com/magefile/mage@latest
π§ββοΈ One command to rule them all
Once you have Go and Mage installed, run this magic spell:
git clone https://github.com/drpaneas/gosprite64
cd gosprite64
mage Setup
Sit back. Grab a coffee. Our Mage is taking over. β
Heβll:
- π Fetch a custom version of Go built for
MIPS
(what the N64 uses) - π§ Build it locally
- π¦ Install emgo, the embedded Go tool
- π Set up a clean environment in
~/toolchains/nintendo64
for Mac/Linux or%USERPROFILE%\toolchains\nintendo64
on Windows. - β Configure direnv to manage your previously built Go environment automatically
No clutter in .bashrc
, .zshrc
, or .profile
. It just works.
π Where things live
After setup, your new Go environment will be isolated in:
GOROOT
β~/toolchains/nintendo64/go
GOPATH
β~/toolchains/nintendo64/gopath
From now on, all your N64 projects should live inside ~/toolchains/nintendo64
(or open a shell inside it). Thanks to direnv, your terminal will automatically switch to the embedded Go version whenever you cd
into this folder. Leave the folder? You're back to your normal Go setup.
No switching. No weird aliases. No surprises.
π§ Platform-specific guidance
If you really want to peek behind the curtain or you're running into edge cases, we have detailed setup pages for:
But honestly? Just run mage Setup
. It works.