# Coding Questions

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

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

**Page:** 154

---

## [java.lang.RuntimeException: java.lang.OutOfMemoryError: GC overhead limit exceeded](https://discourse.processing.org/t/java-lang-runtimeexception-java-lang-outofmemoryerror-gc-overhead-limit-exceeded/7826)

<div class="topic-metadata">

**Author:** [@mictadlo](https://discourse.processing.org/u/mictadlo)\
**Replies:** 1\
**Last updated:** [January 26, 2019, 3:54am UTC](https://discourse.processing.org/t/java-lang-runtimeexception-java-lang-outofmemoryerror-gc-overhead-limit-exceeded/7826 "2019-01-26T03:54:10Z")

</div>

Hi, I ran MizBee on processing 2 and got the following error: java.lang.RuntimeException: java.lang.OutOfMemoryError: GC overhead limit exceeded at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:5…

---

## [Adding parent class to arraylist with internal function](https://discourse.processing.org/t/adding-parent-class-to-arraylist-with-internal-function/7766)

<div class="topic-metadata">

**Author:** [@Bluu](https://discourse.processing.org/u/Bluu)\
**Replies:** 9\
**Last updated:** [January 25, 2019, 3:51am UTC](https://discourse.processing.org/t/adding-parent-class-to-arraylist-with-internal-function/7766 "2019-01-25T03:51:43Z")

</div>

I’m trying to build a game where you connect different pipes to complete a rube-goldberg machine level, this class is meant to be a connector wire between two blocks. I’m having an issue within the internal findend() fun…

---

## [Processing skips forward and jumps to loop](https://discourse.processing.org/t/processing-skips-forward-and-jumps-to-loop/7169)

<div class="topic-metadata">

**Author:** [@carlijnob](https://discourse.processing.org/u/carlijnob)\
**Replies:** 0\
**Last updated:** [January 4, 2019, 2:56pm UTC](https://discourse.processing.org/t/processing-skips-forward-and-jumps-to-loop/7169 "2019-01-04T14:56:05Z")

</div>

Hello everybody, I am trying to finish the code I wrote together with someone with more experience. Unfortunately, this person is on holiday right now and I cannot find the solution of my problem. The problem is that t…

---

## [Processing memory card game](https://discourse.processing.org/t/processing-memory-card-game/7191)

<div class="topic-metadata">

**Author:** [@roeludh1](https://discourse.processing.org/u/roeludh1)\
**Replies:** 11\
**Last updated:** [January 5, 2019, 11:51am UTC](https://discourse.processing.org/t/processing-memory-card-game/7191 "2019-01-05T11:51:34Z")

</div>

Hi, I have to make this memory card game in processing and Im a little stuck somewhere. I have three screens and on the third screen the game is displayed based on the selected number of cards in the second screen. This…

---

## [\[SOLVED\] How do you individually rotate objects in a grid?](https://discourse.processing.org/t/solved-how-do-you-individually-rotate-objects-in-a-grid/7510)

<div class="topic-metadata">

**Author:** [@Namrad](https://discourse.processing.org/u/Namrad)\
**Replies:** 6\
**Last updated:** [January 23, 2019, 9:07pm UTC](https://discourse.processing.org/t/solved-how-do-you-individually-rotate-objects-in-a-grid/7510 "2019-01-23T21:07:54Z")

</div>

Hello, I’m fairly new to this forum, and a mostly autodidact Processing user and learner. Apologies if I’m not making myself properly clear, or if I’m making rookie formatting mistakes. I have created an array of objec…

---

## [Crazy ball movement and collision](https://discourse.processing.org/t/crazy-ball-movement-and-collision/7777)

<div class="topic-metadata">

**Author:** [@hmilch](https://discourse.processing.org/u/hmilch)\
**Replies:** 3\
**Last updated:** [January 24, 2019, 4:44pm UTC](https://discourse.processing.org/t/crazy-ball-movement-and-collision/7777 "2019-01-24T16:44:06Z")

</div>

Hi, So i’m new to processing and coding as i just started talking a Comp. Sci class this year. Anyways, for the end of the first semester, we were tasked with making a game. Doesn’t matter what kind or how, just as long…

---

## [Adding str() array to a single string](https://discourse.processing.org/t/adding-str-array-to-a-single-string/7762)

<div class="topic-metadata">

**Author:** [@Hieronymus](https://discourse.processing.org/u/Hieronymus)\
**Replies:** 3\
**Last updated:** [January 24, 2019, 3:32pm UTC](https://discourse.processing.org/t/adding-str-array-to-a-single-string/7762 "2019-01-24T15:32:11Z")

</div>

I’m having an array of individual strings. Basically, these are ascii codes converted to a string. a = a counter str(char(txtArray\[a\])) I could add all strings from the array to a single string ‘ab’ like the followin…

---

## [Make the game called Sets](https://discourse.processing.org/t/make-the-game-called-sets/7761)

<div class="topic-metadata">

**Author:** [@henk\_peter](https://discourse.processing.org/u/henk_peter)\
**Replies:** 3\
**Last updated:** [January 24, 2019, 2:25am UTC](https://discourse.processing.org/t/make-the-game-called-sets/7761 "2019-01-24T02:25:36Z")

</div>

Hello, I’m trying to make the game sets This is the game I have 27 cards, which are all diferent by one (or more) of each item: colors: red,blue,green Shape: triangle, square, circle Amout: 1,2,3 I already made ful…

---

## [Position problem](https://discourse.processing.org/t/position-problem/7782)

<div class="topic-metadata">

**Author:** [@vincentstrebelle](https://discourse.processing.org/u/vincentstrebelle)\
**Replies:** 12\
**Last updated:** [January 24, 2019, 10:57am UTC](https://discourse.processing.org/t/position-problem/7782 "2019-01-24T10:57:45Z")

</div>

Hi everyone, i have a problem with my player, i cant find a way to put it properly in my world. For now it spawn in the middle of my screen and so all his coordonates are wrong. here is my World: public class World2 {…

---

## [Draw images (not movie)](https://discourse.processing.org/t/draw-images-not-movie/7740)

<div class="topic-metadata">

**Author:** [@Renaud](https://discourse.processing.org/u/Renaud)\
**Replies:** 3\
**Last updated:** [January 24, 2019, 8:49am UTC](https://discourse.processing.org/t/draw-images-not-movie/7740 "2019-01-24T08:49:23Z")

</div>

Hi everyone, Very easy question I guess… I am new to Processing and am trying the example codes proposed on Processing.org. I have tried the recursive tree which I find very nice. To make it a bit funnier I wanted to …

---

## [Output in Text file or spreadsheet possible with Processing?](https://discourse.processing.org/t/output-in-text-file-or-spreadsheet-possible-with-processing/7249)

<div class="topic-metadata">

**Author:** [@Astrid](https://discourse.processing.org/u/Astrid)\
**Replies:** 9\
**Last updated:** [January 24, 2019, 7:47am UTC](https://discourse.processing.org/t/output-in-text-file-or-spreadsheet-possible-with-processing/7249 "2019-01-24T07:47:23Z")

</div>

Hello dear Processing-Community! I am completely new to Processing as well as relatively new to programming in general. Someone suggested to use Processing for a task I wanted to achieve but now other people are telling…

---

## [Loading on PImage on top of another](https://discourse.processing.org/t/loading-on-pimage-on-top-of-another/7752)

<div class="topic-metadata">

**Author:** [@Cres](https://discourse.processing.org/u/Cres)\
**Replies:** 5\
**Last updated:** [January 24, 2019, 1:35am UTC](https://discourse.processing.org/t/loading-on-pimage-on-top-of-another/7752 "2019-01-24T01:35:26Z")

</div>

Hello I’m trying to load several images into a single PImage object but I’m having issues with transparancy. Rendering the images directly onto the screen goes flawlessly but I’m trying to “buffer” all the layers that m…

---

## [Points appearing "transparent"](https://discourse.processing.org/t/points-appearing-transparent/7729)

<div class="topic-metadata">

**Author:** [@Sarah](https://discourse.processing.org/u/Sarah)\
**Replies:** 3\
**Last updated:** [January 22, 2019, 10:28pm UTC](https://discourse.processing.org/t/points-appearing-transparent/7729 "2019-01-22T22:28:55Z")

</div>

When I’ve tried drawing points using a for loop to cover the screen it doesn’t appear to be completely solid: size(255, 255); noStroke(); fill(255, 0, 0); ellipse(100, 100, 100, 100); for (int i = 0; i \< 255; i++) { …

---

## [How to press space key to toggle doubling the size of the rectangle?](https://discourse.processing.org/t/how-to-press-space-key-to-toggle-doubling-the-size-of-the-rectangle/7746)

<div class="topic-metadata">

**Author:** [@dxh188](https://discourse.processing.org/u/dxh188)\
**Replies:** 1\
**Last updated:** [January 22, 2019, 6:38pm UTC](https://discourse.processing.org/t/how-to-press-space-key-to-toggle-doubling-the-size-of-the-rectangle/7746 "2019-01-22T18:38:23Z")

</div>

float x = 400, y=100; int a=20,b=10; void setup() { size(800, 200); } void draw() { rect(x-10, y-5, a, b); } void keyPressed() { int k=' '; if (keyCode == RIGHT) …

---

## [Using open() in processing 2](https://discourse.processing.org/t/using-open-in-processing-2/7606)

<div class="topic-metadata">

**Author:** [@jeffmarc](https://discourse.processing.org/u/jeffmarc)\
**Replies:** 4\
**Last updated:** [January 22, 2019, 6:19am UTC](https://discourse.processing.org/t/using-open-in-processing-2/7606 "2019-01-22T06:19:13Z")

</div>

I know launch is the new open in 3.0+ but I use open to run .exe 's and everything works fine. I want to rename a file using open and the cmd .exe i tried: open(“rename c:\\path\\file.fil file.bak”) and nothing hap…

---

## [Trying to make a google dinosaur game rip-off?](https://discourse.processing.org/t/trying-to-make-a-google-dinosaur-game-rip-off/5554)

<div class="topic-metadata">

**Author:** [@CyanNi](https://discourse.processing.org/u/CyanNi)\
**Replies:** 7\
**Last updated:** [January 22, 2019, 4:18am UTC](https://discourse.processing.org/t/trying-to-make-a-google-dinosaur-game-rip-off/5554 "2019-01-22T04:18:24Z")

</div>

Well, flappy bun?? The problem I have is that the image instead of going up and down—it stretches… Here’s the code! float bunHeight = 2; float speed = 1; PImage bun; void setup() { size(500,500); bun = loadImage(…

---

## [Need help with collision detection of arrays](https://discourse.processing.org/t/need-help-with-collision-detection-of-arrays/7717)

<div class="topic-metadata">

**Author:** [@squirrel1969](https://discourse.processing.org/u/squirrel1969)\
**Replies:** 3\
**Last updated:** [January 22, 2019, 1:11am UTC](https://discourse.processing.org/t/need-help-with-collision-detection-of-arrays/7717 "2019-01-22T01:11:59Z")

</div>

Hello! I am trying to have a game where you shoot falling balls with a laser. I used an array to make the balls fall, so when I shoot one of the multiple balls they all reset. How do I make it so that you have to shoot …

---

## [HTML SVG Loading](https://discourse.processing.org/t/html-svg-loading/7531)

<div class="topic-metadata">

**Author:** [@Thermacon](https://discourse.processing.org/u/Thermacon)\
**Replies:** 5\
**Last updated:** [January 21, 2019, 11:43pm UTC](https://discourse.processing.org/t/html-svg-loading/7531 "2019-01-21T23:43:19Z")

</div>

I’m not really sure how to explain this, but I’ll give it a shot. I have a URL that has a SVG file on it, and want to load it in and display it in my project. Something like: PShape costume; costume = loadShape("https…

---

## [Fill colors not blending on triangle strip object](https://discourse.processing.org/t/fill-colors-not-blending-on-triangle-strip-object/7565)

<div class="topic-metadata">

**Author:** [@Birb](https://discourse.processing.org/u/Birb)\
**Replies:** 3\
**Last updated:** [January 21, 2019, 11:28pm UTC](https://discourse.processing.org/t/fill-colors-not-blending-on-triangle-strip-object/7565 "2019-01-21T23:28:05Z")

</div>

In order to draw multiple rows of triangle strips (for terrain), either they need to be looped, in which case it glitches by drawing a line from the end of one row to the beginning of the next, or begin shape needs to be…

---

## [How should i begin with color detection in my maze game](https://discourse.processing.org/t/how-should-i-begin-with-color-detection-in-my-maze-game/7713)

<div class="topic-metadata">

**Author:** [@Nolan](https://discourse.processing.org/u/Nolan)\
**Replies:** 2\
**Last updated:** [January 21, 2019, 10:52pm UTC](https://discourse.processing.org/t/how-should-i-begin-with-color-detection-in-my-maze-game/7713 "2019-01-21T22:52:51Z")

</div>

PLZ help me i just started with codeing

---

## [Help with some loops and image processing](https://discourse.processing.org/t/help-with-some-loops-and-image-processing/7541)

<div class="topic-metadata">

**Author:** [@annaschimpf](https://discourse.processing.org/u/annaschimpf)\
**Replies:** 2\
**Last updated:** [January 17, 2019, 7:14pm UTC](https://discourse.processing.org/t/help-with-some-loops-and-image-processing/7541 "2019-01-17T19:14:04Z")

</div>

Hello there, I am pretty new to processing and what I am going to ask is probably a little stupid but I just can´t get on without help. I want to write a program to do the following: Take a lot of pictures “cut out” …

---

## [How to calculate two different mean values with the same function](https://discourse.processing.org/t/how-to-calculate-two-different-mean-values-with-the-same-function/7647)

<div class="topic-metadata">

**Author:** [@thatone](https://discourse.processing.org/u/thatone)\
**Replies:** 7\
**Last updated:** [January 21, 2019, 4:31pm UTC](https://discourse.processing.org/t/how-to-calculate-two-different-mean-values-with-the-same-function/7647 "2019-01-21T16:31:49Z")

</div>

Hello, I’m a bit in a problem. I’m supposed to get this function to work for the followings array, but I only get it to work it one. Perhaps I’m not thinking right, or it’s easier than I’m trying to it to be. Anyone tha…

---

## [Passing arguments to exported application](https://discourse.processing.org/t/passing-arguments-to-exported-application/7097)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 4\
**Last updated:** [January 21, 2019, 2:14pm UTC](https://discourse.processing.org/t/passing-arguments-to-exported-application/7097 "2019-01-21T14:14:00Z")

</div>

How can I pass arguments to an exported application on OSX? This is my sketch: void setup() { size(500, 500); } void draw() { background(0); fill(255); if (args != null) { for (String s : args) { tex…

---

## [Make array length random](https://discourse.processing.org/t/make-array-length-random/7680)

<div class="topic-metadata">

**Author:** [@squirrel1969](https://discourse.processing.org/u/squirrel1969)\
**Replies:** 3\
**Last updated:** [January 20, 2019, 8:33pm UTC](https://discourse.processing.org/t/make-array-length-random/7680 "2019-01-20T20:33:50Z")

</div>

I have these worm things which are just a bunch of circles in a line that are falling down the screen and want to make it so that every time they go off screen they reset back to zero with a different amount of circles, …

---

## [Virtual dice roll around many times then stop](https://discourse.processing.org/t/virtual-dice-roll-around-many-times-then-stop/7608)

<div class="topic-metadata">

**Author:** [@Captainsparkles](https://discourse.processing.org/u/Captainsparkles)\
**Replies:** 18\
**Last updated:** [January 20, 2019, 5:34pm UTC](https://discourse.processing.org/t/virtual-dice-roll-around-many-times-then-stop/7608 "2019-01-20T17:34:08Z")

</div>

I can’t figure out the problem as when you press the button it draws 6 circles, but the main point of the program is to make the dice roll around like 7 times slower each time, and then stopping on any side like an actua…

---

## [Weird shifting behavior inside ArrayList - is it a bug?](https://discourse.processing.org/t/weird-shifting-behavior-inside-arraylist-is-it-a-bug/7668)

<div class="topic-metadata">

**Author:** [@FirstFloop](https://discourse.processing.org/u/FirstFloop)\
**Replies:** 3\
**Last updated:** [January 20, 2019, 11:52am UTC](https://discourse.processing.org/t/weird-shifting-behavior-inside-arraylist-is-it-a-bug/7668 "2019-01-20T11:52:47Z")

</div>

To start this question off, here’s the code in question: ArrayList\<Integer\> x = new ArrayList\<Integer\>(); ArrayList\<Integer\> y = new ArrayList\<Integer\>(); Integer posX; Integer posY; Integer posXR; Integer posYR; Intege…

---

## [I need help with bullet direction](https://discourse.processing.org/t/i-need-help-with-bullet-direction/7666)

<div class="topic-metadata">

**Author:** [@vGlint](https://discourse.processing.org/u/vGlint)\
**Replies:** 2\
**Last updated:** [January 20, 2019, 8:38am UTC](https://discourse.processing.org/t/i-need-help-with-bullet-direction/7666 "2019-01-20T08:38:22Z")

</div>

i have made a simple project where a have a player that shoots. i have coded an aimer that gets bigger when you help the mouse down. i need help so the bullets will pick a random direction in the size of my aimer. here i…

---

## [Change color with keyPressed and update color](https://discourse.processing.org/t/change-color-with-keypressed-and-update-color/7645)

<div class="topic-metadata">

**Author:** [@zinni](https://discourse.processing.org/u/zinni)\
**Replies:** 10\
**Last updated:** [January 20, 2019, 3:25am UTC](https://discourse.processing.org/t/change-color-with-keypressed-and-update-color/7645 "2019-01-20T03:25:39Z")

</div>

I just take this example of a particle system: \[https://processing.org/examples/simpleparticlesystem.html\] and made some changes. My goal is to change the colors with keyPressed. With my code the variables of r1,b1,g1…

---

## [Am I dumb or is this a bug?](https://discourse.processing.org/t/am-i-dumb-or-is-this-a-bug/7648)

<div class="topic-metadata">

**Author:** [@Tsskyx](https://discourse.processing.org/u/Tsskyx)\
**Replies:** 7\
**Last updated:** [January 19, 2019, 10:44pm UTC](https://discourse.processing.org/t/am-i-dumb-or-is-this-a-bug/7648 "2019-01-19T22:44:29Z")

</div>

void setup() { } void draw() { fill((frameCount \< 60) ? random(255) : color(255, 0, 0)); rect(0, 0, width, height); fill(color(255, 0, 0)); text("a", width/2, height/2); } By all means of logic the screen shou…

---

## [Problem loading random images and interactivity](https://discourse.processing.org/t/problem-loading-random-images-and-interactivity/7637)

<div class="topic-metadata">

**Author:** [@srushton18](https://discourse.processing.org/u/srushton18)\
**Replies:** 7\
**Last updated:** [January 19, 2019, 1:35pm UTC](https://discourse.processing.org/t/problem-loading-random-images-and-interactivity/7637 "2019-01-19T13:35:31Z")

</div>

Hello! I’m new to Processing but have experience with other bits and bats of coding, but feel I’m really banging my head against the wall here. All I want is to draw a canvas that loads a random background image and ano…

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

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