# Coding Questions

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

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

**Page:** 24

---

## [Can I create new class which is not a inner class but still with the ability to draw shape?](https://discourse.processing.org/t/can-i-create-new-class-which-is-not-a-inner-class-but-still-with-the-ability-to-draw-shape/39244)

<div class="topic-metadata">

**Author:** [@Malloc](https://discourse.processing.org/u/Malloc)\
**Replies:** 5\
**Last updated:** [October 14, 2022, 5:07am UTC](https://discourse.processing.org/t/can-i-create-new-class-which-is-not-a-inner-class-but-still-with-the-ability-to-draw-shape/39244 "2022-10-14T05:07:56Z")

</div>

If we create many class with different function, but all need to draw their shapes. How can we split the new class from the one extends PApplet and still keep the ability to call it’s build in methods? It’s too long to …

---

## [How to create a custom window](https://discourse.processing.org/t/how-to-create-a-custom-window/39254)

<div class="topic-metadata">

**Author:** [@5x9x7x2x7x9](https://discourse.processing.org/u/5x9x7x2x7x9)\
**Replies:** 2\
**Last updated:** [October 13, 2022, 9:58pm UTC](https://discourse.processing.org/t/how-to-create-a-custom-window/39254 "2022-10-13T21:58:06Z")

</div>

Hello, I’ve been wondering how you could create a second window You have the main window which shows the game and then you have the second window with buttons you can press to move the character and do actions

---

## [Hey, i would like to execute a window that has no x minimise and so no buttons on top](https://discourse.processing.org/t/hey-i-would-like-to-execute-a-window-that-has-no-x-minimise-and-so-no-buttons-on-top/39240)

<div class="topic-metadata">

**Author:** [@Lissie](https://discourse.processing.org/u/Lissie)\
**Replies:** 1\
**Last updated:** [October 13, 2022, 12:39pm UTC](https://discourse.processing.org/t/hey-i-would-like-to-execute-a-window-that-has-no-x-minimise-and-so-no-buttons-on-top/39240 "2022-10-13T12:39:25Z")

</div>

I would like to have a window when i start a programm,that closes after like 10 seconds without any exit store down and minimise buttons

---

## [Image flipping for MOBA controls](https://discourse.processing.org/t/image-flipping-for-moba-controls/39207)

<div class="topic-metadata">

**Author:** [@Quesadilla](https://discourse.processing.org/u/Quesadilla)\
**Replies:** 3\
**Last updated:** [October 11, 2022, 3:57pm UTC](https://discourse.processing.org/t/image-flipping-for-moba-controls/39207 "2022-10-11T15:57:23Z")

</div>

Im having trouble moving my character at a constant rate as well, it is decelerating as it moves, any suggestions on moving at a constant rate? //I cant seem to get my image to flip without my controls going haywire, I …

---

## [Reveal Image of the Masking](https://discourse.processing.org/t/reveal-image-of-the-masking/39215)

<div class="topic-metadata">

**Author:** [@Judy](https://discourse.processing.org/u/Judy)\
**Replies:** 5\
**Last updated:** [October 11, 2022, 4:28pm UTC](https://discourse.processing.org/t/reveal-image-of-the-masking/39215 "2022-10-11T16:28:29Z")

</div>

Hello. I want to operate the code like an example image. I want to make a ghost image come out if I wipe it with an eraser on top of an ordinary girl image. But my code doesn’t work that way. How should I change it? L…

---

## [\[SOLVED\] Drawing circles inside a circle (generative dandelion)](https://discourse.processing.org/t/solved-drawing-circles-inside-a-circle-generative-dandelion/39197)

<div class="topic-metadata">

**Author:** [@Ties2901](https://discourse.processing.org/u/Ties2901)\
**Replies:** 20\
**Last updated:** [October 8, 2022, 7:18am UTC](https://discourse.processing.org/t/solved-drawing-circles-inside-a-circle-generative-dandelion/39197 "2022-10-08T07:18:48Z")

</div>

THIS QUESTIONS IS SOLVED! :slight\_smile: Hi I am very new to processing and am trying to do roughly the same \[as this post (mod edit)\], but the resources posted below are not helping me find the solution… I am now draw…

---

## [Image to random circles conversion (PNG Problem) Java](https://discourse.processing.org/t/image-to-random-circles-conversion-png-problem-java/39167)

<div class="topic-metadata">

**Author:** [@Hanna](https://discourse.processing.org/u/Hanna)\
**Replies:** 2\
**Last updated:** [October 8, 2022, 2:41pm UTC](https://discourse.processing.org/t/image-to-random-circles-conversion-png-problem-java/39167 "2022-10-08T14:41:19Z")

</div>

Newbie here! I have been working with some code from the internet and modified it to work from JS into Java. I have actually adapted everything so that the code works on its own. My assumption was that when I use a PNG…

---

## [How can I fill a plane without gaps with regular 4-, 6-, 12-gons](https://discourse.processing.org/t/how-can-i-fill-a-plane-without-gaps-with-regular-4-6-12-gons/39134)

<div class="topic-metadata">

**Author:** [@yura](https://discourse.processing.org/u/yura)\
**Replies:** 1\
**Last updated:** [October 7, 2022, 2:20pm UTC](https://discourse.processing.org/t/how-can-i-fill-a-plane-without-gaps-with-regular-4-6-12-gons/39134 "2022-10-07T14:20:00Z")

</div>

I’m new to processing, and trying to do this task. Maybe you know how to do it, or know where I could read about it. Thanks in advance for help.

---

## [Arrangement of depth of objects](https://discourse.processing.org/t/arrangement-of-depth-of-objects/39129)

<div class="topic-metadata">

**Author:** [@Ties2901](https://discourse.processing.org/u/Ties2901)\
**Replies:** 3\
**Last updated:** [October 7, 2022, 1:00pm UTC](https://discourse.processing.org/t/arrangement-of-depth-of-objects/39129 "2022-10-07T13:00:45Z")

</div>

(This is a question related to a University Assignment!) I am creating a Dandelion in processing for a Creative Programming Challenge. :slight\_smile: Hi all, I have just started with processing and am experiencing some…

---

## [How do I add sprite collision?](https://discourse.processing.org/t/how-do-i-add-sprite-collision/39115)

<div class="topic-metadata">

**Author:** [@Marfmamow](https://discourse.processing.org/u/Marfmamow)\
**Replies:** 3\
**Last updated:** [October 6, 2022, 9:44am UTC](https://discourse.processing.org/t/how-do-i-add-sprite-collision/39115 "2022-10-06T09:44:58Z")

</div>

I’m currently trying to make a 2d game. The game window is 720x660 pixels, and each sprite I have is 20x20 pixels, so the actual grid is 36x33 tiles. The type of tile on the grid is stored in a 36x33 array. I currently…

---

## [Is there an algorithm or coding example that may help me here?](https://discourse.processing.org/t/is-there-an-algorithm-or-coding-example-that-may-help-me-here/39103)

<div class="topic-metadata">

**Author:** [@blackhatProphet](https://discourse.processing.org/u/blackhatProphet)\
**Replies:** 4\
**Last updated:** [October 5, 2022, 10:38pm UTC](https://discourse.processing.org/t/is-there-an-algorithm-or-coding-example-that-may-help-me-here/39103 "2022-10-05T22:38:30Z")

</div>

Hi I am working on a personal project and I was hoping to get some help trying to wrap my head around how best to go about this part of the project. So what I am envisioning: The program is given a string array (comp…

---

## [Precise placement of color in a grid of shapes](https://discourse.processing.org/t/precise-placement-of-color-in-a-grid-of-shapes/39102)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 8\
**Last updated:** [October 5, 2022, 5:34pm UTC](https://discourse.processing.org/t/precise-placement-of-color-in-a-grid-of-shapes/39102 "2022-10-05T17:34:30Z")

</div>

Hello! I am trying to work out how to implement more control of color placement within grid systems. The very simple solution I’ve come up with so far (for one iteration of diagonal color placement) is partially succes…

---

## [How do I change my game map after player reaches a certain tile?](https://discourse.processing.org/t/how-do-i-change-my-game-map-after-player-reaches-a-certain-tile/39067)

<div class="topic-metadata">

**Author:** [@Marfmamow](https://discourse.processing.org/u/Marfmamow)\
**Replies:** 2\
**Last updated:** [October 4, 2022, 2:15pm UTC](https://discourse.processing.org/t/how-do-i-change-my-game-map-after-player-reaches-a-certain-tile/39067 "2022-10-04T14:15:18Z")

</div>

I’m making a 2D game where each level is determined by a config.json file. It contains the level name, and the name of a file called “level1.txt”, “level2.txt” etc. I have a buffered reader that reads the txt file, and p…

---

## [Uploading image, and changing a specific color if it is present](https://discourse.processing.org/t/uploading-image-and-changing-a-specific-color-if-it-is-present/39063)

<div class="topic-metadata">

**Author:** [@blackhatProphet](https://discourse.processing.org/u/blackhatProphet)\
**Replies:** 2\
**Last updated:** [October 3, 2022, 9:53pm UTC](https://discourse.processing.org/t/uploading-image-and-changing-a-specific-color-if-it-is-present/39063 "2022-10-03T21:53:38Z")

</div>

Using the image() function in Processing could I upload an image and then scan to see if, for example, the color yellow (or an rgb spectrum of yellow values?) was present somewhere in this given image and if it was chang…

---

## [How to get a snapshot of a PGraphics "paused" frame and use it as a PImage at a predefined condition in time?](https://discourse.processing.org/t/how-to-get-a-snapshot-of-a-pgraphics-paused-frame-and-use-it-as-a-pimage-at-a-predefined-condition-in-time/38839)

<div class="topic-metadata">

**Author:** [@istinn](https://discourse.processing.org/u/istinn)\
**Replies:** 3\
**Last updated:** [October 3, 2022, 1:14pm UTC](https://discourse.processing.org/t/how-to-get-a-snapshot-of-a-pgraphics-paused-frame-and-use-it-as-a-pimage-at-a-predefined-condition-in-time/38839 "2022-10-03T13:14:13Z")

</div>

If I use static sketches I can create a PImage right away and use it in a PGraphics buffer, then use it as a BufferedImage successfully with getNative(). How do I get a snapshot of this PGraphics buffer in time if I ha…

---

## [Basic Processing question for beginner (circular rays)](https://discourse.processing.org/t/basic-processing-question-for-beginner-circular-rays/39029)

<div class="topic-metadata">

**Author:** [@ghostmane](https://discourse.processing.org/u/ghostmane)\
**Replies:** 2\
**Last updated:** [October 2, 2022, 3:10pm UTC](https://discourse.processing.org/t/basic-processing-question-for-beginner-circular-rays/39029 "2022-10-02T15:10:33Z")

</div>

please format code with \</\> button \* homework policy \* asking questions 지금 이상태인데 저 선들이 한점에서 뻗어나가도록 모션을 넣고싶은데 어떻게 해야하나요? 그리고 모션이 끝난 다음에 이미지들을 넣고 그 위에 그림을 그릴 수 있도록 만들고싶은데 가능한가요? at this moment on the screenshot i …

---

## [Brainstorming: Is this even possible?](https://discourse.processing.org/t/brainstorming-is-this-even-possible/39012)

<div class="topic-metadata">

**Author:** [@cottonchipper](https://discourse.processing.org/u/cottonchipper)\
**Replies:** 3\
**Last updated:** [October 1, 2022, 11:48pm UTC](https://discourse.processing.org/t/brainstorming-is-this-even-possible/39012 "2022-10-01T23:48:42Z")

</div>

Just wondering if there is any way to achieve the following: The sketch creates a grid. A design is drawn inside the first square of the grid. The design is one of a group of designs and randomly assigned to each grid …

---

## [Moving objects using mouse pressed and key pressed](https://discourse.processing.org/t/moving-objects-using-mouse-pressed-and-key-pressed/39035)

<div class="topic-metadata">

**Author:** [@turtle1](https://discourse.processing.org/u/turtle1)\
**Replies:** 2\
**Last updated:** [October 1, 2022, 9:18pm UTC](https://discourse.processing.org/t/moving-objects-using-mouse-pressed-and-key-pressed/39035 "2022-10-01T21:18:17Z")

</div>

Hi, I want to move a square down by 3 pixels using mouse pressed and and 3 pixels up by using key pressed. How would I do this? I’ve already coded the square in the middle of the 100 x 100 canvas.

---

## [Translate, Scale, or Random is causing a display hiccup](https://discourse.processing.org/t/translate-scale-or-random-is-causing-a-display-hiccup/38988)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 10\
**Last updated:** [September 27, 2022, 6:35pm UTC](https://discourse.processing.org/t/translate-scale-or-random-is-causing-a-display-hiccup/38988 "2022-09-27T18:35:47Z")

</div>

Hello!! This is probably a simple oversight but I’m trying to flip the orientation of random blocks in a grid. I have put the random number generator in all possible locations – above setup, in setup, in draw, in neste…

---

## [Get the current instance of PApplet from a library](https://discourse.processing.org/t/get-the-current-instance-of-papplet-from-a-library/36925)

<div class="topic-metadata">

**Author:** [@NumericPrime](https://discourse.processing.org/u/NumericPrime)\
**Replies:** 27\
**Last updated:** [September 25, 2022, 7:36pm UTC](https://discourse.processing.org/t/get-the-current-instance-of-papplet-from-a-library/36925 "2022-09-25T19:36:04Z")

</div>

In the library I’m currently writing I have to give my classes the current instance of the PApplet to e.g. register Methods. If you use the Library you therefore have to call a lot of methods just with this from the sket…

---

## [Headlines arrays with line break](https://discourse.processing.org/t/headlines-arrays-with-line-break/38918)

<div class="topic-metadata">

**Author:** [@yves](https://discourse.processing.org/u/yves)\
**Replies:** 5\
**Last updated:** [September 24, 2022, 10:13am UTC](https://discourse.processing.org/t/headlines-arrays-with-line-break/38918 "2022-09-24T10:13:07Z")

</div>

Hi every one, I’m working on that example of scrolling headlines from : scrollingtext | Learning Processing 2nd Edition how can I “play” headlines vertically with a line break at the end of each headline something lik…

---

## [Gradually change the sprite of an object](https://discourse.processing.org/t/gradually-change-the-sprite-of-an-object/38851)

<div class="topic-metadata">

**Author:** [@dmlong](https://discourse.processing.org/u/dmlong)\
**Replies:** 3\
**Last updated:** [September 23, 2022, 1:25pm UTC](https://discourse.processing.org/t/gradually-change-the-sprite-of-an-object/38851 "2022-09-23T13:25:56Z")

</div>

Hi, so I’m working on a homework project, with a character shooting fireballs at walls to destroy them. I’ve been doing well with creating the characters and their projectiles, as well as detecting the collision between …

---

## [\[JAVA\] AES security algorithm related - Why do I get different result values?](https://discourse.processing.org/t/java-aes-security-algorithm-related-why-do-i-get-different-result-values/38947)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 0\
**Last updated:** [September 23, 2022, 1:01pm UTC](https://discourse.processing.org/t/java-aes-security-algorithm-related-why-do-i-get-different-result-values/38947 "2022-09-23T13:01:58Z")

</div>

\[JAVA\] AES security algorithm related - Why do I get different result values? hello. I’m trying to test the AES256 algorithm. \[1. Type of test\] WEB SITE JAVA Program \[2. Test information\] KEY : sdfhjiodfjisd231s…

---

## [When I shoot the enemy doesnt die when the bullet comes in the middle](https://discourse.processing.org/t/when-i-shoot-the-enemy-doesnt-die-when-the-bullet-comes-in-the-middle/38935)

<div class="topic-metadata">

**Author:** [@EKEN](https://discourse.processing.org/u/EKEN)\
**Replies:** 2\
**Last updated:** [September 22, 2022, 8:09pm UTC](https://discourse.processing.org/t/when-i-shoot-the-enemy-doesnt-die-when-the-bullet-comes-in-the-middle/38935 "2022-09-22T20:09:37Z")

</div>

please format code with \</\> button \* homework policy \* asking questions When I shoot the enemy doesnt die when the bullet comes in the middle, I need to shoot a bit to the right so the enemey disapears but how do i f…

---

## [Strange aliasing on diagonal lines](https://discourse.processing.org/t/strange-aliasing-on-diagonal-lines/38927)

<div class="topic-metadata">

**Author:** [@louisk](https://discourse.processing.org/u/louisk)\
**Replies:** 3\
**Last updated:** [September 22, 2022, 8:43am UTC](https://discourse.processing.org/t/strange-aliasing-on-diagonal-lines/38927 "2022-09-22T08:43:42Z")

</div>

Hey folks. Newly returned to Processing after years away. Trying to get Processing to behave itself on my Windows 10 Surface Book. It’s displaying very strangely with heavy aliasing on diagonal lines, to the point of pi…

---

## [Making results of noise() seem more gradual](https://discourse.processing.org/t/making-results-of-noise-seem-more-gradual/38924)

<div class="topic-metadata">

**Author:** [@REK166](https://discourse.processing.org/u/REK166)\
**Replies:** 8\
**Last updated:** [September 21, 2022, 7:06pm UTC](https://discourse.processing.org/t/making-results-of-noise-seem-more-gradual/38924 "2022-09-21T19:06:38Z")

</div>

which noiseDetail() setting makes the output more smooth?

---

## [Can you find out the cause of the debugging in the program (exe) state?](https://discourse.processing.org/t/can-you-find-out-the-cause-of-the-debugging-in-the-program-exe-state/38898)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 9\
**Last updated:** [September 21, 2022, 12:06pm UTC](https://discourse.processing.org/t/can-you-find-out-the-cause-of-the-debugging-in-the-program-exe-state/38898 "2022-09-21T12:06:07Z")

</div>

Can you find out the cause of the debugging in the program (exe) state? For example, in the case of processing (run), a debugging log file can be obtained. In the case of processing (exe), is there a way to get …

---

## [My code is not running - i need help (it's in German) SOLVED](https://discourse.processing.org/t/my-code-is-not-running-i-need-help-its-in-german-solved/38904)

<div class="topic-metadata">

**Author:** [@cherry](https://discourse.processing.org/u/cherry)\
**Replies:** 3\
**Last updated:** [September 21, 2022, 10:59am UTC](https://discourse.processing.org/t/my-code-is-not-running-i-need-help-its-in-german-solved/38904 "2022-09-21T10:59:48Z")

</div>

\<double celsius, fahreinheit; void fahreinheitt(){ fahreinheit = (celsius\*1.8)+32; String fa = getTextFromConsole("Bitte geben Sie eine Zahl ein: "); double fahreinheit = Double.parseDouble(fa); println(“Temparatur …

---

## [Distance conversion- Asking Questions](https://discourse.processing.org/t/distance-conversion-asking-questions/38879)

<div class="topic-metadata">

**Author:** [@vincenzo](https://discourse.processing.org/u/vincenzo)\
**Replies:** 3\
**Last updated:** [September 21, 2022, 8:08am UTC](https://discourse.processing.org/t/distance-conversion-asking-questions/38879 "2022-09-21T08:08:43Z")

</div>

I’m working and have a problem when converting distances. for example : How Many Centimeters In A Foot?, How Many Inches In A Foot? , How to converter Centimeters To Feet (cm to ft)? , How to converter CM To IN? Please…

---

## [Pong-Ball Game Bug](https://discourse.processing.org/t/pong-ball-game-bug/38794)

<div class="topic-metadata">

**Author:** [@isabela](https://discourse.processing.org/u/isabela)\
**Replies:** 2\
**Last updated:** [September 16, 2022, 10:27am UTC](https://discourse.processing.org/t/pong-ball-game-bug/38794 "2022-09-16T10:27:48Z")

</div>

I am trying to code a pong game. Even when following tutorials, the same bug appears: if you loose on the first try, the ball will never bounce on the rectangle. But if you win, the ball will bounce even when the rectang…

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

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