javascripthtmlcssgame-developmentp5.js

Why is my p5.play.js not working on github but working on VScode?


Whenever I try to deploy my p5play code on GitHub Pages, it just shows a blank screen. What can I do to resolve this issue? It works perfectly on VS Code. Specifically, the page has a white background. I believe the initial code is rendering, but my game code is not. Has anyone had this experience before? I tried using a popular, recommended alternative, and it did not work either.

Website link: https://vero0888888.github.io/FeverDream/ Repository link: https://github.com/Vero0888888/FeverDream


Solution

  • It seems you have an asset that is not loading on the Github Pages link. A common mistake is asset name capitalisation - it would work on VS Code (presumably on local development) as macOS is more forgiving about mismatched file name capitalisation (e.g. assets/tennisBall.png vs assets/TennisBall.png).

    Additionally you will be able to further identify and debug issues by using the browser console.