I have been following along with Daniel Shiffman’s tutorial videos on YouTube, and some codes work but others don’t. I’m new to coding, but it seems that the problem is the variables I put in, that the reader(?) doesn’t recognize them. E.g.:
Nothing appears on the screen; no pendulum! Where have I gone wrong?? The PVectors etc. are unknown? If so, how do I tell it to “know” them??
I am trying to follow that video, yeah; I didn’t know he was using an old version so it might not translate to what I try…
I do have the p3 Processing reader(?)/text editor(?), but haven’t actually used it. Do you reckon if I try this with the p5.js code in p3 it might work?
As I say, I’m new to all this, so I’m slow to get what I need to be doing! So, apologies if I’m wrong…
but at first i ask you to forget all the tools, the code , the videos
it is UP TO YOU what you want to LEARN to DO.
basically you tell me if:
want learn to make code for a good graphic show
in a browser / online / so friends can see it ( with a link provided )
YOU must learn p5.js / write a sketch.js file / best online here
( and make a account there )
learn JAVA used in a stand alone desktop app on your PC
best using processing 3.5.3 IDE and writing mysketch.pde files
but also it is true that in both cases the CODE you can write by any editor,
we can not teach all in one question,
so as a beginner i urge you to use
JAVA >> processing IDE 3.5.3
JS >> p5.js online editor
JAVA and JS, that are 2 different languages
but the prepared functionality for processing
makes it actually easy to work with both / even not all can be translated…
but i can not tell you how much confusing it might be to explore both in the beginning
might be better you try like
++ one month JAVA
++ one month JS
even the teaching videos ( and the mostly also provided code)
are helping for a fast learning curve,
( also all the provided examples / tutorials… )
you must start alone with a empty sketch
and make just a line!
JAVA _ https://processing.org/reference/line_.html
JS ___ https://p5js.org/reference/#/p5/line
just to prove that you are in the right ( and correct installed ) environment
and use the correct language syntax.
What I’d like to eventually be able to code for is e.g. evolutionary simulations, flocking (boids) behaviour, predator-prey interactions, etc. Simulations that mimic real life scenarios, randomly, if you know what I mean?
Yeah, learning those things will definitely help, with all future coding, no doubt; thanks! JS in Sublime, then run in Firefox works (at least with some codes!). Following Shiffman, some codes work perfectly, and other don’t until I mess about and tweak and try a couple different things; but generally they do work, until it gets really complicated.
I do wonder though, about how you set up the whole thing. To use the p5.js etc. one video said to have the folder on the desktop, which I don’t understand (except that it worked when I did it, haha). Is this the same for other readers or coding languages? (Because I tried everything in p3 and nothing happened except a load of error messages! I assume I need to set it up differently?)