Bad Apple Shadow Art (Touhou Project) challenge using a customized dataset.
bad-apple.json
is an optimized dataset I generated myself in order to process each frame quickly. 2191
frames which means you should render it at a maximum rate of 10 fps
.4.4MB
{
// ...
"data" : [frame1, frame2, ... ]
}
frame[i].length
frame[i][j]
contains something like this frame[i][j] <- (map_index << 24) | repeat_count
(stored inside a 32 bits integer).frame[i][j] >= 0
color = value >> 24 // 0, 1 or 2
repeat_count = value & 16777215
map_index
tells us the color index : 0, 1 or 2 (this dataset contains 3 levels of color)repeat_count
tells us how many times we should render the current colorframe[i][j] < 0
This means we should go to the next line and process the next value