Bad Apple on Pico8
Link to github here
Note this works by dragging and dropping a frameData.bin onto the running cart so it dose not work on BBS.
Drawing Function Used by Cart:
How it works
frameData.bin contains all the video data, every 2 bytes is an x,y coordinate for the endpoint of a line, an 0xfe byte represents the end of a polygon, a 0xff byte represents the end of a frame.
The pico8 cart reads this data 1,000 bytes at a time, and draws the outline of each polygon (filling them in would be a challenge).
Shout Out
Shout out to this project here which did the initial work of turning the original video into a list of polygons, which this project is based on.
Follow Up
I'd like to investigate the possibility of compressing the frame data into a single cart, which might be difficult at full scale resolution. I'd also like to investigate algorithms for filling in the polygons efficiently. Any ideas / advice is most welcome!
Based on your description, it sounds like frameData.bin is a list of polygons with frame separations. If you want to use filled polygons instead, I would recommend converting the data into keyframes (or perhaps key-polygons?) and adjustments so that you're not redrawing things that don't need to be redrawn.
If that turns out to be viable, you could then also consider taking advantage of the fact that the video is entirely black and white to compress the keyframes more easily. If you can find a way to store keyframes as full images, then you can unpack and copy them into upper memory a little at a time beforehand and then just shove the whole image onto the screen memory when the time to show them comes. That would completely eliminate the need for an efficient filling algorithm, replacing it instead with the need for an accurate representation of each non-key frame.
Edit: Also just remembered, if your reason for wanting to use a single cart is to upload to the BBS, then it may be worth considering using a few data carts and loading data into upper memory as well. That would still allow playing it from the BBS.
[Please log in to post a comment]