# Latest

**URL:** https://discourse.processing.org/latest.md?page=495

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

**Page:** 496

---

## [CLOSED - user types "Codes" - special strings, if correct something happens!](https://discourse.processing.org/t/closed-user-types-codes-special-strings-if-correct-something-happens/9605)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 19\
**Last updated:** [April 25, 2019, 7:44am UTC](https://discourse.processing.org/t/closed-user-types-codes-special-strings-if-correct-something-happens/9605 "2019-04-25T07:44:26Z")

</div>

Hey! What do i need to change to get it working? And make it so i can have multiple codes! (i know its just string list, but if u can do it for me :slight\_smile: ) int chr = 0; String code = "a"; String input = ""; in…

---

## [Converting code from processing to p5.js (bouncing balls)](https://discourse.processing.org/t/converting-code-from-processing-to-p5-js-bouncing-balls/10612)

<div class="topic-metadata">

**Author:** [@keshavv\_123](https://discourse.processing.org/u/keshavv_123)\
**Replies:** 11\
**Last updated:** [April 25, 2019, 7:43am UTC](https://discourse.processing.org/t/converting-code-from-processing-to-p5-js-bouncing-balls/10612 "2019-04-25T07:43:22Z")

</div>

I changed a example from processing to p5.js but some part of it did’nt change from me. I’m need your help to convert them. This is the part of the code that I want to convert them in to p5.js. for (let i = balls.le…

---

## [OutOfMemory Error when animating with PGraphic images](https://discourse.processing.org/t/outofmemory-error-when-animating-with-pgraphic-images/10591)

<div class="topic-metadata">

**Author:** [@Aeggy](https://discourse.processing.org/u/Aeggy)\
**Replies:** 12\
**Last updated:** [April 25, 2019, 4:09am UTC](https://discourse.processing.org/t/outofmemory-error-when-animating-with-pgraphic-images/10591 "2019-04-25T04:09:30Z")

</div>

So I’m creating 1000 PGraphic images and want to animate through them. I’m keeping them empty for this example. The problem is I run out of memory before animating through all of them once (as in it stops around the 800 …

---

## [Create your own adventure game -- adding images](https://discourse.processing.org/t/create-your-own-adventure-game-adding-images/10149)

<div class="topic-metadata">

**Author:** [@itejeji21](https://discourse.processing.org/u/itejeji21)\
**Replies:** 12\
**Last updated:** [April 24, 2019, 10:16pm UTC](https://discourse.processing.org/t/create-your-own-adventure-game-adding-images/10149 "2019-04-24T22:16:44Z")

</div>

I was making this choose your own adventure game and couldn’t figure out how to add images correlating to each situation (NOT options). I’m not done with the code, but could someone please help me out. class Pair { St…

---

## [Are methods declared in .pde files implicitly public?](https://discourse.processing.org/t/are-methods-declared-in-pde-files-implicitly-public/10604)

<div class="topic-metadata">

**Author:** [@LoliProcessor](https://discourse.processing.org/u/LoliProcessor)\
**Replies:** 1\
**Last updated:** [April 24, 2019, 8:46pm UTC](https://discourse.processing.org/t/are-methods-declared-in-pde-files-implicitly-public/10604 "2019-04-24T20:46:29Z")

</div>

Was typing a toString method without public modifier, didn’t get an error. That made me wonder if all methods were implicitly public or only the classic override methods of Object for convenience.

---

## [PR Review Request](https://discourse.processing.org/t/pr-review-request/10597)

<div class="topic-metadata">

**Author:** [@deerajtheepshi](https://discourse.processing.org/u/deerajtheepshi)\
**Replies:** 0\
**Last updated:** [April 24, 2019, 3:52pm UTC](https://discourse.processing.org/t/pr-review-request/10597 "2019-04-24T15:52:57Z")

</div>

Hi everyone. So I recently made a PR to the PDE (processing/processing) , regarding an old issue which does not list libraries as installed due to linux’s case sensitive file system. Any review/suggestions on the PR wou…

---

## [Fill color not working](https://discourse.processing.org/t/fill-color-not-working/10600)

<div class="topic-metadata">

**Author:** [@nhurst](https://discourse.processing.org/u/nhurst)\
**Replies:** 2\
**Last updated:** [April 24, 2019, 5:25pm UTC](https://discourse.processing.org/t/fill-color-not-working/10600 "2019-04-24T17:25:14Z")

</div>

Not sure what I expected isn’t happening? The following draws a square, loops, reduces size of square and rotates slightly. Each square should be filled with a color that changes. However, at the end of the program, a…

---

## [Apply color filter to PGraphics](https://discourse.processing.org/t/apply-color-filter-to-pgraphics/10533)

<div class="topic-metadata">

**Author:** [@lu4425](https://discourse.processing.org/u/lu4425)\
**Replies:** 1\
**Last updated:** [April 24, 2019, 4:10pm UTC](https://discourse.processing.org/t/apply-color-filter-to-pgraphics/10533 "2019-04-24T16:10:25Z")

</div>

Help!! I need to assign at least two colors to the “walker” class. Try to draw a PGraphics in grayscale to then assign the colors but I do not know how to continue. How do I draw 2 PGraphics to then assign different col…

---

## [How to make a button have sound](https://discourse.processing.org/t/how-to-make-a-button-have-sound/10576)

<div class="topic-metadata">

**Author:** [@lillexi2u](https://discourse.processing.org/u/lillexi2u)\
**Replies:** 4\
**Last updated:** [April 24, 2019, 12:35pm UTC](https://discourse.processing.org/t/how-to-make-a-button-have-sound/10576 "2019-04-24T12:35:23Z")

</div>

Hi, I’m working on a video game project where I have to incorporate sound, so far I have both of the buttons but cannot figure out how to make each buttons have 3 sets of sounds when clicked on. so far this is all I have…

---

## [Audio Signal still going after AudioSample loop stopped](https://discourse.processing.org/t/audio-signal-still-going-after-audiosample-loop-stopped/10589)

<div class="topic-metadata">

**Author:** [@Aeggy](https://discourse.processing.org/u/Aeggy)\
**Replies:** 2\
**Last updated:** [April 24, 2019, 7:10am UTC](https://discourse.processing.org/t/audio-signal-still-going-after-audiosample-loop-stopped/10589 "2019-04-24T07:10:06Z")

</div>

Here I’m playing a 440Hz sine wave in an audio sample on loop. import processing.sound.\*; AudioSample sample; void setup() { int resolution = 1000; float\[\] sinewave = new float\[resolution\]; for (int i = 0; i \< re…

---

## [Can't seem a way to make game menu for simple gun game](https://discourse.processing.org/t/cant-seem-a-way-to-make-game-menu-for-simple-gun-game/10588)

<div class="topic-metadata">

**Author:** [@Icecrem](https://discourse.processing.org/u/Icecrem)\
**Replies:** 2\
**Last updated:** [April 24, 2019, 5:05am UTC](https://discourse.processing.org/t/cant-seem-a-way-to-make-game-menu-for-simple-gun-game/10588 "2019-04-24T05:05:30Z")

</div>

boolean down=true; boolean up=true; boolean bullet=true; float gunposition=350;//gun position float bulletY=650;//bullet position float bulletX=355;//bullet position float alienX=350;//alien positon float alienY=0;//alie…

---

## [Sprite on pokemon game](https://discourse.processing.org/t/sprite-on-pokemon-game/10369)

<div class="topic-metadata">

**Author:** [@Icecrem](https://discourse.processing.org/u/Icecrem)\
**Replies:** 1\
**Last updated:** [April 17, 2019, 2:50am UTC](https://discourse.processing.org/t/sprite-on-pokemon-game/10369 "2019-04-17T02:50:19Z")

</div>

Hey I am fairly new to processing, and am trying to make a Pokemon game by the things I have learned so far. I am trying to add a sprite to it, so my character gets an animation when walking. Is there any simple possibil…

---

## [Code with lots of images makes sketch slow to load](https://discourse.processing.org/t/code-with-lots-of-images-makes-sketch-slow-to-load/10580)

<div class="topic-metadata">

**Author:** [@l.wright](https://discourse.processing.org/u/l.wright)\
**Replies:** 2\
**Last updated:** [April 24, 2019, 1:11am UTC](https://discourse.processing.org/t/code-with-lots-of-images-makes-sketch-slow-to-load/10580 "2019-04-24T01:11:13Z")

</div>

Hi! I have created a sketch that makes a random image appear upon clicking but it is very slow to load the images. I have decreased the file size on all the images so none of them are particularly large. I have never don…

---

## [Genetic Algorithm used in image aproximation](https://discourse.processing.org/t/genetic-algorithm-used-in-image-aproximation/10585)

<div class="topic-metadata">

**Author:** [@macarrony00](https://discourse.processing.org/u/macarrony00)\
**Replies:** 0\
**Last updated:** [April 23, 2019, 10:46pm UTC](https://discourse.processing.org/t/genetic-algorithm-used-in-image-aproximation/10585 "2019-04-23T22:46:50Z")

</div>

Hello there, here is my new project done with processing. I use a genetic algorithm to aproximate circles, triangles and lines to a target image. Would like to hear some feadback from the comunity. Have fun :wink: …

---

## [Enemy Detection](https://discourse.processing.org/t/enemy-detection/10509)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 9\
**Last updated:** [April 23, 2019, 7:01pm UTC](https://discourse.processing.org/t/enemy-detection/10509 "2019-04-23T19:01:32Z")

</div>

Hey I’m trying to make my first AI game. Is there a way to check to see if any item is within a certain range? I want my AI to only see 8 directions and whatever is in the radius of its x point and the furthest it can se…

---

## [How to control 3D using 2D input elements?](https://discourse.processing.org/t/how-to-control-3d-using-2d-input-elements/10573)

<div class="topic-metadata">

**Author:** [@Oliver](https://discourse.processing.org/u/Oliver)\
**Replies:** 1\
**Last updated:** [April 23, 2019, 6:17pm UTC](https://discourse.processing.org/t/how-to-control-3d-using-2d-input-elements/10573 "2019-04-23T18:17:27Z")

</div>

Hello all! I’m writing a program for visualising data in 3D (using WEBGL) and I would like to control some parameters in the scene with 2D elements like sliders, buttons and text fields. Is there any way one can combine …

---

## [How to handle the undefined](https://discourse.processing.org/t/how-to-handle-the-undefined/10552)

<div class="topic-metadata">

**Author:** [@Aesahaettr](https://discourse.processing.org/u/Aesahaettr)\
**Replies:** 3\
**Last updated:** [April 23, 2019, 5:37pm UTC](https://discourse.processing.org/t/how-to-handle-the-undefined/10552 "2019-04-23T17:37:08Z")

</div>

Hello, I have been strugling with some variables that are the type of undefined. I’ve looked on internet but I found nothing on how to determine if it’s “undefined” like this : if (typeof tmp == "undefined") { tmp =…

---

## [Customizable Multi-sketch processing program?](https://discourse.processing.org/t/customizable-multi-sketch-processing-program/10260)

<div class="topic-metadata">

**Author:** [@stan\_11](https://discourse.processing.org/u/stan_11)\
**Replies:** 9\
**Last updated:** [April 23, 2019, 4:39pm UTC](https://discourse.processing.org/t/customizable-multi-sketch-processing-program/10260 "2019-04-23T16:39:31Z")

</div>

Hi Nice to see you here, it would be great that if you can spare some of your time to help me go through this. I have trouble implementing multiple window application on Processing. Basic Background: I am developing a s…

---

## [Constructors given in Sound Library documentation not working](https://discourse.processing.org/t/constructors-given-in-sound-library-documentation-not-working/10563)

<div class="topic-metadata">

**Author:** [@Aeggy](https://discourse.processing.org/u/Aeggy)\
**Replies:** 7\
**Last updated:** [April 23, 2019, 2:21pm UTC](https://discourse.processing.org/t/constructors-given-in-sound-library-documentation-not-working/10563 "2019-04-23T14:21:46Z")

</div>

Trying to use AudioSample, but I get an error on the constructor from the example given in the documentation. import processing.sound.\*; AudioSample sample; void setup() { size(640, 360); background(255); // C…

---

## [Getting HTML and its info](https://discourse.processing.org/t/getting-html-and-its-info/10546)

<div class="topic-metadata">

**Author:** [@niljon](https://discourse.processing.org/u/niljon)\
**Replies:** 2\
**Last updated:** [April 23, 2019, 2:07pm UTC](https://discourse.processing.org/t/getting-html-and-its-info/10546 "2019-04-23T14:07:54Z")

</div>

Hi all. gonna start with that if there already is a topic about this please redirect me there but i didnt seem to find it by myself. im in need of help with getting information from a website and take out some informat…

---

## [Edge division problem in Growth Algorithm](https://discourse.processing.org/t/edge-division-problem-in-growth-algorithm/10547)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 1\
**Last updated:** [April 23, 2019, 1:24pm UTC](https://discourse.processing.org/t/edge-division-problem-in-growth-algorithm/10547 "2019-04-23T13:24:50Z")

</div>

Dear all, I’m having difficulties implementing with “toxiclibs” a sketch initially relying on the “iGeo” library. The original script is fairly long so I tried to boil it down to its simplest form but its relative comp…

---

## [Trouble with z-index and body](https://discourse.processing.org/t/trouble-with-z-index-and-body/10486)

<div class="topic-metadata">

**Author:** [@Indieminor](https://discourse.processing.org/u/Indieminor)\
**Replies:** 5\
**Last updated:** [April 23, 2019, 1:20pm UTC](https://discourse.processing.org/t/trouble-with-z-index-and-body/10486 "2019-04-23T13:20:48Z")

</div>

Hey all, I am fairly new to programming (3.5 months in) and I came across p5.js and decided to implement it into a little project of mine. My main idea is to have random circles generate on keypress or click with random…

---

## [AI Flappy Bird Processing Java](https://discourse.processing.org/t/ai-flappy-bird-processing-java/10513)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 54\
**Last updated:** [April 23, 2019, 4:29am UTC](https://discourse.processing.org/t/ai-flappy-bird-processing-java/10513 "2019-04-23T04:29:19Z")

</div>

Hi I’m trying to learn to build an AI from the flappy bird video from coding train. I got another game I’m using what I learn on, anyways I reached the part of the video where he saves the bird in js & tried several ways…

---

## [Convert Java code to python code](https://discourse.processing.org/t/convert-java-code-to-python-code/10549)

<div class="topic-metadata">

**Author:** [@aisyah](https://discourse.processing.org/u/aisyah)\
**Replies:** 1\
**Last updated:** [April 23, 2019, 3:29am UTC](https://discourse.processing.org/t/convert-java-code-to-python-code/10549 "2019-04-23T03:29:51Z")

</div>

Hi, i have several java code to build transliteration system that can solve homograph and disambiguation. But i have a problem to convert java code into python code. Im really thankful if you can help me. Here is the cod…

---

## [P5.js Contributor's Conference call for participant nominations!](https://discourse.processing.org/t/p5-js-contributors-conference-call-for-participant-nominations/10553)

<div class="topic-metadata">

**Author:** [@lmccart](https://discourse.processing.org/u/lmccart)\
**Replies:** 0\
**Last updated:** [April 23, 2019, 2:55am UTC](https://discourse.processing.org/t/p5-js-contributors-conference-call-for-participant-nominations/10553 "2019-04-23T02:55:54Z")

</div>

I’m excited to let you know that the 2019 p5.js Contributor’s Conference will be held Aug 13-18 at the CMU Frank-Ratchye STUDIO for Creative Inquiry in Pittsburgh! In the spirit of supporting others, we are calling for p…

---

## [Help: This sketch is attempting too much recursion, but there isn't much recursion](https://discourse.processing.org/t/help-this-sketch-is-attempting-too-much-recursion-but-there-isnt-much-recursion/10499)

<div class="topic-metadata">

**Author:** [@tahtackle](https://discourse.processing.org/u/tahtackle)\
**Replies:** 9\
**Last updated:** [April 22, 2019, 9:17pm UTC](https://discourse.processing.org/t/help-this-sketch-is-attempting-too-much-recursion-but-there-isnt-much-recursion/10499 "2019-04-22T21:17:35Z")

</div>

Hello everyone! I have a problem with my code, and I’m not sure where to start, as the error doesn’t give me much information (or rather, I don’t agree with the error). I have a sketch where I’m using thread() to creat…

---

## [Convert JSON String to JSON Object and Parse all data](https://discourse.processing.org/t/convert-json-string-to-json-object-and-parse-all-data/10407)

<div class="topic-metadata">

**Author:** [@KeremTurkyilmaz](https://discourse.processing.org/u/KeremTurkyilmaz)\
**Replies:** 4\
**Last updated:** [April 22, 2019, 8:14pm UTC](https://discourse.processing.org/t/convert-json-string-to-json-object-and-parse-all-data/10407 "2019-04-22T20:14:55Z")

</div>

Hi, I need to send a nested Json file to a client. The problem is to parse all data properly to recreate the JSON file. I tried some stuff but I don’t think is the right way. WebSocket Server import websockets.\*; imp…

---

## [Using Emoji's on OSX](https://discourse.processing.org/t/using-emojis-on-osx/10349)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 5\
**Last updated:** [April 22, 2019, 5:17pm UTC](https://discourse.processing.org/t/using-emojis-on-osx/10349 "2019-04-22T17:17:59Z")

</div>

Is it possible to make something like this work: void setup() { size(200, 200); char\[\] chars = Character.toChars(128149); textFont(createFont("AppleColorEmoji", 32, true, chars)); textAlign(CENTER, CENTER); te…

---

## [Stamp tool in processing](https://discourse.processing.org/t/stamp-tool-in-processing/10298)

<div class="topic-metadata">

**Author:** [@helen1216](https://discourse.processing.org/u/helen1216)\
**Replies:** 2\
**Last updated:** [April 22, 2019, 5:03pm UTC](https://discourse.processing.org/t/stamp-tool-in-processing/10298 "2019-04-22T17:03:30Z")

</div>

Hi, I want to know if this idea is possible. I am trying to create a random stamping tool if I do a key press. I want to know if it’s possible to create a stamping tool based on newly created image like this. Now, I…

---

## [What sample rate is Ketai audio input?](https://discourse.processing.org/t/what-sample-rate-is-ketai-audio-input/10528)

<div class="topic-metadata">

**Author:** [@T-matsumoto](https://discourse.processing.org/u/T-matsumoto)\
**Replies:** 2\
**Last updated:** [April 22, 2019, 12:36pm UTC](https://discourse.processing.org/t/what-sample-rate-is-ketai-audio-input/10528 "2019-04-22T12:36:30Z")

</div>

I am using ketai audio input on android apps created with processing, but I cannot find its mic sample rate and ketai’s reference is not described. Do you know the mic sample rate or how to find? Thank you.

[Previous page](https://discourse.processing.org/latest.md?page=494)

[Next page](https://discourse.processing.org/latest.md?page=496)
