OK, I was looking into the toy AI coding train made and found the code for flappy bird nn in processing so I copied and pasted to see what would happen, but one file said java instead of the processing end letter. do I copy and paste to try it or do I do something else?
Processing’s IDE (PDE) recognizes both “.pde” & “.java” extension files inside a project folder.
Here are 2 Processing examples w/ both “.pde” & “.java” files in them:
Inputs.java
/**
* Keyboard Input Library
* Andrew Errity v0.2 (2015-Oct-01)
* GoToLoop v1.0.3 (2015-Oct-22)
*
* https://Forum.Processing.org/two/discussion/13175/
* do-whille-is-not-working-how-it-suppose-to#Item_12
*
* https://GitHub.com/aerrity/Inputs/blob/master/src/Inputs.java
* https://Gist.GitHub.com/GoToLoop/bba0c288aaeeb5ef9bb1
This file has been truncated. show original
Keyboard_Input_Library.pde
/**
* Keyboard Input Library
* Andrew Errity v0.2 (2015-Oct-01)
* GoToLoop v1.0.3 (2015-Oct-22)
*
* https://Forum.Processing.org/two/discussion/13175/
* do-whille-is-not-working-how-it-suppose-to#Item_12
*
* https://GitHub.com/aerrity/Inputs/blob/master/src/Inputs.java
* https://Gist.GitHub.com/GoToLoop/bba0c288aaeeb5ef9bb1
This file has been truncated. show original
Countdown.java
/**
* Countdown Class (v1.2.5)
* GoToLoop (2017/Aug/26)
*
* https://Forum.Processing.org/two/discussion/27733/
* countdown-class-library-for-java-js-python
*
* https://Forum.Processing.org/two/discussion/23846/
* time-delay-in-python-mode#Item_11
*
This file has been truncated. show original
CountdownClass.pde
/**
* Countdown Class (v1.2.5)
* GoToLoop (2017/Aug/26)
*
* Forum.Processing.org/two/discussion/27733/
* countdown-class-library-for-java-js-python
*
* Forum.Processing.org/two/discussion/23846/
* time-delay-in-python-mode#Item_11
*
This file has been truncated. show original
2 Likes
So I just paste it in then press play. I’m guessing. When I did the java file had an error.
A valid PDE project folder gotta have the same name as 1 of the “.pde” files inside it.
1 Like
yea so how can i try the turtorial that one folder is java instead of pde
B/c a valid PDE project gotta be named as 1 of the “.pde” files inside it, obviously we’ve gotta have at least 1 “.pde” file.
Once the demand above is satisfied, we can have as many other “.pde” and/or “.java” files inside that project’s folder.
1 Like
So sketch need to be pde but the others can be any. Is that what you saying. I always thought they all needed to be pde
That’s it! Callbacks like setup() , draw() , etc., need to be inside “.pde” files.
We use “.java” files in order to have top classes using actual Java valid syntax.
1 Like
ty. if don’t work i’ll post the files so can say how to exactly do it
In general, if you want us to help you run a thing, show us the thing, or give us a link to where you got the thing… that will speed up the help you get a lot.
1 Like
It works after I was told how to do it.