https://github.com/zesterer/the-bitwise-challenge
Challenge: Can you develop a game with only 8 bytes of state?
https://github.com/zesterer/the-bitwise-challenge
bits challenge gamedev gamejam
Last synced: 7 months ago
JSON representation
Challenge: Can you develop a game with only 8 bytes of state?
- Host: GitHub
- URL: https://github.com/zesterer/the-bitwise-challenge
- Owner: zesterer
- Created: 2022-05-10T10:30:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-11T15:25:37.000Z (over 3 years ago)
- Last Synced: 2025-01-25T18:31:19.603Z (8 months ago)
- Topics: bits, challenge, gamedev, gamejam
- Homepage:
- Size: 1.95 KB
- Stars: 9
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The Bitwise Gamedev Challenge
## The Concept
There is *one rule*: the core game logic is allowed to persist *no more* than 64 bits (8 bytes) of data between frames.
## Additional Details
In effect, your game should be a pure function with the following inputs:
- the 64 bit integer emitted by the last frame (you may provide a default value for the first frame)
- player inputs (keyboard/mouse/controller/etc.) & other environmental information (time delta since the last frame, etc.)
and the following outputs:
- a 64-bit integer that will be persisted to the next frame
- UI/graphics in some stateless form, such as a framebuffer or sound waveforms
No statics, global values, IO (beyond that which falls within the aforementioned category), side-channel state (such
as inducing lag to use the frame time delta as extra state), or other unprincipled 'tricks' are permitted: it should
be entirely possible to recreate the *entire* state of the game at any given frame given only the 64-bit integer and
the code that composes the game logic.## Suggested Formats
The Bitwise Challenge can be taken both as an individual endeavour, or as a group activity/competition such as a
game jam or hackathon.## Exceptions
An exception is made for [memoization caches](https://en.wikipedia.org/wiki/Memoization), provided the result of
using the cache is indistinguishable from recomputing the cached function on the input every time.You may use such caches for the sake of performance (procedurally generating a game world from a seed on every frame
would, understandably, be prohibitely expensive).An example of such a memoization cache is the [`cached`](https://crates.io/crates/cached) Rust crate.
## Variations
- Increasing or decreasing the number of bits for varying difficulty
## Showcases
- [Snake in 8 bytes](https://github.com/zesterer/bitwise-examples#bitwise-snake) (part of my example games)
## Inspiration
The idea was partially inspired by
[this blog post](https://www.andreinc.net/2022/05/01/4-integers-are-enough-to-write-a-snake-game) by @nomemory.