This game was made in p5.js. No draw() function was used. The entire game is controlled with button events.
You can download an Android version of this game at Google Play Store: https://play.google.com/store/apps/details?id=com.test_your_intelligence
Yes. You already have the if part in your mouseClicked().
https://repl.it/@jgordon510/ellipse-for-giraffimation-2
I run setup() in the else, which makes the game restart.
Looks great. I designed an ad for my video game (coding) school a while ago in P5.js using Monster Friend designed by Harry Wakamatsu from Japan. Here's the source:
https://repl.it/@jgordon510/Half-Page-BW-Ad
It's actually a two-part font that you put together, so I made a separate little function to do that for you. It might work for your game.
If it really needs to be exactly 1 second you can use <code>millis()</code> as well.
A fork of the above example showing two ways to use this: https://repl.it/repls/OutstandingSecondFiber
(Thanks for introducing me to repl.it! Going to use this in the future!)
I read this excellent book: https://www.amazon.co.uk/Nature-Code-Simulating-Natural-Processing/dp/0985930802. Which you can find online.
But honestly, p5 is so incredibly simple you can just start drawing from the reference page on the website - put shape, loop, change color, so easy.
If you want to do more complex geometric things then you'll want to start using paper.js eventually too.
No problem, questions are good!
https://processing.org/reference/loop_.html
When something happens to make the player die and get to the end screen, the "else if ( screen == 2 ) option is taken, and "noLoop()" is called. That means the daw() method no longer runs.
So it needed to be restarted in order to continue with the game.
The Processing reference is a good place to learn the little details of the language.
My workflow is:
This is likely a CORS issue. Essentially the editor’s web server is blocking you from loading certain resources from an external site. It’s done for security purposes. This site might help explain it better. Not sure you can do anything about it except just uploading all your resources to the editor.
Hi! There reason there are only 12 readers is probably because I have made 0 attempts to promote the subreddit.
I made it because I actually work with the working group at NYU. I figured It'd be worth making just so somebody with a link to the project would be around.
I don't think that processing and P5 are really in competition as they sort of accomplish different tasks.
Unfortunately the community doesn't seem to have a massive online presence. If you want to get into developing the library it troll around the github page.
Also read through this page if you haven't already.