• Question
  • question about databases/csv file imports for app lab

for the past few hours, I've been trying to port bad apple into the code.org applab using the canvas tool to draw out "pixels" on the screen. This is by no means the most efficient way to do it as i could just upload a png for each frame and show the images in sequence but that would make this no different than if i were to do it on a slideshow. So far I have a python script that can turn a sized down version of bad apple (25x25 pixels) into a csv with rgb values for each of the pixels. I have that all done and Ill attatch it to the bottom of the page. the only issue is that i get this when i try to import it into the app lab
is there any workaround for this? thanks!
(file is too big so here's a snippet

trim.txt
36kB

that should have been a csv file. Not sure why it turned into a txt. If you want to see it how I meant to sent it, just convert it online or something

also ignore all the entries being rgb values for 0. the first few frames of the video are a completely black screen

I think I fixed it, for some reason each row was in parentheses. Can’t test now cuz I’m out but when I get back I’ll update

neverming. Pls someone hepl. borken

okay.... first off why are we storing it this way when you obviously have much more storage by being able to load it into a project variable easier.... second if you were to do such a thing why not keep the rgb values in a separate table since each table has a max of 4096 bytes splitting the 2 would more likely let this work although i stand by my opinion that this is one of the least optimal ways of doing this

trim.txt
24kB

I've stripped the weird formatting if you want to continue doing it in the weird storage way doing it the way i split this text file may be more optimal

    Varrience i came up with a solution as well. I wrote a script to turn every value thats not (0,0,0) into the string "w" and every value that is (0,0,0) gets turned into the string "b". ive just put all those into a few variables and then draw from there. Its still cumbersome but it works.
    also just to test, i uploaded all the images to my web server and got the video at full resolution to play
    https://studio.code.org/projects/applab/B--_SwBElbZqbESRSQC-ZJHa70vgYYb0pdSjpCkrkeM

    Chat