I am a US teacher planning to teach Mobile App Development. I had planned to use Processing for Android but had to change my plans due to COVID-19, and I am running into difficulties with p5.js.
I have two questions, and answering either one with a yes would solve my problem.
Is there a way to create actual mobile apps in p5.js?
Is there a way to use Processing for Android with a Chromebook?
Everything we do for class has to be able to be done in a Chromebook in case we have to go virtual again. This required me to change my plan of using Processing for Android (download only, as far as I can tell) on the school desktop computers.
However, it seems that the only option to run a p5.js sketch on mobile is either to connect to the p5.js IDE over shared WiFi or download Node.js to use localtunnel. Chromebooks can’t download anything, and I’m concerned that the first option will cause problems when kids are on the school WiFi. Also, when trying to find the port number for my sketch, I can’t find it. I’ve looked where the tutorial (https://creative-coding.decontextualize.com/mobile/) says, and even looked in the Developer Tools in Chrome.
Interesting! I haven’t taught mobile app development with p5.js but it seems doable.
My high school math and computer science students used the p5.js Editor on Chromebooks with no problems last year; you shouldn’t have any issues on that front.
It’s straightforward to pin a website to a mobile device’s home screen so that it mimics an app. Your students could navigate to the address of their sketches using their mobile browser and pin the versions they want to test or show off to friends and family.
@MaggieStrain === sorry, i have read your question too quickly; with P5JS you can create responsive web site or page but you cannot create an android app: for that and a chromebook you have to use Android studio; i dont know if it is possible to use P5 android mode with a chromebook neither if it is possible to use APDE.
more details here: https://developer.android.com/topic/arc/development-environment
I appreciate all the responses. I decided to give up on the idea (for now) of specifically using Processing for the class, since I couldn’t seem to find a viable workaround. I will work on some of your suggestions this school year and see if I can come up with something that works for App Development 3/4 (2nd year class in my state). I’m hoping that we’ll be in class all of next school year so I can download Processing for Android and be done with it.
Just in case you were wondering, here is what I decided on:
1 week “playing around” with p5.js in editor in their browser (I had figured out that it worked before anyone answered). This way they have another option for sketching out ideas, playing around with game mechanics, etc. I will also briefly introduce them to some of the big ideas of programming: loops, conditionals, etc. They can look at a bunch of examples and just get ideas.
As I said, I’m hoping to come back to my original idea of using only Processing for Android or a workaround using p5.js for the kids that do a second year of App Development.
Hi Maggie, could you give an update of how the course went? I would really like to know.
I ended up using CodeHS for my Mobile App Development course. However, I used p5.js all year for my Programming classes, and it was wonderful! I was able to easily introduce OOP second semester, and I could have done it before that. We didn’t do full-blown games, but we did a lot of mouse interaction and object interaction projects that were heading in that direction. I would love to hear more about what you’ve done with it.
I have been teaching some things to my 11 year olds the last few week. I made a simple game where you have to dodge a box scrolling down the screen. The box speeds up each time. I have two versions of the file, the complete version which I use to remind me what code to type, and a student version which they can duplicate and write in the code to make the game.
Teacher version = p5.js Web Editor
Student version = p5.js Web Editor
I basically made one class that they interact with. I got a little minion guy as the main box, and that can be easily changed. I think your students would enjoy that.
I also got my much older (17/18 year old) students to make the same game from scratch as a coding challenge. Some of them are not brilliant at maths, but they understand the basics of OOP. To differentiate the lesson I provided a guide of what functions they will need in order to complete the game. They can choose whether to use it or not. The file is a PDF file, unfortunately I can’t upload it to the forum, but I can email it you if you like.