New coder- added background to flappy bird game now doesn't work

i did not get into your code, just for the picture:

-a- i play online p5.js Web Editor
-b- i see no info in reference, but found a example
examples | p5.js
and you see there, that there is a rule about the canvas size === image size

    createCanvas(502, 333); // for data/172_redgiantsun.jpg
    landscape = loadImage('data/172_redgiantsun.jpg');

-c- i recommend in all cases to use the path to the external files
(esp in the case where you do a read write / the processing default to look in /data/ for reading
(only), is more confusing as helping )

-d- add looks like i needed a

   background(landscape, [0]); 

-e- worry that it can not understand all picture types …
i tested a

.jpg
.jpeg

successfully

so without your original picture not more to say.

1 Like