I've been working on a system that allows real video playback inside Project Zomboid using Lua, and I think it's at a point to release publicly. These tools are more targeted for modders wishing to add varied video content to their mods/projects. This was built for build 41 and will be including a build 42 version soon.
The system has two parts:
Bitcast Converter — converts normal video files into a compressed Lua-friendly bitmap format
Bitcast Renderer — reconstructs and draws frames using drawRect() inside the game UI
This makes it possible to render/play videos inside any custom interface/ui panel.
How it works:
Bitcast converts frames into indexed palette colors, scanline dictionaries, RLE rows, and delta frames. The renderer reconstructs each frame using rect strips, which performs well inside PZ's engine. I have been able to render and watch full 30 minute episodes..
Pipeline:
Video File
↓
Bitcast Converter
↓
Lua Video Data
(meta + palette + scanline dictionary + frame references)
↓
Bitcast Renderer
↓
Scanline reconstruction
↓
drawRect rendering
Compression:
764MB source video → ~30MB Bitcast export (Note: Achieved with 16 Color Palette.)
What you can build with it:
In-game TVs, computer terminals, animated UI panels, storybooks, lore-driven cutscenes.. etc
Includes full documentation, a step-by-step tutorial, and an example to test. The example script forces a ui panel to render and play a video, given you have converted a video to the lua format. More information is in the TUTORIAL.md
Feedback and experimentation welcome. I hope someone in this amazing community finds this useful in their PZ adventures. 😉 🍻
Any issues or need any help using these tools, please dm me. 🛠️
https://github.com/itsonlylock/bitcast-renderer
https://github.com/itsonlylock/bitcast-converter
