# Coding Questions

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

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

**Page:** 148

---

## [RuntimeException](https://discourse.processing.org/t/runtimeexception/9219)

<div class="topic-metadata">

**Author:** [@WowMG](https://discourse.processing.org/u/WowMG)\
**Replies:** 1\
**Last updated:** [March 12, 2019, 7:22am UTC](https://discourse.processing.org/t/runtimeexception/9219 "2019-03-12T07:22:06Z")

</div>

Hi, I’m getting this error. Can anyone tell me what it means? RuntimeException: Expected a ',' or '}'

---

## [Help with my homework!](https://discourse.processing.org/t/help-with-my-homework/9211)

<div class="topic-metadata">

**Author:** [@xlotg](https://discourse.processing.org/u/xlotg)\
**Replies:** 1\
**Last updated:** [March 12, 2019, 1:56am UTC](https://discourse.processing.org/t/help-with-my-homework/9211 "2019-03-12T01:56:46Z")

</div>

I have to create a game where “balloons” float up the screen and when you click them they disappear. I’m having trouble making them disappear on mouse press and don’t know how to do this. Keep it simple please! Balloon\[…

---

## [Steering Behaviors - Obstacle Avoidance](https://discourse.processing.org/t/steering-behaviors-obstacle-avoidance/3899)

<div class="topic-metadata">

**Author:** [@Sarah](https://discourse.processing.org/u/Sarah)\
**Replies:** 14\
**Last updated:** [March 11, 2019, 7:32pm UTC](https://discourse.processing.org/t/steering-behaviors-obstacle-avoidance/3899 "2019-03-11T19:32:02Z")

</div>

Hi, Recently I’ve been trying to implement Craig Reynolds steering behaviors into my program, and as I’ve come up to obstacle avoidance, I’ve found it difficult to replicate his example. (Video of what I’m trying to mak…

---

## [Traffic Simulation based on the Wolfram Rule 184](https://discourse.processing.org/t/traffic-simulation-based-on-the-wolfram-rule-184/9109)

<div class="topic-metadata">

**Author:** [@RomanKot](https://discourse.processing.org/u/RomanKot)\
**Replies:** 6\
**Last updated:** [March 11, 2019, 3:12pm UTC](https://discourse.processing.org/t/traffic-simulation-based-on-the-wolfram-rule-184/9109 "2019-03-11T15:12:47Z")

</div>

Why do we need noStroke() here? The code is based on an example from Examples library. Why can I not change the width of rect()? int\[\] cells; int generation; void setup() { size(640, 360); background(255); cells…

---

## [I can't see where i'm missing](https://discourse.processing.org/t/i-cant-see-where-im-missing/9190)

<div class="topic-metadata">

**Author:** [@JoseBri93](https://discourse.processing.org/u/JoseBri93)\
**Replies:** 2\
**Last updated:** [March 11, 2019, 2:36pm UTC](https://discourse.processing.org/t/i-cant-see-where-im-missing/9190 "2019-03-11T14:36:46Z")

</div>

Hi, i’ve got this sketch where i want to create a new circle whenever a mousePressed() event occurs. It’s been fine for me but now i want it to appear whenever my mouse is located so it continues its path and don’t follo…

---

## [Transparent PNG texture tint not working](https://discourse.processing.org/t/transparent-png-texture-tint-not-working/9122)

<div class="topic-metadata">

**Author:** [@sjespers](https://discourse.processing.org/u/sjespers)\
**Replies:** 5\
**Last updated:** [March 11, 2019, 12:00am UTC](https://discourse.processing.org/t/transparent-png-texture-tint-not-working/9122 "2019-03-11T00:00:52Z")

</div>

Hello! Anyone have any idea why some transparent PNGs don’t seem to respond to tint? Example: size(200, 200, P3D); noStroke(); PImage img = loadImage("https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Apple\_lo…

---

## [How to create a point system](https://discourse.processing.org/t/how-to-create-a-point-system/9179)

<div class="topic-metadata">

**Author:** [@deanie](https://discourse.processing.org/u/deanie)\
**Replies:** 8\
**Last updated:** [March 10, 2019, 9:55pm UTC](https://discourse.processing.org/t/how-to-create-a-point-system/9179 "2019-03-10T21:55:37Z")

</div>

Hello all, I am trying to make a simple interactive game in Processing 3. I currently have a class set up to create bubbles on the screen starting at the bottom and slowly floating to the top. I also have the bubbles di…

---

## [Change fill of multiple objects at the same time](https://discourse.processing.org/t/change-fill-of-multiple-objects-at-the-same-time/9048)

<div class="topic-metadata">

**Author:** [@xicolirou](https://discourse.processing.org/u/xicolirou)\
**Replies:** 3\
**Last updated:** [March 10, 2019, 6:23pm UTC](https://discourse.processing.org/t/change-fill-of-multiple-objects-at-the-same-time/9048 "2019-03-10T18:23:18Z")

</div>

Hi guys, im using a variable to loop a robot and i need a especific robot to change its entire color. Do you guys now how to change the fill of multiple objects?

---

## [Problems with rotating rectangles in a grid](https://discourse.processing.org/t/problems-with-rotating-rectangles-in-a-grid/9052)

<div class="topic-metadata">

**Author:** [@hkiri](https://discourse.processing.org/u/hkiri)\
**Replies:** 6\
**Last updated:** [March 10, 2019, 5:54pm UTC](https://discourse.processing.org/t/problems-with-rotating-rectangles-in-a-grid/9052 "2019-03-10T17:54:29Z")

</div>

Hi everyone, I try to create a grid of rectangles which are rotated by 45°. So something like this: But with a rotation of 45° of every rectangle. Whatever I try with “translate” I can’t get them to align back in a…

---

## [Move image around screen](https://discourse.processing.org/t/move-image-around-screen/9066)

<div class="topic-metadata">

**Author:** [@rose](https://discourse.processing.org/u/rose)\
**Replies:** 2\
**Last updated:** [March 10, 2019, 5:49pm UTC](https://discourse.processing.org/t/move-image-around-screen/9066 "2019-03-10T17:49:27Z")

</div>

The first task will be to get the images to appear on the screen and to give the interface a screen size that works with the background image. Once this is complete, try to get the image object to move around the screen…

---

## [Newbie - Trying to make a "Taiko"-like game](https://discourse.processing.org/t/newbie-trying-to-make-a-taiko-like-game/9120)

<div class="topic-metadata">

**Author:** [@Shii](https://discourse.processing.org/u/Shii)\
**Replies:** 3\
**Last updated:** [March 10, 2019, 5:41pm UTC](https://discourse.processing.org/t/newbie-trying-to-make-a-taiko-like-game/9120 "2019-03-10T17:41:41Z")

</div>

Hi, I started Processing recently, and I’m trying to make a project for school, but I’m stuck. (Before start to explain, I’m sorry for the possible mistakes I could make, I’m not english) Well, I assume you know what “…

---

## [Vertex skew by angle?](https://discourse.processing.org/t/vertex-skew-by-angle/8986)

<div class="topic-metadata">

**Author:** [@sjespers](https://discourse.processing.org/u/sjespers)\
**Replies:** 8\
**Last updated:** [March 10, 2019, 5:10pm UTC](https://discourse.processing.org/t/vertex-skew-by-angle/8986 "2019-03-10T17:10:03Z")

</div>

Hi there, I have a square vertex that I want to skew by a certain angle. I know how to get the angle between two points but how do I find the position of my vertex points based on a set angle? The angle between the top…

---

## [Rect collision problem](https://discourse.processing.org/t/rect-collision-problem/9073)

<div class="topic-metadata">

**Author:** [@tobbykan](https://discourse.processing.org/u/tobbykan)\
**Replies:** 1\
**Last updated:** [March 10, 2019, 3:50am UTC](https://discourse.processing.org/t/rect-collision-problem/9073 "2019-03-10T03:50:38Z")

</div>

Halo everyone. I am quite a newbie in processing. Recently I am working on a project on rect moving around the screen and collision detection. Here is the script I found on a text book. It works perfectly. // Rotating S…

---

## [Problems writing to a binary file](https://discourse.processing.org/t/problems-writing-to-a-binary-file/9158)

<div class="topic-metadata">

**Author:** [@xR4yd](https://discourse.processing.org/u/xR4yd)\
**Replies:** 1\
**Last updated:** [March 10, 2019, 1:50am UTC](https://discourse.processing.org/t/problems-writing-to-a-binary-file/9158 "2019-03-10T01:50:07Z")

</div>

I have recently been trying to write to a binary file using following code: void exportFile() { PrintWriter outFile; String out = ""; outFile = createWriter(outFileName + ".cgespr"); char c = 0; outFile.print…

---

## [Bezier Curve move weight points](https://discourse.processing.org/t/bezier-curve-move-weight-points/8872)

<div class="topic-metadata">

**Author:** [@ankita](https://discourse.processing.org/u/ankita)\
**Replies:** 2\
**Last updated:** [March 9, 2019, 8:53pm UTC](https://discourse.processing.org/t/bezier-curve-move-weight-points/8872 "2019-03-09T20:53:33Z")

</div>

I have a java code which moves control points (Corner points) according to the mouse movement. I need to modify the code so that it moves the weight points (the points in between the control points) according to the mous…

---

## [Placement of objects next to each other](https://discourse.processing.org/t/placement-of-objects-next-to-each-other/9042)

<div class="topic-metadata">

**Author:** [@AmDiBy](https://discourse.processing.org/u/AmDiBy)\
**Replies:** 4\
**Last updated:** [March 9, 2019, 8:50pm UTC](https://discourse.processing.org/t/placement-of-objects-next-to-each-other/9042 "2019-03-09T20:50:55Z")

</div>

Hi Everyone ! I was wondering if any of you could help me by explaining, how to keep the displacement & rotation of the smileys, but make the top of every 2. row hit the middle of the upper row. See example on my sketc…

---

## [IntList in Processing 3](https://discourse.processing.org/t/intlist-in-processing-3/9075)

<div class="topic-metadata">

**Author:** [@kkxxbdm](https://discourse.processing.org/u/kkxxbdm)\
**Replies:** 2\
**Last updated:** [March 9, 2019, 8:40pm UTC](https://discourse.processing.org/t/intlist-in-processing-3/9075 "2019-03-09T20:40:18Z")

</div>

I encounter this piece of code. int totalSeconds; Table tripTable; // Table in Processing 3 ArrayList\<Trips\> trips = new ArrayList\<Trips\>(); /// an array which can grow and shrink as needed ArrayList\<String\> opera…

---

## [Why this would draw the trip?](https://discourse.processing.org/t/why-this-would-draw-the-trip/9086)

<div class="topic-metadata">

**Author:** [@kkxxbdm](https://discourse.processing.org/u/kkxxbdm)\
**Replies:** 3\
**Last updated:** [March 7, 2019, 5:36pm UTC](https://discourse.processing.org/t/why-this-would-draw-the-trip/9086 "2019-03-07T17:36:47Z")

</div>

I’m reading the following class class Trips { int tripFrames; int startFrame; int endFrame; Location start; Location end; Location currentLocation; ScreenPosition currentPosition; int s; float bearing; float …

---

## [Display full text string without overlap](https://discourse.processing.org/t/display-full-text-string-without-overlap/8946)

<div class="topic-metadata">

**Author:** [@jacobo](https://discourse.processing.org/u/jacobo)\
**Replies:** 12\
**Last updated:** [March 9, 2019, 2:18pm UTC](https://discourse.processing.org/t/display-full-text-string-without-overlap/8946 "2019-03-09T14:18:09Z")

</div>

Hi guys. My string of text overlaps itself instead of filling the x1, y1, x,2 and y,2 area. What is going on? size(700, 1000); String \[\] words2 = loadStrings("byer2.txt"); for ( int k = 0; k \< words2.length; k++) {…

---

## [Array and dist();](https://discourse.processing.org/t/array-and-dist/9150)

<div class="topic-metadata">

**Author:** [@mone](https://discourse.processing.org/u/mone)\
**Replies:** 2\
**Last updated:** [March 9, 2019, 12:55pm UTC](https://discourse.processing.org/t/array-and-dist/9150 "2019-03-09T12:55:18Z")

</div>

I did 2 Arrays of floats to make X and Y positions for a collision system that uses dist(); but I dont know how to put the arrays information on it. The function must work for 15 ellipses that are not implementated but …

---

## [PShape translate xyz](https://discourse.processing.org/t/pshape-translate-xyz/8914)

<div class="topic-metadata">

**Author:** [@coco](https://discourse.processing.org/u/coco)\
**Replies:** 6\
**Last updated:** [March 9, 2019, 9:51am UTC](https://discourse.processing.org/t/pshape-translate-xyz/8914 "2019-03-09T09:51:49Z")

</div>

I am desperately trying to find a workaround for a problem I’ve had for quite a while now with a PShape group (thisModel) that has 60000 BOX PShapes in it in retained mode. When I translate each BOX the program is very s…

---

## [\[SOLVED\] Path to file in createWriter?](https://discourse.processing.org/t/solved-path-to-file-in-createwriter/8940)

<div class="topic-metadata">

**Author:** [@WyattStorch](https://discourse.processing.org/u/WyattStorch)\
**Replies:** 14\
**Last updated:** [March 9, 2019, 1:22am UTC](https://discourse.processing.org/t/solved-path-to-file-in-createwriter/8940 "2019-03-09T01:22:08Z")

</div>

Why am I getting this error and how do I fix it? I spent hours searching and am having little luck except discovering that file I/O is, ummm, problematic for beginners in Java. I am experimenting with Processing 3.5.3 i…

---

## [Text on a sphere](https://discourse.processing.org/t/text-on-a-sphere/8960)

<div class="topic-metadata">

**Author:** [@MathFinsen](https://discourse.processing.org/u/MathFinsen)\
**Replies:** 9\
**Last updated:** [March 9, 2019, 1:14am UTC](https://discourse.processing.org/t/text-on-a-sphere/8960 "2019-03-09T01:14:57Z")

</div>

Hi guys I would like to know how I wrap text around sphere shape that I can rotate? I’m asking for a similar look as www.spacetypegenerator.com If any of you can guide me in the right direction, I would be great full! …

---

## [Newbie- Trying to create a basic point and click map](https://discourse.processing.org/t/newbie-trying-to-create-a-basic-point-and-click-map/8963)

<div class="topic-metadata">

**Author:** [@sad-ghosts](https://discourse.processing.org/u/sad-ghosts)\
**Replies:** 3\
**Last updated:** [March 8, 2019, 12:03am UTC](https://discourse.processing.org/t/newbie-trying-to-create-a-basic-point-and-click-map/8963 "2019-03-08T00:03:26Z")

</div>

Hey guys, new to the game and I’m working on a project. It’s a UFO data map Ideally, you point and click on each ufo picture representing a different county, and a mass of circles representing the amount of reported …

---

## [Rotating a Sphere Not on its Axis](https://discourse.processing.org/t/rotating-a-sphere-not-on-its-axis/8968)

<div class="topic-metadata">

**Author:** [@drbme](https://discourse.processing.org/u/drbme)\
**Replies:** 2\
**Last updated:** [March 7, 2019, 10:54pm UTC](https://discourse.processing.org/t/rotating-a-sphere-not-on-its-axis/8968 "2019-03-07T22:54:03Z")

</div>

I’m trying to rotate a sphere around another sphere using PShapes, translate and rotate, but I can’t figure out how to do it since the sphere automatically draws at 0,0,0 and as such I can only get it to rotate around it…

---

## [What does the blend modes refer to?](https://discourse.processing.org/t/what-does-the-blend-modes-refer-to/7211)

<div class="topic-metadata">

**Author:** [@davidjj](https://discourse.processing.org/u/davidjj)\
**Replies:** 8\
**Last updated:** [March 7, 2019, 9:28pm UTC](https://discourse.processing.org/t/what-does-the-blend-modes-refer-to/7211 "2019-03-07T21:28:26Z")

</div>

When using image.blend() there is a list of Blend modes: BLEND, DARKEST, LIGHTEST, DIFFERENCE, MULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD\_LIGHT, SOFT\_LIGHT, DODGE, BURN, ADD or NORMAL. And these all constants d…

---

## [Grid of points with perlin noise](https://discourse.processing.org/t/grid-of-points-with-perlin-noise/8923)

<div class="topic-metadata">

**Author:** [@madsogstrup](https://discourse.processing.org/u/madsogstrup)\
**Replies:** 6\
**Last updated:** [March 7, 2019, 8:54pm UTC](https://discourse.processing.org/t/grid-of-points-with-perlin-noise/8923 "2019-03-07T20:54:58Z")

</div>

Hello! I’ve recently taken up processing as part of a school project, and I was wondering if anyone would be able to help me explaining how this instagram post was done. As the artist writes: it’s a grid of points, ap…

---

## [Programme space invadors](https://discourse.processing.org/t/programme-space-invadors/8910)

<div class="topic-metadata">

**Author:** [@carotte](https://discourse.processing.org/u/carotte)\
**Replies:** 1\
**Last updated:** [March 7, 2019, 6:27pm UTC](https://discourse.processing.org/t/programme-space-invadors/8910 "2019-03-07T18:27:48Z")

</div>

bonsoir, je débute dans la programation avec processing et je suis dans la conception d’un programme copiant le jeu space invadors. voici mon début de codage. si quelqu’un pouvait me venir en aide pour terminer ce proje…

---

## [Animate text opacity in a text String](https://discourse.processing.org/t/animate-text-opacity-in-a-text-string/9025)

<div class="topic-metadata">

**Author:** [@jacobo](https://discourse.processing.org/u/jacobo)\
**Replies:** 10\
**Last updated:** [March 7, 2019, 6:27pm UTC](https://discourse.processing.org/t/animate-text-opacity-in-a-text-string/9025 "2019-03-07T18:27:09Z")

</div>

Hi everyone. I have this class with a lot of cities. I want each city to have it’s opacity/alpha value be random and go between 0-255, kind of like a pulsing effect. I’ve tried with if() statements but its not quite the…

---

## [Text bounce bounding box?](https://discourse.processing.org/t/text-bounce-bounding-box/9070)

<div class="topic-metadata">

**Author:** [@piet7](https://discourse.processing.org/u/piet7)\
**Replies:** 10\
**Last updated:** [March 7, 2019, 5:40pm UTC](https://discourse.processing.org/t/text-bounce-bounding-box/9070 "2019-03-07T17:40:19Z")

</div>

Hello all. Is it possible to make a bounding box around your text, so when it hits the right side it won’t go beyond the width of my work area? I could minus the text width from the xPos, but that would have to make the …

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

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