We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm not experienced with p5, processing or programming in general. So I was really excited when I saw, how easy it is to work with p5.
I made a silly little pong game. In p5 editor it works the way I want, just gets more and more slow after running for some time.
Then there is a possibility to run a sketch in browser (from p5 editor). The browser in my case is chrome. Sketch runs fine, even without slowing down. But as code got longer I noticed that it doesnt always run inside browser even if it works in editor. For example I had to put if statement inside another if statement instead of checking all conditions inside one if statement.
Another possibility is to run a sketch by launching index.html file. Here again I get different results. For example sounds do not want to get pre-loaded. I dont know, maybe it would get solved by properly hosting it somewhere instead running it like that. But this is not biggest issue (I just commented out all the sounds in the code). Even without sounds it gives different results in different browsers:
In windows I tried it on explorer, firefox, chrome and opera. It worked ok on all except firefox.
I also tried it on linux ubuntu, on chromium and firefox. Again, it didnt work on firefox. And on chromium it worked, but very slow.
So this is my story. And the question is: are there any guidelines, what should be avoided and what must be done, to make a code good for all browsers? Or maybe there is a possibility to export a sketch in some kind of exe file that could be sent to other people and I would be sure that it will run on their machines exactly the same as on mine?