Skip to content

Branefuck (OLD)

Skirlez edited this page Jun 26, 2025 · 1 revision

Warning

This page is for Branefuck since before version 0.99. For the modern page, see https://github.com/Skirlez/void-stranger-endless-void/wiki/Branefuck

Branefuck

Branefuck is a modified version of the esoteric programming language Brainfuck. In Endless Void, Add statues can run Branefuck programs to, at the moment, determine when to destroy themselves. In the future they might be able to do other stuff before destroying themselves, like moving.

Usage

Each Add statue runs its Branefuck program runs every frame, with given inputs and a destroy value. Once the program returns a value that matches the user's set destroy value, the Add statue gets destroyed. See more on returning in the next section.

Differences from Brainfuck

  • You have exactly 23 cells
  • Each cell holds a signed 64 bit integer
  • The , input command has been removed, and instead inputs are given through the Add statue's UI
  • The . output command terminates the program immediately and returns the value in the current cell.
  • You can write a number after commands where it makes sense to, to run them that amount of times. For example, +5 is the same as +++++.
  • New command: ?. This command gets the sign of the current cell's number (1 if positive, 0 if 0, -1 if negative), and puts that value in the cell instead.

Input variables

The input and destroy value fields also accept any global variable the game holds. You need to use a tool like UndertaleModTool to find vanilla ones, opening the game up to search for them. Endless Void introduces some new global variables that could be useful for this feature, which I will list here:

leech_count
maggot_count
beaver_count
smile_count
eye_count
mimic_count
octahedron_count
spider_count
orb_count
scaredeer_count

player_x 
player_y 

add_current_x
add_current_y

death_x
death_y
death_count (number of times this player has died since they started playing this level)
death_frames (number of frames since death animation started, or -1 if player is still alive)
annoyance_count (number of times player has died in the exact same coordinates)

editor_time (increases by 1 every frame from when you boot the game)

turn_frames (number of frames since last turn, you early return if it's not 0 to only execute on turns)

add_count
mon_count
tan_count
lev_count
eus_count
bee_count
gor_count
cif_count
jukebox_count
egg_count

Additionally, here are some very funny global variables you can use as input, from Endless Void and from vanilla.

s_g_pal (palette index)
mouse_right_held
stranger (current player character)

NOTE: values suffixed with _x are between 0 and 13, values suffixed with _y are between 0 and 8.

Examples of Usage

With destroy value set to 1, the first input set to leech_count and the second input set to any number, this Branefuck program:

[->-<]>?.

will cause the Add statue to explode if there are less than (second input) leeches.

The program decrements both cells until the first cell reaches 0 ([->-<]). Once it's done, it moves to the second cell, runs the sign operation on it, and returns that sign. (>?.). If the second cell was smaller than or equal to the first cell, the sign of the second cell will be either -1 or 0, and the statue won't be destroyed. Only if the second cell was initially bigger than the first cell, the sign will be 1, and the statue will be destroyed.

Notes

  • If the program reaches the end without a ., it will still return the current cell. So you technically don't need it if it's at the end.
  • If the program reaches a character it doesn't know what to do with, like a [ followed by a number like 3, it will just skip the character.
  • If the program runs for too long (100,000 commands executed), the Add statue will be destroyed.
  • If the program reaches a loop command ([ or ]) that does not have a counterpart, the Add statue will be destroyed.

Clone this wiki locally