Brainf**k Game Engine


                

Memory

Only first 2048 cells are shown.

Brainf**k Tutorial

Brainf**k is a programming language with only 8 commands:

  • > Move pointer right
  • < Move pointer left
  • + Increment memory at pointer
  • - Decrement memory at pointer
  • . Output character at pointer
  • , Input character to pointer (from Input)
  • [ Jump forward past matching ] if memory at pointer is 0
  • ] Jump back to matching [ if memory at pointer is not 0

How to Use This UI

  • Write Brainf**k code in the Code tab.
  • Click Run to execute, Stop to halt, Reset to clear memory/output/screen.
  • Use the Input field for , commands
  • View memory in the Memory tab.
  • Game Mode: When enabled, the first 256 memory cells are visualized as a 16x16 pixel screen (see below). The . command updates the screen, instead of printing a character to the output.
  • When Game Mode is off, . prints to the output.
  • When Color Screen is enabled, the screen is colored (see below), else the screen is grayscale (0 - 255).

Colors Legend

Each value (0-255) is mapped to a unique color: 16 hues × 16 brightnesses.
Hue = value % 16, Brightness = value / 16. Used for Color Screen mode.

Brainf**k Examples

Hello World

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

Prints "Hello World!" to the output.