# Coding Questions

**URL:** https://discourse.processing.org/c/processing/processing-questions/15.md?page=31

[Latest](https://discourse.processing.org/latest.md) · [Categories](https://discourse.processing.org/categories.md) · [Tags](https://discourse.processing.org/tags.md)

**Page:** 32

---

## [Java Processing find matching text in a table and get the value from next to it](https://discourse.processing.org/t/java-processing-find-matching-text-in-a-table-and-get-the-value-from-next-to-it/36268)

<div class="topic-metadata">

**Author:** [@oZeppy](https://discourse.processing.org/u/oZeppy)\
**Replies:** 2\
**Last updated:** [April 11, 2022, 2:44pm UTC](https://discourse.processing.org/t/java-processing-find-matching-text-in-a-table-and-get-the-value-from-next-to-it/36268 "2022-04-11T14:44:56Z")

</div>

I have a table and am trying to find a specific string within it, once found I’m trying to get a string from next to it. How would I go about doing that?

---

## [I need to make a reset timer in my Tic Tac Toe game](https://discourse.processing.org/t/i-need-to-make-a-reset-timer-in-my-tic-tac-toe-game/36149)

<div class="topic-metadata">

**Author:** [@Mori](https://discourse.processing.org/u/Mori)\
**Replies:** 16\
**Last updated:** [April 10, 2022, 2:40pm UTC](https://discourse.processing.org/t/i-need-to-make-a-reset-timer-in-my-tic-tac-toe-game/36149 "2022-04-10T14:40:34Z")

</div>

homework policy \* asking questions int\[\] Felder = new int\[9\]; int spielerFlag = 0; int x = 0; int y = 0; int win = 0; int tp = 0; boolean reset = false; void setup() { size(displayWidth, displayHeight); strokeWeig…

---

## [Processing equivalent to P5.js "repeat()"](https://discourse.processing.org/t/processing-equivalent-to-p5-js-repeat/36247)

<div class="topic-metadata">

**Author:** [@Taxicletter](https://discourse.processing.org/u/Taxicletter)\
**Replies:** 0\
**Last updated:** [April 10, 2022, 9:56am UTC](https://discourse.processing.org/t/processing-equivalent-to-p5-js-repeat/36247 "2022-04-10T09:56:58Z")

</div>

Hi, On the openprocessing website I see in the p5.js programs “repeat()” where you can call a function and set beginning and end-values for variables and the step with which to increase. I know you can use a for-loop o…

---

## [How do I find the last time a specific string is said in a column of a table?](https://discourse.processing.org/t/how-do-i-find-the-last-time-a-specific-string-is-said-in-a-column-of-a-table/36240)

<div class="topic-metadata">

**Author:** [@oZeppy](https://discourse.processing.org/u/oZeppy)\
**Replies:** 0\
**Last updated:** [April 9, 2022, 9:39pm UTC](https://discourse.processing.org/t/how-do-i-find-the-last-time-a-specific-string-is-said-in-a-column-of-a-table/36240 "2022-04-09T21:39:40Z")

</div>

Hi! I’m working on a large project and have gotten to a stage where I need to find the last time a specific string is stated in a column and get a value in a different cell on the same row. I have some ideas on how to do…

---

## [P5 COLOR GRIDS but how?](https://discourse.processing.org/t/p5-color-grids-but-how/36185)

<div class="topic-metadata">

**Author:** [@FrankyWes](https://discourse.processing.org/u/FrankyWes)\
**Replies:** 3\
**Last updated:** [April 9, 2022, 7:35am UTC](https://discourse.processing.org/t/p5-color-grids-but-how/36185 "2022-04-09T07:35:25Z")

</div>

Hi hello! Recently I coded a grid system to create typography. My question, how can I change the color of individual tiles?? Here’s the code, feel free to play around!! int amount = 10; int\[\]\[\] state = new int\[amount…

---

## [PImage and Image switch](https://discourse.processing.org/t/pimage-and-image-switch/36222)

<div class="topic-metadata">

**Author:** [@Parinaz](https://discourse.processing.org/u/Parinaz)\
**Replies:** 2\
**Last updated:** [April 9, 2022, 5:06am UTC](https://discourse.processing.org/t/pimage-and-image-switch/36222 "2022-04-09T05:06:43Z")

</div>

Dear I want to create an atmosphere to generate an structure by switching colors, I wanted those layers to come in order and make that structure. However, when I press every key I designed In the keyPressed event for …

---

## [Need help making grid move with variable](https://discourse.processing.org/t/need-help-making-grid-move-with-variable/36225)

<div class="topic-metadata">

**Author:** [@Voleia](https://discourse.processing.org/u/Voleia)\
**Replies:** 0\
**Last updated:** [April 9, 2022, 2:55am UTC](https://discourse.processing.org/t/need-help-making-grid-move-with-variable/36225 "2022-04-09T02:55:47Z")

</div>

Hello! First of all, I’m new to processing and haven’t done much coding of any sort in a while. I feel like this should be really easy, but I’m having trouble for some reason. I’m trying to create a small game. I have va…

---

## [Dividing a grid into sections using noise](https://discourse.processing.org/t/dividing-a-grid-into-sections-using-noise/36127)

<div class="topic-metadata">

**Author:** [@Namrad](https://discourse.processing.org/u/Namrad)\
**Replies:** 2\
**Last updated:** [April 8, 2022, 7:15am UTC](https://discourse.processing.org/t/dividing-a-grid-into-sections-using-noise/36127 "2022-04-08T07:15:56Z")

</div>

Hello, I keep coming back to an idea which I don’t know how to implement correctly or approach effectively. I want to use noise to organically/dynamically subdivide a grid into smaller sections, whilst always remaining…

---

## [BMP image to Gcode for plotter : sharing and asking for idea](https://discourse.processing.org/t/bmp-image-to-gcode-for-plotter-sharing-and-asking-for-idea/36162)

<div class="topic-metadata">

**Author:** [@MadSam](https://discourse.processing.org/u/MadSam)\
**Replies:** 3\
**Last updated:** [April 8, 2022, 5:55am UTC](https://discourse.processing.org/t/bmp-image-to-gcode-for-plotter-sharing-and-asking-for-idea/36162 "2022-04-08T05:55:32Z")

</div>

Hi every one, first sorry for my english. Those last days I wrote a code for export a usable Gcode file for pen plotter or laser, from a bitmap black and white image. The point is to find path along black pixel and don’…

---

## [How to add a texture using GLSL shader](https://discourse.processing.org/t/how-to-add-a-texture-using-glsl-shader/36177)

<div class="topic-metadata">

**Author:** [@mxbr632](https://discourse.processing.org/u/mxbr632)\
**Replies:** 0\
**Last updated:** [April 6, 2022, 7:57pm UTC](https://discourse.processing.org/t/how-to-add-a-texture-using-glsl-shader/36177 "2022-04-06T19:57:38Z")

</div>

Hi everyone, Currently I’m trying to realize a pyramid using Ulam spiral (https://youtu.be/a35KWEjRvc0?list=PLRqwX-V7Uu6ZCtELDdShWS5oZSA3z3HsO , adapted in a P3d figure) for the pattern. The pyramid is composed of cubes…

---

## [How can I fill the screen with a given square?](https://discourse.processing.org/t/how-can-i-fill-the-screen-with-a-given-square/19737)

<div class="topic-metadata">

**Author:** [@Tauter](https://discourse.processing.org/u/Tauter)\
**Replies:** 1\
**Last updated:** [April 6, 2022, 1:03pm UTC](https://discourse.processing.org/t/how-can-i-fill-the-screen-with-a-given-square/19737 "2022-04-06T13:03:42Z")

</div>

So at first click nothing happens than, at the second click a square appears from the line of the te two click coordinates, After this i have to fill this square, this is ok I did this. Now how can I fill the screen lik…

---

## [Force draw between mouse/keyboard events](https://discourse.processing.org/t/force-draw-between-mouse-keyboard-events/36130)

<div class="topic-metadata">

**Author:** [@f.damien12](https://discourse.processing.org/u/f.damien12)\
**Replies:** 4\
**Last updated:** [April 6, 2022, 8:45am UTC](https://discourse.processing.org/t/force-draw-between-mouse-keyboard-events/36130 "2022-04-06T08:45:29Z")

</div>

Hello, In my sketch, I do some quite heavy computations on keyboard or mouse events. These computations can take 1s or so to be processed. If I type on the keyboard while the last computation has not ended, immediately…

---

## [Graphs and framerate?](https://discourse.processing.org/t/graphs-and-framerate/36141)

<div class="topic-metadata">

**Author:** [@king\_B99](https://discourse.processing.org/u/king_B99)\
**Replies:** 1\
**Last updated:** [April 5, 2022, 8:00pm UTC](https://discourse.processing.org/t/graphs-and-framerate/36141 "2022-04-05T20:00:08Z")

</div>

How can I make a graph that plots my frame rate? I have the code to make it print on screen but I want to make it into a graph.

---

## [NullPointerException when loading an image](https://discourse.processing.org/t/nullpointerexception-when-loading-an-image/36125)

<div class="topic-metadata">

**Author:** [@Jokpau](https://discourse.processing.org/u/Jokpau)\
**Replies:** 2\
**Last updated:** [April 5, 2022, 11:29am UTC](https://discourse.processing.org/t/nullpointerexception-when-loading-an-image/36125 "2022-04-05T11:29:36Z")

</div>

Hello, I am trying to make a program for which I want to load images with an array. I tried a few variants, but they return a null pointer exception when ran. This is the main code of the program: AllBlocks allBlocks; …

---

## [Speed of ball in this code](https://discourse.processing.org/t/speed-of-ball-in-this-code/36111)

<div class="topic-metadata">

**Author:** [@bonjaminbanjer](https://discourse.processing.org/u/bonjaminbanjer)\
**Replies:** 1\
**Last updated:** [April 4, 2022, 8:18am UTC](https://discourse.processing.org/t/speed-of-ball-in-this-code/36111 "2022-04-04T08:18:41Z")

</div>

please format code with \</\> button \* homework policy \* asking questions \< Ball b; color labcol = color(200, 0, 0); void setup() { size(600, 600); b = new Ball(width /120, height/500, 15); } void draw() { back…

---

## [Irregular shapes collision detection](https://discourse.processing.org/t/irregular-shapes-collision-detection/10743)

<div class="topic-metadata">

**Author:** [@Hiram-Belgium](https://discourse.processing.org/u/Hiram-Belgium)\
**Replies:** 8\
**Last updated:** [April 4, 2022, 7:56pm UTC](https://discourse.processing.org/t/irregular-shapes-collision-detection/10743 "2022-04-04T19:56:03Z")

</div>

Hello… sorry for my very bad english! I am looking for a method to determine if there are collision between 2 irregular shapes . In the idea of the circle packing but with random shapes ! Thank you for directing my resea…

---

## [Making a labyrinth](https://discourse.processing.org/t/making-a-labyrinth/6869)

<div class="topic-metadata">

**Author:** [@singenya](https://discourse.processing.org/u/singenya)\
**Replies:** 6\
**Last updated:** [April 4, 2022, 8:20am UTC](https://discourse.processing.org/t/making-a-labyrinth/6869 "2022-04-04T08:20:52Z")

</div>

hello i need help in order to make a labyrinth I have already done all the part to make the ellipse move, now I want to create the labyrinth itself and i have 2 ideas : making a labyrinth with some lines or rect Or addi…

---

## [RGB values of screen pixels (not from a loaded image)](https://discourse.processing.org/t/rgb-values-of-screen-pixels-not-from-a-loaded-image/36078)

<div class="topic-metadata">

**Author:** [@ChrisR](https://discourse.processing.org/u/ChrisR)\
**Replies:** 3\
**Last updated:** [April 2, 2022, 8:36pm UTC](https://discourse.processing.org/t/rgb-values-of-screen-pixels-not-from-a-loaded-image/36078 "2022-04-02T20:36:12Z")

</div>

Hi, I want to capture and store the RGB values from an area of pixels anywhere on the screen (- not from a preloaded image - but of the screen) and that’s where I’m stumbling. As all the examples I’ve seen, first load an…

---

## [Pure Java random string code to Processing random string code](https://discourse.processing.org/t/pure-java-random-string-code-to-processing-random-string-code/36072)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 4\
**Last updated:** [April 2, 2022, 1:56pm UTC](https://discourse.processing.org/t/pure-java-random-string-code-to-processing-random-string-code/36072 "2022-04-02T13:56:10Z")

</div>

how do I make this program in processing rather than pure java? // Java program generate a random AlphaNumeric String // using Math.random() method public class RandomString { // function to generate a ran…

---

## [Creating a Gauge Bar with percentage](https://discourse.processing.org/t/creating-a-gauge-bar-with-percentage/36032)

<div class="topic-metadata">

**Author:** [@KingKvn](https://discourse.processing.org/u/KingKvn)\
**Replies:** 6\
**Last updated:** [April 2, 2022, 9:59am UTC](https://discourse.processing.org/t/creating-a-gauge-bar-with-percentage/36032 "2022-04-02T09:59:04Z")

</div>

Good day, I’ve been given an assignment to code a program that requires me to create 4 Leds that change to 2 different colors depending on which mouse button is pressed. If the right mouse button is pressed, the gauge ba…

---

## [Accessing pixel array of PGraphics buffer is very slow if P3D render used](https://discourse.processing.org/t/accessing-pixel-array-of-pgraphics-buffer-is-very-slow-if-p3d-render-used/36034)

<div class="topic-metadata">

**Author:** [@arcadeperfect](https://discourse.processing.org/u/arcadeperfect)\
**Replies:** 2\
**Last updated:** [April 1, 2022, 8:43am UTC](https://discourse.processing.org/t/accessing-pixel-array-of-pgraphics-buffer-is-very-slow-if-p3d-render-used/36034 "2022-04-01T08:43:02Z")

</div>

Hi Trying to display PGraphics buffer as ascii characters. The method is to render things to a PGraphics buffer, then iterate through the pixels manually and map them to ascii characters. It works fine when the PGraphi…

---

## [Load only first line of file](https://discourse.processing.org/t/load-only-first-line-of-file/36058)

<div class="topic-metadata">

**Author:** [@ybr](https://discourse.processing.org/u/ybr)\
**Replies:** 2\
**Last updated:** [March 31, 2022, 8:39pm UTC](https://discourse.processing.org/t/load-only-first-line-of-file/36058 "2022-03-31T20:39:57Z")

</div>

Hi! I have a large CSV file and loading using loadTable() takes a lot of time. For my application, at first I only need the first line of the file. Is there a way to quickly load the first line of the file without loadi…

---

## [How to upload best quality MP4 to Twitter using ScreenToGif?](https://discourse.processing.org/t/how-to-upload-best-quality-mp4-to-twitter-using-screentogif/36002)

<div class="topic-metadata">

**Author:** [@animanoir](https://discourse.processing.org/u/animanoir)\
**Replies:** 3\
**Last updated:** [March 30, 2022, 5:44am UTC](https://discourse.processing.org/t/how-to-upload-best-quality-mp4-to-twitter-using-screentogif/36002 "2022-03-30T05:44:24Z")

</div>

I´ve been using this awesome tool https://www.screentogif.com/ and it has a lot of configurations which I don’t really know how to mangle with. I wish to upload great quality stuff to Twitter, but it always compresses a…

---

## [Function triggering events with time and phase offset PAYABLE WORK POSSIBLE](https://discourse.processing.org/t/function-triggering-events-with-time-and-phase-offset-payable-work-possible/35954)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 4\
**Last updated:** [March 29, 2022, 11:51am UTC](https://discourse.processing.org/t/function-triggering-events-with-time-and-phase-offset-payable-work-possible/35954 "2022-03-29T11:51:24Z")

</div>

Hi everyones! I’m trying to make a sort of ‘follow mode’ of a point rotating . One point follows the point rotating and an other point follows the point following the rotating point. I would like that thoses points n+1 …

---

## [How to move two multiple shapes as one with keys](https://discourse.processing.org/t/how-to-move-two-multiple-shapes-as-one-with-keys/35995)

<div class="topic-metadata">

**Author:** [@tojifan](https://discourse.processing.org/u/tojifan)\
**Replies:** 4\
**Last updated:** [March 29, 2022, 10:34am UTC](https://discourse.processing.org/t/how-to-move-two-multiple-shapes-as-one-with-keys/35995 "2022-03-29T10:34:09Z")

</div>

Does anyone know how to move multiple shapes as one? Like how you can move a circle with W,A,S,D or arrow keys and make it move up, down, left and right, how can this be done for lets say two rectangles that are ontop of…

---

## [ASCII art animations](https://discourse.processing.org/t/ascii-art-animations/35988)

<div class="topic-metadata">

**Author:** [@arcadeperfect](https://discourse.processing.org/u/arcadeperfect)\
**Replies:** 1\
**Last updated:** [March 29, 2022, 4:15am UTC](https://discourse.processing.org/t/ascii-art-animations/35988 "2022-03-29T04:15:04Z")

</div>

Hi I’d like to try to create something along the lines of the super dope ascii animations of Andreas Gysin and others: I believe the method he uses is to hand select a set of characters in increasing visual density a…

---

## [\[JAVA\] Remove background and record screen through chroma key](https://discourse.processing.org/t/java-remove-background-and-record-screen-through-chroma-key/35912)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 6\
**Last updated:** [March 28, 2022, 10:19pm UTC](https://discourse.processing.org/t/java-remove-background-and-record-screen-through-chroma-key/35912 "2022-03-28T22:19:39Z")

</div>

Is it possible to remove the picture background(ex. green color) through the chroma key technique? (Is there a library or an easy workaround?) / (ex. Chromakey) I want to record the screen after removing the back…

---

## [Trouble with creating two player game](https://discourse.processing.org/t/trouble-with-creating-two-player-game/35968)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.processing.org/u/mary)\
**Replies:** 0\
**Last updated:** [March 27, 2022, 9:04pm UTC](https://discourse.processing.org/t/trouble-with-creating-two-player-game/35968 "2022-03-27T21:04:58Z")

</div>

Hello. I’m writing a two-player game and I’m hitting a lot of roadblocks. (I’m a complete beginner). I’m having trouble making classes since I trip up on the basics. I don’t know how to create limits(with if statements)…

---

## [How to make FrameRate faster](https://discourse.processing.org/t/how-to-make-framerate-faster/35790)

<div class="topic-metadata">

**Author:** [@WhiteRose](https://discourse.processing.org/u/WhiteRose)\
**Replies:** 3\
**Last updated:** [March 27, 2022, 7:54pm UTC](https://discourse.processing.org/t/how-to-make-framerate-faster/35790 "2022-03-27T19:54:18Z")

</div>

Hello is there way to get more than 60fps

---

## [Random functionality with SVG PShapes](https://discourse.processing.org/t/random-functionality-with-svg-pshapes/35950)

<div class="topic-metadata">

**Author:** [@MrGrizzler](https://discourse.processing.org/u/MrGrizzler)\
**Replies:** 1\
**Last updated:** [March 26, 2022, 11:43am UTC](https://discourse.processing.org/t/random-functionality-with-svg-pshapes/35950 "2022-03-26T11:43:48Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hi all, I’m trying to import multiple SVG objects and display these at random locations, random scales, also using random colours from a defined…

[Previous page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=30)

[Next page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=32)
