/r/processing
“Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology. There are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning and prototyping.”—from Processing.org
Share your projects, news and questions about Processing or Processing.js here.
(open to suggestions)
/r/processing
I’m looking for a recommendation for some content or a book to help improve my skills with Processing. I’ve been studying it for about six months, but I feel like I’m a bit stuck. I’d like to dive into some more advanced topics and learn something a bit more complex.
Hello, long time Java developer using IntelliJ. I have the basic set up and want to start using flow fields and cellular automata etc but I cannot seem to find the Jar's / dependencies anywhere.
Is there a way of getting all the libraries that I need to cover all possibilities for this software. I prefer to use an IDE.
I'm also thinking of trying P5.js. Is this preferable or should I be fine with Java?
Hello! I'm using Processing 4 and I've put together a music visualiser based on hamoid's updated Video Export library's 'withAudioViz' example, and it always plays through fine, but for some reason it never exports a video the same length as the actual song (2:30 instead of 6:20).
The code spits out .txt files based on the song, and I can see in one of them it says 'Duration: 00:02:30.43' but later in the same file it notes the song lasts 00:06:20.57. My problem is I don't know what's telling the text file the song is 2:30 in the first place...!
Here's the full code - I've chopped it down as much as possible but can't see how to share this without including all my specific stuff (music, images) so sorry if it looks like shameless self promotion :D the commented-out text is from the original withAudioViz example, in case it helps. You can grab the data folder with the song and image HERE.
On the plus side, if anyone happens to be looking for Processing music vis code that shows different ways to visualise the left and right audio channels, here you go.
nb. it doesn't state it in the code, but I found using 'esc' to close the project once the song finishes is what actually causes the video to export.
-------------------------------------------------
import com.hamoid.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.spi.*;
VideoExport videoExport;
String audioFilePath = "1. Professional Hairdresser - Death Spiral ver.2 [m].mp3";
String SEP = "|";
float movieFPS = 30;
float frameDuration = 1 / movieFPS;
BufferedReader reader;
Minim minim;
AudioPlayer groove;
PImage img;
/*
Example to visualize sound frequencies from
an audio file.
Producing a file with audio and video in sync
is tricky. It gets easily out of sync.
One approach, used in this example, is:
Pass 1. Analyze the sound in a Processing sketch
and output a text file including the FFT
analysis data.
Pass 2. Load the data from pass 1 and use it to
output frames for a video file, including
the right frames to match the sound
precisely at any given time.
Using this technique it does not matter how fast
or slow your second program is, and you know that
no frames will be dropped (as may happen when
recording live).
The difficulty of recording live graphics with
sound is that the frame rate is not always stable.
We may request 60 frames per second, but once in
a while a frame is not ready on time. So the
"speed of frames" (the frameRate) is not constant
while frames are produced, but they are probably
constant when played back. The "speed of audio",
on the other hand, is often constant. If audio
is constant but video is not, they get out of
sync.
*/
void setup() {
size(1920, 1050, P3D);
minim = new Minim(this);
groove = minim.loadFile("1. Professional Hairdresser - Death Spiral ver.2 [m].mp3", 1024);
groove.play();
img = loadImage("SKULL FRONT.png");
img.resize(900, 900);
// Produce the video as fast as possible
frameRate(1000);
// Read a sound file and output a txt file
// with the FFT analysis.
// It uses Minim, because the standard
// Sound library did not work in my system.
// You could comment out the next line once you
// have produced the txt file to speed up
// experimentation. Otherwise every time you
// run this program it re-generates the FFT
// analysis.
audioToTextFile(audioFilePath);
// Now open the text file we just created for reading
reader = createReader(audioFilePath + ".txt");
// Set up the video exporting
videoExport = new VideoExport(this);
videoExport.setFrameRate(movieFPS);
videoExport.setAudioFileName(audioFilePath);
videoExport.startMovie();
}
void draw()
{
String line;
try {
line = reader.readLine();
}
catch (IOException e) {
e.printStackTrace();
line = null;
}
if (line == null) {
// Done reading the file.
// Close the video file.
videoExport.endMovie();
exit();
} else
{
String[] p = split(line, SEP);
// The first column indicates
// the sound time in seconds.
float soundTime = float(p[0]);
// Our movie will have 30 frames per second.
// Our FFT analysis probably produces
// 43 rows per second (44100 / fftSize) or
// 46.875 rows per second (48000 / fftSize).
// We have two different data rates: 30fps vs 43rps.
// How to deal with that? We render frames as
// long as the movie time is less than the latest
// data (sound) time.
// I added an offset of half frame duration,
// but I'm not sure if it's useful nor what
// would be the ideal value. Please experiment :)
while (videoExport.getCurrentTime() < soundTime + frameDuration * 0.5)
{
background(#000000); //put this here to 'clear' shapes as they're drawn
translate(width/2, height/2);
float mag = 450;
float shapeSize = 0.1;
//SKULL
{
{
fill(#FFFAFA);
noStroke();
sphereDetail(1);
float tiles = 200;
float tileSize = width/tiles;
push();
//translate(width/2, height/2);
rotateY(radians(30));
for (int x = 0; x < tiles; x++) {
for (int y = 0; y < tiles; y++) {
color c = img.get(int(x*tileSize), int(y*tileSize));
float b = map(brightness(c), 0, 255, 0, 1);
float z = map(b, 0, 1, -100, 100);
push();
translate(x*tileSize - width/2 + 150, y*tileSize - height/2, z - 400 + groove.left.level() * 30);
sphere(tileSize*b*0.5);
pop();
}
}
pop();
}
{
// draw the waveforms
// the values returned by left.get() and right.get() will be between -1 and 1,
// so we need to scale them up to see the waveform
// note that if the file is MONO, left.get() and right.get() will return the same value
fill(#F87322);
noStroke();
for (int i = 0; i < groove.bufferSize() - 1; i++)
{
float wave1 = map(cos(radians(i)), -1, 1, -mag, mag);
float wave2 = map(sin(radians(i)), -1, 1, -mag, mag);
ellipse(wave1 + 400, wave2, shapeSize + groove.right.get(i), shapeSize + groove.right.get(i+1)*100 );
}
}
}
videoExport.saveFrame();
}
}
}
// Minim based audio FFT to data text file conversion.
// Non real-time, so you don't wait 5 minutes for a 5 minute song :)
// You can look at the produced txt file in the data folder
// after running this program to see how it looks like.
void audioToTextFile(String fileName) {
PrintWriter output;
Minim minim = new Minim(this);
output = createWriter(dataPath(fileName + ".txt"));
AudioSample track = minim.loadSample(fileName, 2048);
int fftSize = 1024;
float sampleRate = track.sampleRate();
float[] fftSamplesL = new float[fftSize];
float[] fftSamplesR = new float[fftSize];
float[] samplesL = track.getChannel(AudioSample.LEFT);
float[] samplesR = track.getChannel(AudioSample.RIGHT);
FFT fftL = new FFT(fftSize, sampleRate);
FFT fftR = new FFT(fftSize, sampleRate);
fftL.logAverages(22, 3);
fftR.logAverages(22, 3);
int totalChunks = (samplesL.length / fftSize) + 1;
int fftSlices = fftL.avgSize();
for (int ci = 0; ci < totalChunks; ++ci) {
int chunkStartIndex = ci * fftSize;
int chunkSize = min( samplesL.length - chunkStartIndex, fftSize );
System.arraycopy( samplesL, chunkStartIndex, fftSamplesL, 0, chunkSize);
System.arraycopy( samplesR, chunkStartIndex, fftSamplesR, 0, chunkSize);
if ( chunkSize < fftSize ) {
java.util.Arrays.fill( fftSamplesL, chunkSize, fftSamplesL.length - 1, 0.0 );
java.util.Arrays.fill( fftSamplesR, chunkSize, fftSamplesR.length - 1, 0.0 );
}
fftL.forward( fftSamplesL );
fftR.forward( fftSamplesL );
// The format of the saved txt file.
// The file contains many rows. Each row looks like this:
// T|L|R|L|R|L|R|... etc
// where T is the time in seconds
// Then we alternate left and right channel FFT values
// The first L and R values in each row are low frequencies (bass)
// and they go towards high frequency as we advance towards
// the end of the line.
StringBuilder msg = new StringBuilder(nf(chunkStartIndex/sampleRate, 0, 3).replace(',', '.'));
for (int i=0; i<fftSlices; ++i) {
msg.append(SEP + nf(fftL.getAvg(i), 0, 4).replace(',', '.'));
msg.append(SEP + nf(fftR.getAvg(i), 0, 4).replace(',', '.'));
}
output.println(msg.toString());
}
track.close();
output.flush();
output.close();
println("Sound analysis done");
}
Beginner here, my code has some issues and i have no idea why.
Under 'Calculating, Printing', the println function does not seem to function.
The faulty line has been marked as bold to make it easier for everyone.
The purpose of this code is to create two squares next to each other with a random size, and then getting a function to read the size of the squares and sum up the area.
Any help would be appreciated. Thanks.
hello, everyone.
I was doing a tetris project.
I hope colision and hitsurface will make the blocks go freeze, but as the blocks become (ACTIVE == false) it does not spawn another block. can anyone make it work. Thank you so much. Also fell free to make any modifications and explain your though process. Also adding the different rotation of the current shape is highly aprreciated. thanks once again.
Github repository: https://github.com/syedh139/Stuy
Go to the tetris file.
Anyone knows what's new/fixed/updated/whatever in this release? Just appeared one day but I can't find any release notes anywhere.
I've been having one of thee worst crashouts with this particular code. Everything I have tried up to now is futile. All I want is when the Player overlaps with the target, (green block) it adds a point to the round integer. But it just doesn't work, all it does it displays ZERO.
import java.util.ArrayList;
Player player;
ArrayList<Obstacle> obstacles;
ArrayList<Wall> walls;
Target target; // Target instance
int rounds;
boolean gameOver;
boolean gameWon;
float timeLimit;
float timer; // Timer for current round
int lastTime; // Tracks the last time update was called
void setup() {
size(800, 600);
resetGame();
}
void draw() {
background(255);
if (gameOver) {
displayGameOver();
} else if (gameWon) {
displayWinner();
} else {
updateGame();
displayGame();
}
}
void resetGame() {
player = new Player(); // Initialize player
obstacles = new ArrayList<Obstacle>();
walls = new ArrayList<Wall>();
rounds = 0; // Reset rounds
gameOver = false;
gameWon = false;
timeLimit = 30; // Set time limit for each round
timer = timeLimit;
lastTime = millis(); // Initialize lastTime
target = new Target(random(100, width - 100), random(100, height - 100)); // Create a new target
generateObstacles(rounds + 5); // Increase obstacles with rounds
generateWalls(rounds + 3); // Increase walls with rounds
}
void updateGame() {
int currentTime = millis();
float elapsedTime = (currentTime - lastTime) / 1000.0; // Convert to seconds
timer -= elapsedTime; // Decrease timer
lastTime = currentTime; // Update lastTime
if (timer <= 0) {
gameOver = true; // Time's up
}
player.move();
// Check for collisions with obstacles
for (Obstacle obs : obstacles) {
if (obs.isColliding(player)) {
gameOver = true; // Player hit an obstacle
break; // Exit loop on collision
}
}
// Check for collisions with walls
for (Wall wall : walls) {
wall.checkCollision(player);
}
// Check if player reached the target using PlayerOverlap
if (target.playerOverlap(player)) {
int(rounds + 1); // Increment rounds - THIS CODE ADDS A POINT TO ROUNDS
if (rounds >= 20) {
gameWon = true; // Player has won
} else {
resetGame(); // Reset for next round
}
}
}
void displayGame() {
player.display();
target.display(); // Display the target
// Display walls and obstacles
for (Wall wall : walls) {
wall.display();
}
for (Obstacle obs : obstacles) {
obs.display();
}
// Display timer and rounds
fill(0);
textSize(20);
text("Time: " + int(timer), 10, 30);
text("Rounds: " + int(rounds), 10, 50);
}
void displayGameOver() {
fill(0);
textSize(50);
textAlign(CENTER);
text("Game Over", width / 2, height / 2 - 20);
textSize(20);
text("Click to Restart", width / 2, height / 2 + 20);
}
void displayWinner() {
fill(0);
textSize(50);
textAlign(CENTER);
text("You Win!", width / 2, height / 2 - 20);
textSize(20);
text("Total Rounds: " + rounds, width / 2, height / 2 + 20);
text("Click to Restart", width / 2, height / 2 + 50);
}
void mousePressed() {
if (gameOver || gameWon) {
resetGame(); // Restart the game
}
}
void generateObstacles(int count) {
obstacles.clear(); // Clear previous obstacles
for (int i = 0; i < count; i++) {
float obsX, obsY;
boolean overlaps;
do {
overlaps = false;
obsX = random(100, width - 100);
obsY = random(100, height - 100);
// Check if the obstacle overlaps with the target
if (dist(obsX, obsY, target.x, target.y) < target.size) {
overlaps = true; // Set overlaps to true if there's a collision
}
for (Obstacle obs : obstacles) {
if (obs.isColliding(new Player())) { // Check collision with existing player
overlaps = true; // Set overlaps to true if there's a collision
break;
}
}
} while (overlaps);
obstacles.add(new Obstacle(obsX, obsY)); // Add the new obstacle
}
}
void generateWalls(int count) {
walls.clear(); // Clear previous walls
for (int i = 0; i < count; i++) {
float wallX, wallY;
boolean overlaps;
do {
overlaps = false;
wallX = random(100, width - 100);
wallY = random(100, height - 100);
// Check if the wall overlaps with the target
if (dist(wallX, wallY, target.x, target.y) < target.size) {
overlaps = true; // Set overlaps to true if there's a collision
}
} while (overlaps);
walls.add(new Wall(wallX, wallY)); // Add the new wall
}
}
class Player {
float x, y; // Current position
float radius = 15; // Radius of the player
boolean movingUp, movingDown, movingLeft, movingRight;
Player() {
reset(); // Initialize player position
}
void reset() {
x = 50; // Reset to starting x position
y = 50; // Reset to starting y position
}
void display() {
fill(255, 0, 0); // Red color for the player
ellipse(x, y, radius * 2, radius * 2); // Draw the circle
}
void move() {
if (movingLeft) x -= 5; // Move left
if (movingRight) x += 5; // Move right
if (movingUp) y -= 5; // Move up
if (movingDown) y += 5; // Move down
// Keep the player within screen bounds
x = constrain(x, radius, width - radius);
y = constrain(y, radius, height - radius);
}
}
// Handle key presses
void keyPressed() {
if (key == 'a' || key == 'A') player.movingLeft = true; // Move left
if (key == 'd' || key == 'D') player.movingRight = true; // Move right
if (key == 'w' || key == 'W') player.movingUp = true; // Move up
if (key == 's' || key == 'S') player.movingDown = true; // Move down
}
// Handle key releases
void keyReleased() {
if (key == 'a' || key == 'A') player.movingLeft = false; // Stop moving left
if (key == 'd' || key == 'D') player.movingRight = false; // Stop moving right
if (key == 'w' || key == 'W') player.movingUp = false; // Stop moving up
if (key == 's' || key == 'S') player.movingDown = false; // Stop moving down
}
class Obstacle {
float x, y; // Position of the obstacle
float size = 30; // Size of the obstacle
Obstacle(float x, float y) {
this.x = x;
this.y = y;
}
void display() {
fill(255, 0, 0); // Red color for obstacles
rect(x - size / 2, y - size / 2, size, size); // Draw the obstacle
}
boolean isColliding(Player player) {
return dist(x, y, player.x, player.y) < (size / 2 + player.radius);
}
}
class Wall {
float x, y; // Position of the wall
float width = 50, height = 10; // Size of the wall
Wall(float x, float y) {
this.x = x;
this.y = y;
}
void display() {
fill(100); // Gray color for walls
rect(x, y, width, height); // Draw the wall
}
void checkCollision(Player player) {
if (player.x + player.radius > x && player.x - player.radius < x + width &&
player.y + player.radius > y && player.y - player.radius < y + height) {
// Prevent moving through walls
if (player.x < x) {
player.x = x - player.radius; // Move player to the left of the wall
} else if (player.x > x + width) {
player.x = x + width + player.radius; // Move player to the right of the wall
}
if (player.y < y) {
player.y = y - player.radius; // Move player above the wall
} else if (player.y > y + height) {
player.y = y + height + player.radius; // Move player below the wall
}
}
}
}
class Target {
float x, y; // Position of the target
float size = 20; // Size of the target
Target(float x, float y) {
this.x = x;
this.y = y;
}
void display() {
fill(0, 255, 0); // Green color for the target
rect(x - size / 2, y - size / 2, size, size); // Draw the target
}
boolean playerOverlap(Player player) {
return (player.x + player.radius > x - size / 2 &&
player.x - player.radius < x + size / 2 &&
player.y + player.radius > y - size / 2 &&
player.y - player.radius < y + size / 2);
}
}
I know that there are all kinds of cheap mini computers and dev boards out there like the Raspberry Pi Zero, ESP32, and Cheap Yellow Displays. Has anyone figure out a way to display Processing (or p5.js) sketches on a physical device with a small screen? Preferable without having to solder a bunch of stuff or write a bunch of stuff in the terminal.
Does anyone have any suggestions or tutorials they can link me to?
I'm trying to make my circle player collide with a square box so that I have the base code to then start randomly spawnig these boxes for a game assignment but i'm very new to Processing (and reddit posting so sorry if this is horrid) and have no clue why this doesn't work. I've been following a video and it's been pristing until now but this one section refuses to work. I'll link the video too for anyone curious, he uses Player aPlayer where I have used my ply but thats only because I want just the one player.
https://www.youtube.com/watch?v=0IAuJDzfyQo
//Variable Declaration Player ply;
Square squ;
void setup () {
size(1200, 1000);
//Initialise
ply = new Player(width/2, height/2, 30);
squ = new Square(800, 600, 150, 150);
}
void draw() {
background(42);
ply.create();
ply.move();
squ.create();
}
///Keyboard Movements
void keyPressed() {
if (key == 'a') {
ply.MoveLeft = true;
}
if (key == 'd') {
ply.MoveRight = true;
}
if (key == 'w') {
ply.MoveUp = true;
}
if (key == 's') {
ply.MoveDown = true;
}
}
void keyReleased() {
if (key == 'a') {
ply.MoveLeft = false;
}
if (key == 'd') {
ply.MoveRight = false;
}
if (key == 'w') {
ply.MoveUp = false;
}
if (key == 's') {
ply.MoveDown = false;
}
}
class Player {
//Variables
int x;
int y;
int size;
int left;
int right;
int top;
int bottom;
boolean MoveLeft;
boolean MoveRight;
boolean MoveUp;
boolean MoveDown;
int movespeed;
//Construction
Player(int StartX, int StartY, int StartSize) {
x = StartX;
y = StartY;
size = StartSize;
left = x - size/2;
right = x + size/2;
top = y - size/2;
bottom = y + size/2;
MoveLeft = false;
MoveRight = false;
MoveUp = false;
MoveDown = false;
movespeed = 10;
}
void create() {
ellipse(x, y, size, size);
}
void move() {
left = x - size/2;
right = x + size/2;
top = y - size/2;
bottom = y + size/2;
if (MoveLeft == true) {
x = x - movespeed;
}
if (MoveRight == true) {
x = x + movespeed;
}
if (MoveUp == true) {
y = y - movespeed;
}
if (MoveDown == true) {
y = y + movespeed;
}
}
}
class Square {
//Variable
int x;
int y;
int Width;
int Height;
int left;
int right;
int top;
int bottom;
//Constructor
Square(int StartX, int StartY, int StartWidth, int StartHeight) {
x = StartX;
y = StartY;
Width = StartWidth;
Height = StartHeight;
left = x - Width/2;
right = x + Width/2;
top = y - Height/2;
bottom = y + Height/2;
}
void create() {
rect(x, y, Width, Height);
}
//provide collision with player
void playerCollide(Player ply) {
if (ply.top <= bottom &&
ply.bottom >= top &&
ply.right >= left &&
ply.left <= left) {
ply.MoveRight = false;
ply.x = left - 150;
}
}
}
I wrote the following code.
int[] tester = new int[10];
int index;
String output = new String();
int width = 20;
size (1000, 1000);
println("start");
println("start" + 10);
void drawRedCircle(float circleX, float circleY, float circleDiameter) {
fill(255, 0, 0);
ellipse(circleX, circleY, circleDiameter, circleDiameter);
}
for (index = 0; index<10; index++){
int randN = int(random(10, 30));
if(index >= 2){
output = output.concat("this is the " + (index+1) + "th random number: " + randN);
}
else if (index == 1){
output = output.concat("this is the " + (index+1) + "nd random number: " + randN);
}
else if (index == 0){
output = output.concat("this is the " + (index+1) + "st random number: " + randN);
}
println(output);
rect((100+index*width), 100, width, (10*randN));
output = "";
}
I'm getting the following error:
Syntax Error - Missing operator, semicolon, or ‘}’ near ‘drawRedCircle’?
The thing is that if I take the drawRedCircle function out and put it in its own file no errors are thrown, it only happens if I keep it. If I move above the size function, like this
int[] tester = new int[10];
int index;
String output = new String();
int width = 20;
void drawRedCircle(float circleX, float circleY, float circleDiameter) {
fill(255, 0, 0);
ellipse(circleX, circleY, circleDiameter, circleDiameter);
}
size (1000, 1000);
println("start");
println("start" + 10);
for (index = 0; index<10; index++){
int randN = int(random(10, 30));
if(index >= 2){
output = output.concat("this is the " + (index+1) + "th random number: " + randN);
}
else if (index == 1){
output = output.concat("this is the " + (index+1) + "nd random number: " + randN);
}
else if (index == 0){
output = output.concat("this is the " + (index+1) + "st random number: " + randN);
}
println(output);
rect((100+index*width), 100, width, (10*randN));
output = "";
}
I get a different error:
Syntax Error - Missing operator, semicolon, or ‘}’ near ‘1000’?
So, it's there a structure that needs to be respected, where do I declare functions.
Can someone provide a tutorial or a starting point on how to create animations in this style with Processing? Sorry, I’m new to Processing and currently trying to learn the basics. I would really appreciate a starting point to write code in this direction.
for some context I'm trying to make a chess game in processing that allows you to use a chess engine outside of processing. I'm trying to use read the engines output using read lines then apply the move but when i hit run my sketch dissapears and only shows a blank screen but the move does get printed on the screen.
Hello,
I am going through this tutorial https://www.youtube.com/watch?v=q0DH0BVg-yw&list=LL&index=3 and I have gotten an error despite copying the code exactly. Is it because my computer can compute the complextiy of the program?
The console says;
IndexOutofBoundsException: Index 10 ut of bounds for length 10
Could not run the sketch (Target VM failed to initialie)
For more information, read Help? Troubleshooting.
Many thanks, I am stumped at what it means.
how can i add my audio file to my processing code? i need when i push the button audio starts playing (sorry for my English)
Hi all,
I'm looking to create a rectangle with an infinitely repeating texture (a hash texture so that motion is visible on a flat background). I haven't been able to find any resources on how I might do this. Any suggestions, advice, resources? Thanks for any help you can provide.
Hi, I'm trying to run processing sketches in VS Code, but for some reason I keep running into a strange syntax error whenever I try to run the sketches
I press Ctrl + Shift + B to run the sketch, but then it just writes in the console:
Processing.pde:3:1:3:1: Syntax Error - Missing ô;ö
Any idea on how can I fix it? Thanks in advance!
What the title says, I am new to Linux in general and I need processing for school, i installed it using the instructions on their website and it works, like it does open and runs my programs; but the main issue is that its not detecting .pde files as processing files, its opening it in text editor... how do i make it so any pde files open on processing
processing does not show on the list of open with
Hi everyone!
I was very excited to start trying a few illustrations on p5js. However, being a data scientist and aiming to use OOP, I was hoping to find the python version of processing and continue on experimenting it.
I see that official Processing Python (https://py.processing.org/) doesn't seem to be maintained anymore. Following on this post and this article, I see py5 (https://py5coding.org/) is the new one, and also supports Processing 4, but I was wondering whether this is a separate initiative from individual volunteers (which I highly appreciate and respect!) or it's the official python version of processing.
I really appreciate all those great p5js tutorials, but I do think it will be even more richer if we're able to utilise numpy/pandas and some object oriented programming with python.
Curious to hear group's thoughts.
Hi! I´m creating a simple 2d game as a part of my school project. However i´ve ran into an issue. My obstacles are drawn at correct positions, but they´re constraining the player´s movement at wrong coordinations. When I pause the game, the position of obstacles changes and you can see where they actually are blocking the player. I´ve double checked the positioning and everything, but can´t fix this issue...
Hello,
I have a recursive function that eventually blows out of the integer-range. To deal with that i've thought of using a long instead of an int. However the documentation states that:
"Processing functions don't use this datatype, so while they work in the language, you'll usually have to convert to a int using the (int) syntax before passing into a function."
I don't understand this and find it confusing because wouldn't using an int mean it would be capped at max-integer value again? Because i have a recursive function the result has to be fed in so i guess that is out of the question.
So my question is how would i deal with a recursive function that goes out of the maximum integer range within processing?
A happy new year and thanks for any help!
<Edit> Solved!