Nick Matthijssen's Open Source FPGA Craft Puts a Minecraft Clone on Your Lattice iCE40 FPGA

Muon developer puts a fully-functional voxel game on the FPGA at the heart of the low-cost open-hardware iCEBreaker board.

Gareth Halfacree
3 years agoFPGAs / Gaming

Developer Nick Matthijssen, best known for his work on the Muon low-level programming language, has released the source code for a Minecraft clone with a difference: It's designed to run on an field-programmable gate array (FPGA).

"Last week I spent some time thinking about copyright implications of open sourcing the FPGA Minecraft clone," Matthijssen writes of his work. "To avoid any issues, the open source version will be a 'light version' of the project. It won't include Minecraft specific biomes/structures, so it's more of a general FPGA voxel game (that happens to be compatible with Minecraft's textures)."

"This won't really affect the hardware design and firmware/game logic, and there will be a 'general' terrain generator. So there should still be enough interesting stuff to check out."

True to his word, that "light version" is now available — putting a Minecraft-like game, dubbed FPGA craft, onto the Lattice Semiconductor iCE40 UP5K FPGA.

The project features a 256x128 3D rendering resolution running at 30 frames per second in 12-bit colour, takes a Nintendo 64 controller as input, and allows the user to place and mine blocks within a 512x512x32-block wrapping overworld. An offline terrain generator with support for multiple biomes allows new worlds to be generated and uploaded to flash memory, while changes made during play are saved back again.

FPGA craft is extensively custom: A wholly custom ray-tracing GPU and 16-bit CPU with its own custom instruction set, running at 32.625MHz, make up the hardware, and somehow manage to run the game in just 15kB of block RAM (BRAM), 128kB of single-port synchronous RAM (SPRAM), and 16MB of flash storage.

"Use this project at your own risk," Matthijssen warns of those interested in trying it out. "This project has had no real testing, and unlike typical software, it may have bugs that damage your hardware (board, N64 controller, etc.). Only use it if you're familiar with FPGA/HW dev and you understand the risks."

If that warning hasn't put you off, you'll need an iCEBreaker open source FPGA development board with VGA PMOD add-on, a compatible VGA display device, a Nintendo N64 controller, and textures pulled from Minecraft or a compatible texture pack.

The source code and full instructions are available on Matthijssen's GitHub repository under the permissive Apache 2.0 license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles