Skip to content

Instantly share code, notes, and snippets.

@raspberrypisig
raspberrypisig / readme.txt
Created October 12, 2026 21:37 — forked from Whiten-oss/readme.txt
Skipping Stones to Lonely Homes (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html

The code implements a piecewise mathematical generation algorithm that reconstructs the retro landscape geometry from the DOS game Bang! Bang! [2.1]. It relies on a deterministic custom Pseudo-Random Number Generator (PRNG) called a Linear Congruential Generator (LCG) to ensure that entering the exact same seed integer always yields identical environmental geometry [2.1].

1. Initial Boundary Constraints

The landscape maps out across 512 total horizontal coordinate steps (TERRAIN_W = 0x200) relative to a fixed floor baseline (HORIZON_Y = 390) [2.1].

  • The Left Mesa (CE): The algorithm picks an edge coordinate from 78 to 193 [2.1]. Everything from index 0 up to CE is locked at a flat height defined by mesa[0] [2.1].
  • The Right Mesa (DA): The algorithm picks a starting index from 318 to 433 [2.1]. Everything from index DA to 512 is locked flat at a height defined by mesa[1] [2.1].

2. Choosing the Mountain Peak

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>BANGBANG hill.c logic tester</title>
<style>
:root { color-scheme: dark; }
body {
margin: 0; padding: 24px;
font: 14px/1.5 ui-monospace, Menlo, Consolas, monospace;
domain platform
binary_sensor as3935
binary_sensor cap1188
binary_sensor dfrobot_sen0395
binary_sensor gpio
binary_sensor hlw8012
binary_sensor hm3301
binary_sensor ld2410
binary_sensor mpr121
binary_sensor pcf8574
Peripheral Function Supported Chips
UART Serial interface All RISC-V (C2, C3, C5, C6, C61, H2, P4, S3)
SPI Serial bus All RISC-V (C2, C3, C5, C6, C61, H2, P4, S3)
I2C Multi-drop bus All RISC-V (C2, C3, C5, C6, C61, H2, P4, S3)
I2S Digital audio C3, C5, C6, C61, H2, P4, S3
USB Serial/JTAG Native debug/log C3, C5, C6, C61, H2, P4, S3
USB OTG HS 480 Mbps host/dev P4
SDIO Host/Slave High-speed SD cards P4
MIPI-CSI Camera interface P4
MIPI-DSI Display interface P4
,Foundational
,Board-specific Helpers
LED Helpers,Helper Libraries
User Interface and GFX Helpers,Helper Libraries
Motor Helpers,Helper Libraries
Internet of Things Web Service Helpers,Helper Libraries
Internet/Internet-of-Things Helpers,Helper Libraries
Bluetooth Low Energy Helpers,Helper Libraries
LoRa Wireless Helpers,Helper Libraries
Cryptography Helpers,Helper Libraries
# Function to pipe file content into wl-copy
c() {
if [ -f "$1" ]; then
wl-copy < "$1"
else
echo "Error: '$1' is not a valid file." >&2
return 1
fi
}

ASD-STE100 format