{"id":16915951,"url":"https://github.com/zesterer/the-bitwise-challenge","last_synced_at":"2026-01-04T10:32:54.579Z","repository":{"id":66134657,"uuid":"490649109","full_name":"zesterer/the-bitwise-challenge","owner":"zesterer","description":"Challenge: Can you develop a game with only 8 bytes of state?","archived":false,"fork":false,"pushed_at":"2022-05-11T15:25:37.000Z","size":2,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-01-25T18:31:19.603Z","etag":null,"topics":["bits","challenge","gamedev","gamejam"],"latest_commit_sha":null,"homepage":"","language":null,"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/zesterer.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}},"created_at":"2022-05-10T10:30:55.000Z","updated_at":"2022-06-06T16:19:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"abe1d602-2027-4d0a-9795-dc4000be0065","html_url":"https://github.com/zesterer/the-bitwise-challenge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesterer%2Fthe-bitwise-challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesterer%2Fthe-bitwise-challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesterer%2Fthe-bitwise-challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesterer%2Fthe-bitwise-challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zesterer","download_url":"https://codeload.github.com/zesterer/the-bitwise-challenge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244688683,"owners_count":20493857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bits","challenge","gamedev","gamejam"],"created_at":"2024-10-13T19:23:53.266Z","updated_at":"2026-01-04T10:32:54.573Z","avatar_url":"https://github.com/zesterer.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Bitwise Gamedev Challenge\n\n## The Concept\n\nThere is *one rule*: the core game logic is allowed to persist *no more* than 64 bits (8 bytes) of data between\nframes/ticks.\n\n## Additional Details\n\nIn effect, your game should be a pure function with the following inputs:\n\n- the 64 bit integer emitted by the last frame (you may provide a default value for the first frame)\n\n- player inputs (keyboard/mouse/controller/etc.) \u0026 other environmental information (time delta since the last frame, etc.)\n\n- Random number generation, provided the state of the RNG is not relied upon for gameplay (i.e: it should be possible to\n  reseed the RNG from true random sources every frame without changing the nature of the gameplay)\n\nand the following outputs:\n\n- a 64-bit integer that will be persisted to the next frame\n\n- UI/graphics/other outputs in some stateless form, such as a framebuffer or sound waveforms\n\nNo statics, global values, IO (beyond that which falls within the aforementioned categories), side-channel state (such\nas inducing lag to use the frame time delta as extra state), or other unprincipled 'tricks' are permitted: it should\nbe possible to recreate the *entire* state of the game at any given frame given only the 64-bit integer and the code\nthat composes the game logic.\n\n## Why 64 bits?\n\nBased on personal experimentation, I've found 64 bits to be the perfect middle-ground that keeps the challenge engaging and\nforces creativity, while also not forbidding a lot of different potential game genres.\n\n## Ambiguities\n\nSome games do not have a strict definition of 'frames' or 'ticks'.\n\nFor example, a text adventure game might accept many characters of input, but only act on them once the 'return' key\nis pressed. Does this mean that the game has to store the partially-complete string within its 64-bit state? There is\nno right answer.\n\nMy suggestion would be to decide beforehand where your dividing line is between the 'input system' and the 'core game',\nand then respect the rules of the challenge within that core. For example, you might decide that an entire command to\nthe text adventure game counts as a single atomic input, and hence need not count toward the stored state of the game.\n\n## Suggested Formats\n\nThe Bitwise Challenge can be taken both as an individual endeavour, or as a group activity/competition such as a\ngame jam or hackathon.\n\n## Pure caches\n\nAn exception is made for [memoization caches](https://en.wikipedia.org/wiki/Memoization), provided the result of\nusing the cache is indistinguishable from recomputing the cached function on the input every time (you can't, for\nexample, rely on whether a value was present in the cache for some behaviour of the game logic).\n\nYou may use such caches for the sake of performance. For example, procedurally generating a game world from a seed on\nevery frame would, understandably, be prohibitely expensive.\n\nAn example of such a memoization cache is the [`cached`](https://crates.io/crates/cached) Rust crate.\n\n## Variations\n\n- Increasing or decreasing the number of bits for varying difficulty\n\n## Showcases\n\n- `@izabera`: ['2048' in 64 bits](https://github.com/izabera/bitwise-challenge-2048)\n- `@toombs-caeman`: [Wordle in 64 bits](https://github.com/toombs-caeman/wordle)\n- `@toombs-caeman`: [Conway's Game of Life in 64 bits](https://github.com/toombs-caeman/gol64/)\n- `@zesterer`: [Snake in 8 bytes](https://github.com/zesterer/bitwise-examples#bitwise-snake) (part of my example games)\n- `@Garklein`: [Connect 4 in 64 bits](https://github.com/Garklein/connect-6-4)\n- `@maksverver`: [Typer 64, a typing game in 64 bits](https://maksverver.github.io/typer-64/)\n- `@toombs-caeman`: [Maze64, a maze solving game in 64 bits](https://github.com/toombs-caeman/maze64)\n- `@sam-mccall`: [Shlurdle: A sliding windows word game similar to Absurdle](https://github.com/sam-mccall/sam-mccall.github.io/tree/main/shlurdle)\n\n*If you want your entry added to the list, open an issue!*\n\n## Inspiration\n\nThe idea was partially inspired by\n[this blog post](https://www.andreinc.net/2022/05/01/4-integers-are-enough-to-write-a-snake-game) by @nomemory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzesterer%2Fthe-bitwise-challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzesterer%2Fthe-bitwise-challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzesterer%2Fthe-bitwise-challenge/lists"}