- Python 68.7%
- JavaScript 24.7%
- GLSL 3.7%
- HTML 2.2%
- CSS 0.6%
- README rewritten in English with step-by-step wallpaper instructions (Lively, Wallpaper Engine, browser, config.js, troubleshooting) - wallpaper/PowerBottom_Wallpaper_Lively.zip: ready-to-use package - wallpaper runtime: data/config.js, Lively Customise panel (fps, clock, reset counter), URL parameters, README.txt inside the package - artpack: English still names, tools/extract_stills.py Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GMV3ZbVc5R1ucJywvyZwoG |
||
|---|---|---|
| assets | ||
| fonts_eq/Equestrian Scripts | ||
| out/artpack | ||
| shaders | ||
| tools | ||
| v2 | ||
| v3 | ||
| v4 | ||
| v5 | ||
| v6 | ||
| vid | ||
| wallpaper | ||
| .gitignore | ||
| batpony.py | ||
| bn128_1.npy | ||
| bn128_2.npy | ||
| bn128_3.npy | ||
| bn128_4.npy | ||
| bn128_5.npy | ||
| bn128_6.npy | ||
| bn128_8.npy | ||
| bn128_9.npy | ||
| bn128_10.npy | ||
| bn128_12.npy | ||
| bn128_13.npy | ||
| bn128_15.npy | ||
| bn128_17.npy | ||
| bn128_19.npy | ||
| bn128_20.npy | ||
| bn128_21.npy | ||
| bn128_22.npy | ||
| bn128_23.npy | ||
| bn128_24.npy | ||
| bn128_25.npy | ||
| bn128_26.npy | ||
| bn128_27.npy | ||
| bn128_28.npy | ||
| bn128_29.npy | ||
| bn128_30.npy | ||
| bn128_31.npy | ||
| bn128_33.npy | ||
| bn128_36.npy | ||
| bn128_38.npy | ||
| bn128_40.npy | ||
| bn128_41.npy | ||
| bn128_48.npy | ||
| comp.py | ||
| env.py | ||
| extract.py | ||
| extract_bat.py | ||
| facecheck.py | ||
| gl.py | ||
| headedit.py | ||
| hud.py | ||
| ink.py | ||
| k01.py | ||
| k01_comp.py | ||
| map_mask_full.npy | ||
| mapui.py | ||
| pbface.py | ||
| pod.py | ||
| post.py | ||
| README.md | ||
| requirements.txt | ||
| rface.py | ||
| rhead.py | ||
| rpasses.py | ||
| scene.py | ||
| srv.sh | ||
| ui.py | ||
| web.py | ||
POWER BOTTOM · Music Video
Code, engine and data for the music video to "PowerBottomFinal" by HSH: 3:59, 128 BPM, rendered at 3840 × 2160, 60 fps. The repo also contains the endless animated desktop wallpaper "PB-7 · Endless Purge" and the generator for the artpack PDF.
The story: PB-7 "Power Bottom", an augmented officer of Celestia's secret police, wakes from stasis, trains, jumps from a carrier over the lunar citadel and wipes out the lunar remnant cell (Drop 01). Then repair and memory wipe. In Mission 02 he hesitates in front of a filly, is overridden by his implants (Drop 02) and returns to stasis.
Contents
- Desktop wallpaper: quick start (no coding needed)
- Folder overview
- Setup · Rendering the video · Building the wallpaper · Artpack
Desktop wallpaper: PB-7 · Endless Purge
An endless first-person battle from the video. PB-7 runs through sector after sector (ruins, burning village, moon citadel, sim hall), smashes through barricades and keeps counting kills. The kill counter is saved, so it keeps climbing across restarts, and the top right corner shows the real time. It runs offline: no server, no internet, no install.
The ready-made package is in wallpaper/PowerBottom_Wallpaper_Lively.zip.
Download it (on the repo page: click the file, then Download), or take it from your clone.
Keep the files together. The wallpaper is
index.htmlplus thedata/folder next to it. Ifindex.htmlis copied somewhere on its own, the screen stays black. Put the unzipped folder somewhere permanent (for exampleDocuments\PowerBottom_Wallpaper) before adding it to a wallpaper app; moving it later can break the link.
Option A: Lively Wallpaper (Windows, free, recommended)
- Install Lively Wallpaper from the Microsoft Store (or livelywallpaper.app) and open it.
- Drag
PowerBottom_Wallpaper_Lively.zipstraight into the Lively window. Lively unpacks it into its own library, so you don't need to unzip anything. Alternative: unzip it, click + (Add wallpaper) at the top, choose the file picker and selectindex.html. - "PB-7 · Endless Purge" appears in the library. Click it to set it as your wallpaper. With several monitors Lively asks which screen to use (or Span across all of them).
- Settings: right-click the wallpaper in the library → Customise:
- Frames per second (10 to 60; 20 is good for laptops, 60 is smoothest)
- Show clock
- Reset kill counter
- Save performance: Lively → Settings → Performance:
- Other application fullscreen → Pause (games and videos get the full GPU)
- Other application focused → Pause (optional; then it only animates while you look at the desktop)
- On battery power → Pause (optional)
Option B: Wallpaper Engine (Steam)
- Unzip
PowerBottom_Wallpaper_Lively.zipto a folder (right-click → Extract All). - In Wallpaper Engine click Wallpaper Editor (bottom left) → Create Wallpaper.
- Drag
index.htmlfrom the unzipped folder onto the Create Wallpaper button (or click it and pickindex.html). Wallpaper Engine copies the whole folder, includingdata/, into itsprojects\myprojects\directory. - Give it a title (e.g. "PB-7 · Endless Purge"), then File → Save and close the editor.
- In the main window open the Installed tab and click the wallpaper to apply it. Publishing to the Workshop is not needed.
- Performance: Settings → Performance → Other application focused / maximized / fullscreen → Pause.
- Settings: edit
data\config.jsin the copied project (Wallpaper Editor → Edit → Open in Explorer), see below.
Option C: any browser (quick test, second screen, stream overlay)
Double-click index.html (Chrome or Edge work best) and press F11 for fullscreen.
Settings can be added to the address bar:
| Address | Effect |
|---|---|
index.html?fps=20 |
20 frames per second (lighter) |
index.html?clock=0 |
hide the clock |
index.html?reset=1 |
reset the kill counter (remove it again afterwards) |
index.html?fps=60&clock=0 |
combine settings with & |
Settings file: data/config.js
Works in every app. Open it with Notepad:
window.PB_CONFIG = { fps: 30, showClock: true, resetKills: false };
fps: 20 = lighter for laptops, 30 = default, 60 = smoothest (allowed range 10 to 60)showClock:falsehides the clockresetKills: set totrue, reload the wallpaper once, then set it back tofalse(otherwise it resets every time)
Save, then reload the wallpaper: Lively → right-click → Reload (or switch it off and on), Wallpaper Engine → apply it again, browser → F5.
Good to know
- Lively, Wallpaper Engine and each browser keep their own kill count (it is stored by the app that runs the page).
- Every 2 minutes a new sector starts with a short flash. The four sectors loop; the counter never resets.
- Typical load at 30 fps is a few percent of CPU and GPU. On a laptop use 20 fps and let the app pause it in fullscreen apps.
- From the browser console you can also use
PB_WALLPAPER.kills,PB_WALLPAPER.reset()andPB_WALLPAPER.setFps(20).
Troubleshooting
| Problem | Fix |
|---|---|
| Black screen | data/ is missing or not next to index.html. Unzip again and add the whole folder. |
| Message "PB-7: data/levels.js is missing" | Same cause as above. |
| Choppy, laptop fan loud | Set fps to 20 (Customise in Lively, or data/config.js). Make sure the app uses the dedicated GPU. |
| Counter back at 0 | resetKills is still true in config.js, or a different app/browser is showing it. |
| Plain-looking text | The fonts are embedded; update the wallpaper app (very old builds ship an outdated browser engine). |
| Lively says the zip is invalid | Unzip it and use + → select index.html instead. |
Folder overview
| Folder | Contents |
|---|---|
v2/www/ |
The engine (JavaScript, canvas): engine.js (dither LUT, camera, particles), world.js, hud.js (sharp 4K HUD), scenes*.js (all scenes), fps.js + fps2.js (first-person combat: turns, barricades, charges, gore, sky visualiser), scenes5.js (gunship, cargo bay, freefall, hangar walk), main.js (setup() / frame()). Plus sprites (spr/, v4/, v5/, fps/) and textures. |
v2/ |
Edit and render: edl3.py (the full edit, every cut), edl4.py (current version, uses fps2), render2.py (worker, check, concat), snap.py / story2.py (test frames, storyboard) |
v4/ |
Level choreography: fpsgen2.py (speed, turns, barricades, charges, laser volleys on the audio events), levels2.py (Drop 01, simulation, Mission 02 including the filly) |
v3/ |
Audio analysis: spectrogram, laser / zap / gap detection → audio_events.json |
vid/ |
Post-FX and infrastructure: render.py (bloom, chromatic aberration, scanlines, grain, vignette, shake; resolution independent), song.py (beat grid, audio features), uis.py (DOM terminal screens: decree, briefing, launch control, repair …), spec60.py (60 fps spectrum for the visualiser) |
v5/ |
Source images for the hangar, cargo bay and gunship targets |
v6/ |
Desktop wallpaper: wallgen.py (endless sectors), build_wallpaper.py (builds the self-contained folder + Lively package), wallpaper_src/ (runtime, config, README) |
wallpaper/ |
The prebuilt wallpaper package (PowerBottom_Wallpaper_Lively.zip) |
out/artpack/ |
build_artpack.py: generates the artpack PDF |
tools/ |
relocate.py (rewrites the baked-in paths to your clone), extract_stills.py (pulls the artpack stills from the finished video) |
assets/, fonts_eq/ |
Cut-out character sprites, Equestrian Scripts fonts (Ponish Runes, Bat Ponish, Unicorn Arcana …) |
| root | Older helper modules from v1 that are still used (ui.py, hud.py, post.py, mapui.py …) |
Setup
Tested on Linux with Python 3.11, Chromium (Playwright) and ffmpeg. On Windows, use WSL.
python3 tools/relocate.py # point the paths in the code at this folder
pip install -r requirements.txt
python3 -m playwright install chromium
# fonts for the engine (Linux):
mkdir -p ~/.local/share/fonts
cp "fonts_eq/Equestrian Scripts/fonts/"*.ttf ~/.local/share/fonts/ && fc-cache -f
# also needed from your package manager: TeX Gyre Heros Cn, DejaVu Sans Mono, Noto Serif CJK JP
The song is not in the repository. Put PowerBottomFinal.wav in the repo root and create:
ffmpeg -i PowerBottomFinal.wav -ac 1 -ar 22050 song_full.wav # for the analysis
ffmpeg -i PowerBottomFinal.wav -c:a aac -b:a 256k vid/audio.m4a # audio track for the video
vid/audio30.npz, vid/spec60.npz and v3/audio_events.json are already computed and included.
Rendering the video
./srv.sh # local asset server on 127.0.0.1:8765
cd v2
python3 render2.py list # every cut with its frame range
python3 render2.py worker 0 2 & # two workers in parallel (4K60, about 2.5 h on 2 cores)
python3 render2.py worker 1 2 &
python3 render2.py check # checks every segment for the right frame count
python3 render2.py concat # -> PowerBottom_v5_4K60.mp4 with audio
PB_RES=hdrenders 1920 × 1080 at 30 fps (faster for testing).- Re-render single cuts:
python3 render2.py worker 0 1 92,93(indices fromlist). - Test frames:
python3 snap.py out.png cuts.json; storyboard:python3 story2.py board.png; first-person level:python3 ../v4/snapfps2.py m2 out.png 176.5,177.4. - 4K pages need a lot of RAM:
./superv.sh 0 2runs worker 0 of 2 and restarts it if the browser is killed (out of memory). A worker skips segments that are already finished.
Building the wallpaper from source
./srv.sh # the builder asks the engine which images each sector needs
python3 v6/wallgen.py # generates four 2-minute sectors -> v6/wallpaper/levels.json
python3 v6/build_wallpaper.py # -> v6/PowerBottom_Wallpaper/ and v6/PowerBottom_Wallpaper_Lively.zip
cp v6/PowerBottom_Wallpaper_Lively.zip wallpaper/
The builder embeds every image (WebP), font (WOFF) and the engine into data/, so the page runs from file:// without
a server. It also writes LivelyInfo.json, LivelyProperties.json (the Customise panel), a thumbnail and an animated preview.
Change the sectors in wallgen.py (sector(level, seed, length, palette, prefix, hud_overrides)).
Artpack
python3 tools/extract_stills.py v2/PowerBottom_v5_4K60.mp4 # -> out/artpack/img/ + out/stills/ (45 stills)
python3 out/artpack/build_artpack.py # -> out/artpack/PowerBottom_Artpack.pdf
The builder renders an HTML book with headless Chromium and prints it to a 21-page A4 landscape PDF.
Credits
Idea, OC, story and music: HSH. Video, engine and code were made with Claude (Anthropic). Fonts: "Scripts of Equestria" fan fonts; the Old Ponish Runes OTF credits hyreia77 and Mhigg22. Fan work set in the world of My Little Pony: Friendship is Magic; not affiliated with Hasbro.