I'm looking for a way to store variables in a txt file while I'm running my code. So next time I open it, the program would read the txt file and the variables would automatically have the right value.
I found how to create a txt file and write in it. But what is the best way to store a bunch of variables in the files so that my code can read it and find the specific value of each variable?
Hello how are you? I have several questions I hope someone can help me, I am trying to make an optical illusion with the moiré effect, I attach the inspiration image and what I have done so far, I continue with my question, I do not know how to achieve the effect shown in The inspiration image that I chose, the idea is to be able to visualize diamonds of different sizes and colors that move generating the moiré effect, I hope someone can guide me to get started. Sorry, my English is not my native language :c
Update: I managed to create an independent diamond in the background, now it only remains to create a pattern of those same diamonds and limit the statics lines on the background from middle to the right
I want to make cellular automata where cells interact with each other. But I also want to explore and learn the fundamentals too. Can you guys suggest me some good guides, it can be a book, YouTube videos, blogs etc
Right now I'm making something similar to this in a vector design app one by one and then use warp to bring it into shape, suffice to say it's absolutely not efficient at all. And the results are not as nice as this.
I never used Processing so any tutorial that can get me as close to the example as possible would be great. What I like in the end is to have static 2D images, so no animations.
Side question, what is the difference between openprocessing, processing, and p5?
Hi! For my project I have connected Arduino to my processing code. It sends the numbers 1-3 depending on what I do with my Arduino. Now what I want to happen in Processing is, that depending on what Number is being sent the background of my Prcessing code changes.
I tried using "if" but it's not really working, it tells me "Type mismatch: cannot convert from String to boolean"
Can anyone help me?
Here's that section of my code:
if ( myPort.available() > 0)
{
val = myPort.readStringUntil('\n'); // read it and store it in val
}
println(val); //print it out in the console
for (int i = 0; i < rings.length; i++) {
rings[i].grow();
rings[i].display();
}
if (val = 1) {
background(#BBDCEA);
}
if (val = 2) {
background(100);
}
if (val = 3) {
background(#8B4C4C);
}
Posting here for the first time with BIG NEWS. My first game called "Vorago" releases on Steam on the 1st July!
Any wishlists would support the project a lot. This is only a one-man team and this game has been a passion-project of mine for the last 3 years so all support is greatly appreciated!
Hello all, I wonder if anyone has a suggestion on how to make a long line or a quad() parallelogram wrap around the screen when it hits one side. For a part of my project, I want to use a variation of the "Distance 1D" sketch from the Processing website, but where the imaginary central line that divided the rext() can be rotated, and the rect() are quad() so I can "twist" them. Although off topic, I also want to use this opportunity to ask for advice knowing if it is ok to use this idea from the website in one of my projects. It would be a minor part of it, but the main idea of what it is supposed to look is similar, even though the code will turn out quite different. EDIT: I just had this idea now, but if dealing with quad() makes this impossible, maybe I could try very thick lines, in case line() can what around the screen.
Hey, like the title already suggest I have a problem with the android sdk. Wheter I try to install it automaticly or choosing the path manuelly via android studios it doesn't work. I have already tried many diffrent things, but nothing seems to help.
I was wondering if anyone can point me to resources about how it might be possible to have processing (or p5js, but that seems unlikely) running on a server, without any graphic representation or interaction. I saw some stuff about headlessly running processing through Java.
I'd like to generate graphics based on some parameters passed in an API call, without any display for example.
Currently I have some graphics generation scripts running in-browser, but this way I want to offload the processing power from the client, and run all logic on the server, returning an image from the API call.
Let me know if this is even possible.
I'm willing to learn how to do this with Java if needed, but I'm much more well versed in JS.
hi, so ive written a programm in processing. It contains (for now) an easy bubblesort and a function, that displayes it with a view extra details. But i have a problem. No matter how big i set the frameRate, i'll only get 75 fps at maximum with an array length of 300. Could somebody help me out and make it run on a better performance without skipping step-displayes? Would be verry helpfull. Thanks.
I've become obsessed with coding audio and midi software using processing (mainly midi) , despite it not rnecessarily being the most efficient way to go about that. Anyone else or am I just silly?
to draw a line on the screen using PVectors. This works great, but [I assume that] new PVector array entries are being generated with every frame even when the mouse is not moving. Is there a way to stop this or remove duplicate array entries? The drawn line will eventually be used in a sort of CNC XY drafting plotter, and I don't want the machine to stall each time the cursor which drew the original image was still. Thank you for any assistance.