Ecto has spent their afterlife toying with numbers and showing their findings to the spirit world. The spirit world only knows two numerals, though, so they have to translate the human-readable numbers into a form it can understand.

The goal of each puzzle is to translate the requested decimal number into a binary number in the minimum amount of moves, using the four buttons—increment (add 1), decrement (subtract 1), left shift (multiply by 2), and right shift (divide by 2, rounded down). You might want to bring a calculator.

Controls:

  • D-Pad (WASD/arrow keys) — move
  • A (Period/X) — press button (hold for auto press)
  • B (Comma/Z) — reset puzzle; skip to next puzzle after clear
  • Start (Enter) — toggle music
  • Select (Space) — toggle sound effects

Assist Mode perks:

  • Unlimited moves
  • Decimal translation of the current number shown

Made with GBDK 2020, GBTD, GBMB, and hUGETracker. binjgb is the web emulator.

Special thanks to alicegaming, bbbbbr, and ethantrithon for playtesting, and to the best way to count for inspiring this game.

Download

Download NowName your own price

Click download now to get access to the following files:

bit_bang.gb 32 kB

Development log

Comments

Log in with itch.io to leave a comment.

(+1)

passed all levels : ) love the music and SFX

(+1)

The later levels are too hard so I write this program to calculate them   XD


use std::{collections::VecDeque, io};

fn main() {

    let target = {

        let mut line = String::new();

        io::stdin().read_line(&mut line).unwrap();

        line.trim().parse::<u8>().unwrap()

    };

    let mut q: VecDeque<(u8, Vec<char>)> = VecDeque::new();

    q.push_back((0, vec![]));

    while !q.is_empty() {

        let (cur, mut cur_ops) = q.pop_front().unwrap();

        if cur == target {

            println!("{:?}", cur_ops);

            break;

        }

        cur_ops.push('+');

        q.push_back((cur.wrapping_add(1), cur_ops.clone()));

        cur_ops.pop();

        cur_ops.push('-');

        q.push_back((cur.wrapping_sub(1), cur_ops.clone()));

        cur_ops.pop();

        cur_ops.push('<');

        q.push_back((cur.wrapping_shl(1), cur_ops.clone()));

        cur_ops.pop();

        cur_ops.push('>');

        q.push_back((cur.wrapping_shr(1), cur_ops.clone()));

        cur_ops.pop();

    }

}