bad-apple-uxn
Bad Apple!! for the Uxn stack-machine by Hundred Rabbits.
Quick start
cargo run --release -- --input assets/badapple.mp4 --output badapple.tal --rom badapple.rom
or download the badapple.rom
file from the releases page.
uxnemu badapple.rom
Specifications
- Display resolution of 42x32 pixels,
- 810 frames of video (3.75 frames per second),
- 1-bit images,
- Compressed with run-length encoding, 1 byte per run, alternating runs with no markers,
- 63375 bytes,
- No audio
Building
This repository contains the project needed to build the .tal
file from scratch. If you are interested only in downloading and running the file, check out the Running section.
Make sure you have the most recent release of Rust, as well as FFmpeg libraries installed on your system (check out this guide for more information on how to get them). Run the cargo run
command with the --release
profile, as well as the path to the input MP4 file and paths to the output files, like so:
cargo run --release -- --input assets/badapple.mp4 --output badapple.tal --rom badapple.rom
This should compile the project and run the whole build process.
You can omit the --rom
argument if you want to assemble the ROM from the .tal
file yourself. To do that, run
uxnasm badapple.tal badapple.rom
to assemble the ROM with Uxnasm.
Running
Check out the releases page for prebuilt Uxn ROM files.
Before running, make sure you have the Uxn toolchain installed. To run the ROM, run
uxnemu badapple.rom
This should open a window. When you're ready, press any button on your keyboard to start the video.
Tweaking
You can tweak various constants in the ( Tweakables )
section of the resulting .tal
file before the assembly.
X-OFFSET
andY-OFFSET
— define the video offset in screen pixels from the top-left corner of the screen, can be used for centering,FRAGMENT-WIDTH
andFRAGMENT-HEIGHT
— define the size of the "video pixel", can be used for scaling the video to various screen sizes,VIDEO-WIDTH
andVIDEO-HEIGHT
— self-explanatory, can be used for making visual glitches,FRAME-TIME
— number of Varvara screen frames per each video frame.#0001
means a 60 FPS video (video frame every screen frame),#0010
means a 60 / 16 = 3.75 FPS video (video frame every 16 screen frames),STOP-TIME
— frame index after which the rendering terminates.
License
This software is licensed under the MIT license.
See the LICENSE file for more details.