I need help understanding how to update my 2008 Processing code to modern standards

Here i got the code of a program i’ve compiled in 2008 for a art project. because of changes in programming en technics, its out of date and doesn’t function any more. I’m going to try and explain what i’ve tried so far, and as i’m a little rusty with coding i could use some help fixing my code.(code below so you can run it and try)

So i loaded my old proccesing file that colapsed prossing al together. then i opened it in plain tezt an loaded that code directly in to a new sketch. and as expected. i get the my first error

“No library found for fullscreen
Libraries must be installed in a folder named ‘libraries’ inside the sketchbook folder (see the Preferences window).
The package “fullscreen” does not exist. You might be missing a library.”

this is true, so i took the old lib file i had and put it in the right directory. then the new error

“Duplicate libraries found for processing.core. in conflict with fullscreen lib. extra libs must be removed for this sketch to work. “

so i removed the fullscreen lib again. and made sure the sketch would not try and load the fullscreen.lib that works bu then a lot of the code is based on this libary. but ok then lets try without all the commands using the code. so in debug it runs down the lines of code not working. so far ok until i get to line 23

“ClassNotFoundException: quicktime.std.StdQTException”

And i get this other erros “arraycopy(video.pixels, backgroundPixels);” on line 42,60,116

and most important on line 73 “int presenceSum = 0;”

this 4 line are important for the programma to do its thing. anyone willing to help me out sorting this mess

/*
program created for art installation using code for lots of source put together
so that we get a full screen video that shows only the difference between now and a random time in the past

Jason van der Woude, Telos productions
/
import fullscreen.
;
import processing.video.*;
int numPixels;
int backgroundPixels;
Capture video;
FullScreen fs;
boolean init = true;
int i = 0;
float target = 0;
void setup() {
size(1920, 1200); //change size to 320 240 if to slow
video = new Capture(this, width, height, 24);
numPixels = video.width * video.height;
// create arry to store background image
backgroundPixels = new int[numPixels];
//make the pixels array available for direct manipulation
loadPixels();
fs = new FullScreen(this);

//enter fullscreen mode;
fs.enter();
noCursor();
}
void draw() {
if(!init)
{
if(video.available())
{
video.loadPixels();
arraycopy(video.pixels, backgroundPixels);
//keyPressed();
init=true;
}
}

if(target==0)
{
target = random(50,10000);

}

i++;
//println(target-i);

if(target<i)
{
video.loadPixels();
arraycopy(video.pixels, backgroundPixels);
//keyPressed();
target = 0;
i = 0;
}

if (video.available()){
video.read();// read a new video frame
video.loadPixels();// make the pixels of video available

//difference between the current frame and the stored background
int presenceSum = 0;

for (int i = 0; i < numPixels; i++){//for each pixel in the video frame
//fetch the current color in that location, and also the color
//of the background in that spot
  color currColor = video.pixels[i];
  color bkgdColor = backgroundPixels[i];

  //extract the red, green and blue components of the current pixel's color
  int currR = (currColor >> 16) & 0xFF;
  int currG = (currColor >> 8) & 0xFF;
  int currB = currColor & 0xFF;

  //extract the red, green and blue components of the background pixel's color
  int bkgdR = (bkgdColor >> 16) & 0xFF;
  int bkgdG = (bkgdColor >> 8) & 0xFF;
  int bkgdB = bkgdColor & 0xFF;

  // computing the difference of the red,green and blue values
  int diffR = abs(currR - bkgdR);
  int diffG = abs(currG - bkgdG);
  int diffB = abs(currB - bkgdB);

  //add these differnce to the runnign tally
  presenceSum += diffR + diffG + diffB;
  //render the differnce image to the screen
  pixels[i] = color(diffR, diffG, diffB);
  //the following line does the same thing much faster but is more technical and 
  //for now only the color blue works
  //pixels[i] = 0xFF000000 | (diffR >> 16) | (diffG >>8) | diffB;
}
updatePixels(); // notify that the pixels[] array has changes
//println(presenceSum); // printout the total amount of movement

}
}

//when key is pressed, capture the background image into backgroundPixels
//buffer by copying each of the current frame’s pixel into it
void keyPressed() {
video.loadPixels();

arraycopy(video.pixels, backgroundPixels);
}
/

Sorry somthing went wrong with adding the ocde to my question

Hello @Telos,

Welcome to the forum.

See:
https://discourse.processing.org/faq#format-your-code

To assist with your code for use with Processing 4.4.10:

fullScreen() / Reference / Processing.org Use this in place of what you have.

arrayCopy() / Reference / Processing.org Your usage is deprecated. Use this version with the uppercase C.

:)