HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
fogleman
Craft
C2013–2025
fogleman / Craft

Craft

A simple Minecraft clone written in C using modern OpenGL (shaders).

13Distinct people
19Mentions
1Explicit recommenders
11.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A simple Minecraft clone written in C using modern OpenGL (shaders).

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

https://github.com/zx2c4 I love Michael Fogleman for graphics: https://github.com/fogleman/Craft

narak used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year19 dated mentions

Observed mentions: 2013-12-10 02:18:55 UTC to 2025-02-05 11:12:31 UTC.

012342013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC211
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC202
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC202
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC413
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC312
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC110
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC110

What Hacker News says

19 sources
This is really cool, glad to see someone tackling this problem. I have added several of my abandoned projects, here is a quick summary of them if there is any interest: https://github.com/satoshinm/WebSandboxMC: Bukkit plugin providing a web-based interface with an interactive WebGL 3D preview or glimpse of your server - this bundles the NetCraft frontend in a Minecraft server plugin. There are requests from Spigot users https://github.com/satoshinm/WebSandboxMC/issues/100 to make it active again, which is what inspired me to add it to Code Shelter. https://github.com/satoshinm/NetCraft: Web-based fork of https://github.com/fogleman/Craft . Craft has been featured on Hacker News before, but it is pretty much abandoned, so I forked it into NetCraft, but then in turn ran out of time/interest to update it. The summary still applies: "Voxel
Read the rest
game for modern web browsers (Chrome, Firefox, Safari) and desktop operating systems (Windows, macOS, Linux). Just a few thousand lines of C using modern OpenGL (shaders)." Heavily inspired by Minecraft, but much smaller and simpler. https://github.com/satoshinm/pill_serial: Triple USB-to-serial adapter firmware for flashing onto an STM32F103C8T6 "blue pill" minimum development board . With this firmware you can make your own USB-to-serial adapter, times three, by flashing a <$2 blue pill board. https://github.com/satoshinm/pill_duck: Scriptable USB HID device for STM32F103 blue pill (inspired by USB Rubber Ducky) . Another project for the "blue pill", this one lets you make an automated USB keyboard/mouse device, an imitation of the popular Rubber Ducky hacker tool, but a lot cheaper. https://github.com/satoshinm/pill_6502: emulated 8-bit 6502 CPU and 6850 ACIA for STM32F103 blue pill . Want to build a retrocomputer but an authentic 65C02 chip is too much? Play around with a classic processor without buying old hardware? Emulate it with the cheap blue pill, with enough support at least to run the Microsoft OSI BASIC ROM. I have started a few more abandoned projects on https://github.com/satoshinm?tab=repositories&type=source but these seem to have generated the most interest (especially the NetCraft/WebSandboxMC combination, but the pill_ projects can be quite handy), no longer can maintain them myself but would be great to see continued maintenance provided a community finds them valuable.
In Code Shelter: A Maintainer Community for Abandoned FOSS Projects
Hey HN, I've been inspired by Michael Fogelman's Craft [1] and other links around here over the years to learn more about 3d graphics programming. comanche has been my path to learning. It can currently render 30 different maps - 29 of them were reverse engineered by Sebastian Macke [2] from the game Comanche (1992). There's no actual relation to the game, I just remember playing it as a kid and the file format is convenient (two pngs, one representing height, the other color). There is a lone map by me. The goal is to build an actual game, but the focus will always be to have very readable source so that others can learn from it. I've written a blog post further describing the goals behind it as well as discussing the basics of graphics programming and the advantage of using WebGL [3]. There are plenty of links to resources for further l
Read the rest
earning and the post also includes links to 8 other projects in various languages (lisp, Go, Rust, C++, and Nim) in various states of completion. Happy to accept questions, contributions, or (gulp) critiques. There's not a lot of optimization going on (some basic culling), but it should run fine on a modern GPU (though it did not run on my mobile phone). Some of the maps are smaller, should that help. It's not super impressive, but hopefully you find it interesting. Thanks! 1. https://github.com/fogleman/Craft 2. https://github.com/s-macke/VoxelSpace 3. http://lebo.io/2018/04/03/a-webgl-renderer.html source: https://github.com/aaron-lebo/comanche
In Show HN: An open source WebGL renderer in 300 lines of JavaScript with 30 maps
Hey thanks for finding my project! I haven't posted about it much, so its cool to see it being noticed. For those curious, https://github.com/satoshinm/NetCraft is my first project with WebAssembly/emscripten. It was surprisingly easy to port from Michael Fogleman's Craft (https://github.com/fogleman/Craft/). I briefly tried porting a few other open source block-style engines without success, but Craft being written in plain C with only a few libraries is relatively straightforward. The initial requirement is to refactor the main loop, from while(1) to emscripten_set_main_loop, a common step for most all emscripten ports. Then update the cmake build file to build with the Emscripten.cmake module, and you're almost done. Emscripten's GLFW3 wrapper covers nearly all of Craft's usage. I posted a fairly minimal pull request showing the basic
Read the rest
changes needed: https://github.com/fogleman/Craft/pull/175 After that, the other major change is networking. Craft used a separate thread to listen for network data using blocking sockets and parse message boundaries. But on the web platform with WebSockets, networking is even easier, I use emscripten_set_socket_message_callback() to get called when a new, complete message arrives. Easy as pie. The harder part is the remaining long tail of minor bugs. At this point, the web port of Craft was functional, but difficult to play, a death by a thousand cuts. Emscripten's GLFW implementation had a few bugs related to cursor focus and keyboard handling, but I developed test cases and submitted fixes (https://github.com/satoshinm/emglfwbugs), which were all merged into emscripten's incoming branch. Until they were merged I built against a patched emscripten. If anyone wants to get their hands dirty with emscripten, I highly recommend it. You can write the game in C, but the APIs are bridged to JavaScript, and it was fun to extend it and add new API for HTML5 platform features. I implemented the glfw joystick API (https://github.com/kripken/emscripten/pull/5175) on top of the HTML5 Gamepad API, and drop callbacks on top of the HTML5 File Drop API (https://github.com/kripken/emscripten/pull/5206), and started but have yet to finish the glfw monitor API on top of the HTML5 Screen API (which reminds me I ought to finish https://github.com/kripken/emscripten/pull/5205...). This means existing games written using GLFW (a popular multi-platform library for OpenGL, see http://www.glfw.org) with these features should port to the web using emscripten automatically. After the web port, I continued to enhance https://github.com/satoshinm/NetCraft merging open pull requests from https://github.com/fogleman/Craft and developing new features and fixes. Blocks no longer break instantly, but instead are mined by holding down the mouse button, drawing a growing block break indicator until it breaks, and so on. Up until last month, recently taking a break (to investigate a few other, semi-related projects). However, it is still very playable in the current state. A live demo can be found at https://satoshinm.github.io/NetCraft/, but the more interesting possibility in my opinion is multiplayer. Craft's original Python server backend can be connected to over the web (/server servername), using a websocket proxy, but I also wrote a Bukkit plugin to bridge a small chunk of the Minecraft world: https://github.com/satoshinm/WebSandboxMC. Last month I ran a server on a VPS (for 1 month), backed by a variant of the open source Glowstone server (https://github.com/GlowstoneMC/Glowstone), with this custom plugin and it peaked at a couple dozen users, running decently smooth. I also experimented with hosting on Heroku, it is less stable and deletes when the dyno shuts down, but works (for a smaller number of users): http://netcraft.herokuapp.com I don't know if Craft is the answer, but I definitely agree, a web-based block style game is extremely appealing. The next major missing piece I see is extensibility, allowing outside developers to conveniently and cleanly create and distribute new content. Minetest is way further in this regard, I have not looked into it, but at least the filesystem and networking should be feasible to port to emscripten (emscripten has its own virtual filesystems), and shared memory may benefit from the upcoming SharedArrayBuffer technology: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
In Show HN: Teachcraft – Learn Python through Minecraft
> It seems there is this effort to get C/C++ code performing fast inside of a browser... then at the same time there seems to be an effort to get people to stop coding in C/C++ altogether and switch to something more memory safe. WebAssembly offers a compelling "alternative": instead of (or in addition to, if you desire) writing in memory-safe languages, with all the cost that incurs, you can write in unsafe languages and the consequence of memory errors is limited by the sandbox. This approaches the problem from a different direction, on one side we have e.g. Go and Rust. Go with garbage collection and its overhead, or Rust with zero-(runtime)-cost abstractions which push the burden onto the programmer at development time. C compiled to WebAssembly is low-overhead but safer than native code, giving the benefits of both worlds. I would ha
Read the rest
ve never expected it, but now believe C is the language of the future for the web. Built on decades of history with an unbeatably large existing codebase, extensive analysis and tooling support, standardization, raw power without the shackles of safety, yet confined to limit damage by the browser sandbox. True cross-platform compatibility with powerful HTML5 web APIs. My experience about a month so far developing a C application compiled to WebAssembly/asm.js using emscripten has been surprisingly smooth. I can compile and test natively, including enabling the clang static analyzer or -fsanitize=address and -fsanitize=undefined to find bugs endemic to C, fix them and then deploy and run on the web. For the most part I can code directly to OpenGL and GLFW, which emscripten bridges to WebGL and other browser APIs seamlessly. I had to contribute a handful of fixes to emscripten, as well as an implementation of glfwJoystick to the HTML5 Gamepad API (also working on file drop and monitor API), but this was straightforward and easier than expected, emscripten happily accepted the patches. There are Rust (https://github.com/thinkofname/steven) and Go (https://github.com/thinkofname/steven-go) applications in this problem space but porting a similar application written in plain C (https://github.com/fogleman/Craft) to emscripten was nearly trivial (if there is any interest: https://github.com/satoshinm/NetCraft). After about a week I was able to consider the web-based port finished, and then focus on developing new features, for both web and native. Is C compiled to WebAssembly a panacea? Not by a long shot, there are many (perhaps most) scenarios where memory-safe languages such as Rust would be preferred. But for games and other programs where performance is more critical over correctness and safety, WASM is a godsend.
In WebAssembly: Mozilla Won

Showing the 15 most recent of 19 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.