Questions tagged [processing]

Processing is an open source programming language and environment for people who want to create images, animations, interactions, and games.

The processing tag is misleading and leads to misunderstandings and even closure votes, because of the seemingly missing language tag. It is strongly recommended to tag questions additionally with a language tag.

But note Processing is not the same as Java.

Processing refers to the language built on top of Java and the minimal IDE it ships with. It is free and open-source, runs on Linux, Mac OS X, and Windows, and can output for screens, print, 3D packages and CNC printing.

The language simplifies a lot of complex concepts and eases the entry of designers, artists and non-programmers to the world of programming.

Over the years it was used to produce a number of astonishing projects ranging from data visualization, to physical computing , games, 3D, sound, live performance, and more.

Due to its vibrant community, Processing not only enjoys a contribution of over 100 libraries, but it is also present on major mobile platforms, such as Android and iOS.

There are online communities for sharing Processing content, like OpenProcessing.

Some websites even allow users to learn and use Processing directly in the browser, like the Flash-driven SketchPatch and the JavaScript-driven Sketchpad and p5.js (pure JavaScript).

There are also Processing ports to the following languages:

Advanced users are not constrained to the Processing IDE; sketches can be run from the command line, and projects can be set up to build and run directly from editors:

6836 questions
1
vote
1 answer

Counting transparent pixels in png through Processing

Im trying to get the amount of pixels that is transparent in a png through Processing by using the get() command or img.get(). I've tried putting a white background and use this code but the output isn't near what it should be for the picture I test…
1
vote
1 answer

In Processing 4, how do I make a ball sprite have a random chance to bounce left or right off a platform

I have a ball sprite and I need it to have a 50/50 chance to bounce off a platform sprite. Here is the code: bally=bally+3; ballx=ballx+3; ballx += xspd; bally += yspd; if(bally > 580 && bally <590 && ballx < mouseX+300 && ballx >…
Reed
  • 21
  • 1
1
vote
1 answer

What is `r=r=>` in Processing intended to do in this simulation?

I am trying to understand superficially the syntax in this pretty piece of coding posted…
Antoni Parellada
  • 4,253
  • 6
  • 49
  • 114
1
vote
0 answers

Problems running Processing P2D and P3D in Linux

I’d like to run Processing in an old computer (Acer ES1) with Xubuntu , but while everything seems to work fine, when I run sketches that use P2D or P3D I get the following error: InternalError: XXX0 profile[2]: GL2 -> profileImpl GL3bc !!! not…
pat
  • 111
  • 1
1
vote
1 answer

Trying to rotate shapes based on mouse input in Processing

I’ve successfully created two overlaying stars using multiple triangles. My goal is to be able to drag the mouse and have each star rotate in a different direction (one clockwise and one counterclockwise). However, whenever I try to rotate or…
user15547357
1
vote
1 answer

checking for collision of a rotated shape in p5.js

I am trying to recreate the game duet but I can't figure out how to check collision on an that has been translated and rotated. To rotate my players blue and red ball I translated the object to the center of the screen and then rotated it based on…
1
vote
1 answer

How to more + rotate 180 degree + move a group of shape using Processing?

I'm having this Processing issue where I'm trying to make my ariplane do a 180 turn-over right before it gets to the end of the drawing... It looks fairly simple but I just can't get it to work. Help would be much appreciated. As I have other…
1
vote
0 answers

How to run one default task on all celery workers when they are first initialized

I have multiple celery workers running in separate docker containers. And my broker is rabbitmq My workers have concurrency value of 3. My goal is to run a system monitoring task on all the workers in parallel with other tasks submitted by users.…
1
vote
2 answers

Creating click to start screen for game

I am using Processing to create a basketball game. I have managed to create the basketball game but I want to have a click to start home screen. I have made the graphic for the home screen but I am not sure how to integrate it into the game code.…
1
vote
1 answer

How can I make a grid of tiles (that can be rotated randomly) in processing?

I have the following code in Processing that will produce a grid of randomly selected tiles from loaded files: static int img_count = 6; PImage[] img; void setup() { size(1200, 800); img = new PImage[img_count]; for (int i = 0; i <…
1
vote
2 answers

Is there the ways to forward output from XCode to Processing?

I'm trying out to forward output stream from XCode (v12.4) to Processing (https://processing.org/). My goal is: To draw a simple object in Processing according to my XCode project data. I need to see value of my variable in the Processing. int…
OverFF
  • 31
  • 3
1
vote
1 answer

Processing save table with AM or PM in file name

I have a project where I have data come in via the serial port every 15 minutes. I am using processing to read this data and save it as a CSV. I would like for a new file to be created every 12 hours. However, when the file switches from AM to PM…
1
vote
1 answer

I am trying to make rocket explosion in processing

I'm trying to make the lines around the circle in void explosion to appear when tailY == upHeight. I don't know where to place explosion. Can someone help me with this please? The rocket needs to explode when it reaches certain height. void draw()…
FUT
  • 13
  • 4
1
vote
2 answers

Button for Creative Coding Asteroids project

I'm an undergrad and in one of my classes, we have this assignment to make the Asteroids game (you know, the retro one!) on Processing (which is basically a simplified Javascript program). I have the code for a button: void setup() { size(1280,…
1
vote
0 answers

Displaying iframe in a processing sketch

I want to display dynamic web-content in my Processing sketch and have absolutely zero idea how to do that. Easy part is that it's only an iframe.
szg12345
  • 45
  • 8