{"id":20332476,"url":"https://github.com/permutationlock/dumbcycle","last_synced_at":"2026-02-06T12:20:57.330Z","repository":{"id":236580610,"uuid":"792898820","full_name":"permutationlock/DumbCycle","owner":"permutationlock","description":"A step-by-step example showing how to make a Linux game from scratch with x86_64 assembly and C99 without libc.","archived":false,"fork":false,"pushed_at":"2026-01-24T03:38:04.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-24T14:40:31.287Z","etag":null,"topics":["assembly","c","direct-rendering-manager","framebuffer","linux","x86-64"],"latest_commit_sha":null,"homepage":"https://musing.permutationlock.com/posts/blog-dumb-cycle.html","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/permutationlock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-27T21:35:13.000Z","updated_at":"2026-01-24T03:38:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"84068680-f4e5-4299-9818-590e560d8452","html_url":"https://github.com/permutationlock/DumbCycle","commit_stats":null,"previous_names":["permutationlock/dumbcycle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/permutationlock/DumbCycle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permutationlock%2FDumbCycle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permutationlock%2FDumbCycle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permutationlock%2FDumbCycle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permutationlock%2FDumbCycle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/permutationlock","download_url":"https://codeload.github.com/permutationlock/DumbCycle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permutationlock%2FDumbCycle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29160810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T07:18:23.844Z","status":"ssl_error","status_checked_at":"2026-02-06T07:13:32.659Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembly","c","direct-rendering-manager","framebuffer","linux","x86-64"],"created_at":"2024-11-14T20:26:50.088Z","updated_at":"2026-02-06T12:20:57.318Z","avatar_url":"https://github.com/permutationlock.png","language":"C","readme":"# DumbCycle\n\nA (hopefully) instructional example of how to make a game\nusing the dumb frame buffer interface of the Linux Direct Rendering Manager.\nThe entire game is ~1000 lines of\nC99 code with a small `x86_64` assembly runtime. No libraries or preprocessor\ndirectives were allowed, even libc.\n\nI [wrote an article][13] going through the development step-by-step.\n\n## Requirements\n\nIn order to build the game on an `x86_64` Linux machine you will need a C\ncompiler that supports the C99 standard along with [make][7] and [binutils][8]\nfor the `as` assembler and `ld` linker.\n\nTo run the game you will need a working\n`/dev/dri/card0` device and a working keyboard device in `/dev/input/`,\nand the game must have permission to access these files.\nThe game will take over an entire display as well as the system\nkeyboard, so it will be necessary for you to turn off your window\nmanager/compositor if you usually run one.\n\n```\nmake\nsudo ./dumb_cycle\n```\n\n![DumbCycle](https://musing.permutationlock.com/dumb_cycle/dumb_cycle.gif)\n\nYou can also run the game in a virtual machine if you install [QEMU][9] and\n[tiger vnc][10].\n\n```\nmake test\n```\n\nThe command will download a [`vm.tar.gz`][11] zip file\ncontaining a Linux kernel and a basic initial ram filesystem using\n[toybox][6] for a simple shell environment. If you want to build the kernel\nand toybox yourself a corresponding [`vm_src.tar.gz`][12] is provided.\n\n## References\n\n - [drm-howto][4]\n - [barebones linux][5]\n - [toybox][6]\n - [musl libc][1]\n - [libdrm][2]\n - [linux source][3]\n\n[^1]: I have since added a few commits and modified the article slightly, but in\n      general you should still be able to follow the article sections while stepping\n      through the commit history.\n\n[1]: https://musl.libc.org/\n[2]: https://gitlab.freedesktop.org/mesa/drm\n[3]: https://github.com/torvalds/linux\n[4]: https://github.com/dvdhrm/docs/tree/master/drm-howto\n[5]: https://suchprogramming.com/barebones-linux-system/\n[6]: https://github.com/landley/toybox\n[7]: https://www.gnu.org/software/make/\n[8]: https://www.gnu.org/software/binutils/\n[9]: https://www.qemu.org/\n[10]: https://tigervnc.org/\n[11]: https://musing.permutationlock.com/dumb_cycle/vm.tar.gz\n[12]: https://musing.permutationlock.com/dumb_cycle/vm_src.tar.gz\n[13]: https://musing.permutationlock.com/dumb_cycle/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermutationlock%2Fdumbcycle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpermutationlock%2Fdumbcycle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermutationlock%2Fdumbcycle/lists"}