Overview
This map demonstrates playback of low resolution video inside Red Faction using the famous Bad Apple!! shadow art video. No mods, animated textures, or other such trickery is used.
Use
The map can be launched in single player by running "map dm-badapple-b1" in the console. The multiplayer level flag is also set, should you wish to have an epic pistol battle royale with your friends while you groove to the tunes. Press the use key to start the video.
Technical details
The base level was built in RED as normal, but after geometry and objects were placed and the level was saved, approximately 8000 events and 230000 links were injected into the RFL file. This was done using a tool I am working on which allows scripted event system generation.
Video is displayed at 40x30 pixels, 25 fps, 1 bpp, on an array of 1200 "Duct Grate Cover" clutter objects. The state of each pixel is updated by a pair of Swap_Textures events. Each frame is timed by its own delay branching off of a master event. This was done in an attempt to avoid timer error accumulation from chained delays (this technique seems to work well).
Audio is a standard 44.1kHz 16-bit stereo wav file played using a Music_Start event. Nothing special.
The vast majority of the file size is the music; the RFL file itself is only 1.7MB (I was surprised it ended up being so small!)
Notes
- This only works on recent Dash Faction versions (due to the increased object limit).
- Pixels can be shot out in order to simulate a monitor that got dropped in the mail.
- Entering the menu or alt-tabbing out of the game will cause audio desync.
- If your machine takes non-negligible time to load the audio file, it will desync. This is somewhat fixable, but outside the scope of what I felt like doing tonight.
- The RFL will actually open in RED without immediate problems, but if you try to select all the events it will hang.
- All of this stuff can be optimized further, this is just the first light so to speak.
Credits
- Nomico for the arrange.
- Goober for tolerating my bullshit.
- Whoever did the animations for the video, I forget...
All works inspired by His Imperial Majesty Emperor Haile Selassie I