Inspiration

We wanted to play Minecraft.

But Minecraft is $29.99, way too expensive for our budget.

So we made our own.

We didn't have any hardware to run Minecraft on.

So we made our own.

What is KennyCraft?

KennyCraft is a voxel game running entirely on a single FPGA, built by Team LGTM (three people) in 24 hours. We built every layer:

  • TPU (Tai Processing Unit): an 8-lane SIMD processor, named after our hardware developer, that both renders frames and runs the game logic.
  • The renderer: a custom graphics library built on the TPU's hardware ray tracer.
  • The KennyCraft game: a 3D voxel game with block building and breaking, mobs and a Nether, plus a villager economy run by Nemotron agents and paid in KennyCoin, which you buy with dollars and which settles on Solana.
Result
Pipelined core at 100 MHz (cycle-accurate simulation) 405 fps at 160×120, 106 fps at 320×240
On the board (Arty A7-100T) 59.4 new frames/s while turning: the 60 Hz display is the limit
Timing at 100 MHz Met on every clock (WNS +0.100 ns); 27,340 LUTs, 111.5 BRAM36, 48 DSPs
Correctness Every optimization checked pixel-identical against a reference renderer

Press F during the demo to see the frame rate, measured live by the chip's own cycle counter.

Tracks Entered

  • NVIDIA Track (1st Place)
  • Capital One Track
  • Hardware Track
  • MLH Best Use of Solana

How we built it

TPU

A system-on-chip on an Arty A7-100T FPGA. Our hardware developer's earlier RV32I core was the starting point; everything SIMD, ray tracing, pipelining and memory was built at HackUTD.

  • Each instruction drives all 8 lanes. Lane 0 runs the game logic, then all 8 lanes run the render kernel together.
  • Branching uses lane masking and a divergence stack, so lanes can take different paths.
  • A VTRACE ray unit walks rays through the voxel grid in hardware: 2 cycles per step, running asynchronously so the core can set up the next ray while one is in flight.
  • A QRCP reciprocal unit gives each lane fast, bit-exact 1/x, since the chip has no divider.
  • The eight 1 KB lane stacks sit in eight memory banks, so a register spill across all 8 lanes takes one cycle.
  • Triple-buffered VGA (no waiting on vblank), 256 MB of DDR3 for world chunks, and a UART link to a laptop.
  • We reached 100 MHz with a pipelined core and a 64-entry branch target buffer, and met timing on every clock.

The Engine

The renderer casts one ray per pixel, walking it through voxels until it hits a block or a mob. Blocks are vertex-colored, with shadow tinting and dithered fog that fades into the horizon.

The world is 4,096 × 4,096 × 32 blocks (256 × 256 chunks), generated from a seed so the same seed gives the same world. Chunks stream from DDR3 into a 64 × 64 × 32 on-chip window, and edits are written back to DDR3. Obsidian portals lead to the Nether.

We fought for every byte: no malloc, 1/x and sine computed instead of stored in tables, and pixels under the hotbar never traced. Game data fills 32,728 of 32,768 bytes of data memory (40 bytes spare), and code fills 32,180 bytes of the 32 KB instruction memory.

The same C code compiles for our laptops and, with our RISC-V toolchain, for the chip. We tested the game on laptops, then validated it in a fast Verilator simulation loop with golden-image checks before every board build.

The KennyCraft Game

Mob Logic

Simple mobs follow rules, so chickens flee and zombies chase the player, which keeps the logic cheap. Nearby villagers think with NVIDIA Nemotron Nano running locally, falling back to rules if it times out. The banker, trader and builder use tool-calling agents on Nemotron 3 Ultra (hosted) by default, or Nemotron 3 Super self-hosted on a Brev H200. The laptop sends their actions to the FPGA over UART.

We also modeled sheep, cows, dogs, horses and frogs, but only chickens, zombies and villagers fit in memory.

Villager Behavior

Villagers have three roles: Banker, Trader and Contractor.

The player can check their ledger or Solana balance, or exchange dollars with the Banker for KennyCoin (KCN). KCN can then be spent with a Contractor to construct buildings, or with a Trader to get items.

Economy

Your dollars live in a Capital One Nessie checking account. The Banker turns them into KennyCoin, a token on Solana devnet. Balances update in game instantly from a local ledger, and every entry then settles on Solana in order. Contract payments go into escrow when you accept a quote and are released only after the build passes inspection. A local dashboard shows wallets, a KCN balance chart and a link to every on-chain transaction.

The game talks to the laptop over CR6, a custom UART protocol with framing, CRC-8 checksums and flow control.

Optimizations

In total: 68 million cycles per frame down to 247 thousand (276× fewer cycles), and with the clock doubled to 100 MHz, 0.73 fps to 405 fps at 160×120. Every step was checked pixel-identical against a reference renderer.

Parallelization

  • Each of the 8 lanes renders its own 4×2 pixel block, so one instruction stream draws 8 blocks at once.
  • The ray kernel selects with bit operations instead of branching, so all 8 lanes stay in lockstep without divergence.

Hardware

  • The VTRACE ray unit steps a ray through the voxel grid in 2 cycles per step, computing the next step speculatively so the step logic never waits on the registers.
  • Every ray needs division, so a hardware reciprocal unit replaces software division: 2.9× the frame throughput.
  • The eight lane stacks are banked, so a register spill across all 8 lanes takes one cycle.

Latency hiding

  • VTRACE runs asynchronously: while the hardware walks one ray, the core builds the next block's ray, then reads the result.
  • Triple buffering: the core never waits on vblank, and the display never tears.

Clock speed

  • We broke up the critical path several times, deepening the pipeline until the design met timing at 100 MHz.
  • A 64-entry branch target buffer cuts the flush cost of the renderer's loops.

Memory

  • Lanes writing the same memory word are coalesced into one access, saving bandwidth.
  • Colors, face shading and fog live in a palette lookup table instead of being computed per pixel.
  • Chunks stream from slower DDR3 into on-chip memory when needed and are written back when not.
  • Pixels under the hotbar are never traced.

Challenges we ran into

  • Memory: the FPGA has 256 MB of DDR3, and the game gets 32 KB of data memory and 32 KB of code memory on chip. Modern Minecraft expects gigabytes.
  • Clock speed: modern PCs run at several GHz. Our design runs at 100 MHz, and getting there took a deeper pipeline, a branch predictor and a night of timing fixes.
  • No rendering pipeline to start from: our first renderer drew pixel by pixel at under 1 fps.

Accomplishments that we're proud of

  • Taking rendering from 0.73 fps at 160×120 to 405 fps at 160×120 and 106 fps at 320×240 (cycle-accurate simulation at 100 MHz) through hardware–software co-design, with every frame pixel-identical to the reference.
  • Meeting timing at 100 MHz on a pipelined SIMD core we built during the hackathon.
  • Fitting a voxel engine and game into 32 KB of data memory, with 40 bytes to spare.
  • AI agents trading in an economy, on a chip we built, in a game we designed, using real (devnet) currency.
  • We got Bad Apple and Doom running on the chip natively as well with a few tweaks to the chip. Check out the Releases section if you want to try it on your own.

What's next for KennyCraft

  • Split the TPU into a CPU and a GPU so game logic and rendering run in parallel, allowing richer rendering and game logic.
  • Use more of the ray unit for realistic fog and block shadows.
  • Keep world edits across resets, give players a reason to run from zombies, and make the game Turing complete with a redstone-like feature.

Built With

SystemVerilog, Vivado, Verilator, C, Clang (RISC-V), Python, NVIDIA Nemotron (Nano, Super, Ultra), NVIDIA Brev, vLLM, llama.cpp, Capital One Nessie API, Solana (devnet SPL token), SQLite.

Built With

  • arty-a7-100t-fpga
  • assembly
  • c
  • graphics
  • python
  • rendering
  • systemverilog
  • tcl
+ 14 more
Share this project:

Updates

Submission history