# Coding Questions

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

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

**Page:** 9

---

## [Greeking-project - need triangles on different positions to point to my mouse](https://discourse.processing.org/t/greeking-project-need-triangles-on-different-positions-to-point-to-my-mouse/43575)

<div class="topic-metadata">

**Author:** [@ina1](https://discourse.processing.org/u/ina1)\
**Replies:** 0\
**Last updated:** [December 29, 2023, 12:52am UTC](https://discourse.processing.org/t/greeking-project-need-triangles-on-different-positions-to-point-to-my-mouse/43575 "2023-12-29T00:52:59Z")

</div>

Hi! For a school project I need to realize a creative greeking-project. Therefore I’ve got a template which I have to use, that includes different symbol-systems. I have to use it as the base of my project. Just to giv…

---

## [Make program not be opened until it is done loading](https://discourse.processing.org/t/make-program-not-be-opened-until-it-is-done-loading/43560)

<div class="topic-metadata">

**Author:** [@Noodlybanan](https://discourse.processing.org/u/Noodlybanan)\
**Replies:** 4\
**Last updated:** [December 26, 2023, 3:49pm UTC](https://discourse.processing.org/t/make-program-not-be-opened-until-it-is-done-loading/43560 "2023-12-26T15:49:01Z")

</div>

Hi! Ive been trying to make my programm be minimized till it is done loading. My code doesn’t work however and I haven’t seen a topic asking this. void setup() { surface.setVisible(false); size(960, 540, P2D); …

---

## [PGraphics thread issues](https://discourse.processing.org/t/pgraphics-thread-issues/43494)

<div class="topic-metadata">

**Author:** [@Noodlybanan](https://discourse.processing.org/u/Noodlybanan)\
**Replies:** 2\
**Last updated:** [December 21, 2023, 12:42pm UTC](https://discourse.processing.org/t/pgraphics-thread-issues/43494 "2023-12-21T12:42:41Z")

</div>

So, i have a program in processing, that creates a grid of pgraphics to use a canvas. Basically what it does, is loop through a list of different sized pgraphics, and in a thread creates a new pgraphics and sets the old…

---

## [3D walker in a 3D grid / cube: what are the directions he can go to?](https://discourse.processing.org/t/3d-walker-in-a-3d-grid-cube-what-are-the-directions-he-can-go-to/24419)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 8\
**Last updated:** [December 15, 2023, 11:43pm UTC](https://discourse.processing.org/t/3d-walker-in-a-3d-grid-cube-what-are-the-directions-he-can-go-to/24419 "2023-12-15T23:43:53Z")

</div>

Hello all, I was doing a 3D walker in a 3D-grid. What are the directions he can go to? I plan to have a list of PVectors and depending which one is active, we add it to his position again and again so he moves in that…

---

## [Having troubles parsing JSON data](https://discourse.processing.org/t/having-troubles-parsing-json-data/43513)

<div class="topic-metadata">

**Author:** [@bask185](https://discourse.processing.org/u/bask185)\
**Replies:** 1\
**Last updated:** [December 19, 2023, 2:08pm UTC](https://discourse.processing.org/t/having-troubles-parsing-json-data/43513 "2023-12-19T14:08:33Z")

</div>

Hello, I am trying to parse some json data for the first time in processing, but I meet with fail. I want to process data fetched from arduino-cli.exe to determen to which com port an arduino is connected and what it’s…

---

## [Save screen to large tif file (9000px x 9000px)](https://discourse.processing.org/t/save-screen-to-large-tif-file-9000px-x-9000px/43491)

<div class="topic-metadata">

**Author:** [@Yoha](https://discourse.processing.org/u/Yoha)\
**Replies:** 1\
**Last updated:** [December 18, 2023, 1:04am UTC](https://discourse.processing.org/t/save-screen-to-large-tif-file-9000px-x-9000px/43491 "2023-12-18T01:04:57Z")

</div>

I have 100 moving circles all over the screen leaving a trail by puting a rectangle every frame in draw: " void draw(){ fill(0, 10); rect(0,0,width,height); etc… " I want to export the screen at a given moment to a …

---

## [I don't understand modelX/modelY](https://discourse.processing.org/t/i-dont-understand-modelx-modely/43470)

<div class="topic-metadata">

**Author:** [@PianoMastR64](https://discourse.processing.org/u/PianoMastR64)\
**Replies:** 11\
**Last updated:** [December 16, 2023, 7:31pm UTC](https://discourse.processing.org/t/i-dont-understand-modelx-modely/43470 "2023-12-16T19:31:17Z")

</div>

@Override public void settings() { size(800, 800, P3D); smooth(8); } @Override public void setup() { } @Override public void draw() { background(0); …

---

## [Computer Constantly Taking Turn in Tic-Tac-Toe Game](https://discourse.processing.org/t/computer-constantly-taking-turn-in-tic-tac-toe-game/43467)

<div class="topic-metadata">

**Author:** [@XeroX\_ing](https://discourse.processing.org/u/XeroX_ing)\
**Replies:** 1\
**Last updated:** [December 13, 2023, 6:09pm UTC](https://discourse.processing.org/t/computer-constantly-taking-turn-in-tic-tac-toe-game/43467 "2023-12-13T18:09:04Z")

</div>

Hello again! I’m trying to make a tic tac toe game against a computer, where the user enters their choice using number inputs instead of mouseclicks. Edit, I’ve gotten the computer to stop constantly taking its turn, but…

---

## [Adding a second snake target](https://discourse.processing.org/t/adding-a-second-snake-target/43449)

<div class="topic-metadata">

**Author:** [@suspinks0](https://discourse.processing.org/u/suspinks0)\
**Replies:** 1\
**Last updated:** [December 12, 2023, 12:24pm UTC](https://discourse.processing.org/t/adding-a-second-snake-target/43449 "2023-12-12T12:24:12Z")

</div>

Hello! I’m making a space themed snake game, and I want to add a second smaller target that gives half a point instead of giving one point like the star target already does. Whenever I try to add it by copying the preex…

---

## [ASDF Pixel Sort with different sections (color threshold)](https://discourse.processing.org/t/asdf-pixel-sort-with-different-sections-color-threshold/43416)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 17\
**Last updated:** [December 10, 2023, 1:06pm UTC](https://discourse.processing.org/t/asdf-pixel-sort-with-different-sections-color-threshold/43416 "2023-12-10T13:06:18Z")

</div>

Hi! I am playing with Kim Asendorf\`s code for pixel sorting, trying to use different values of sorting in different sections of the picture. That is way I am adding this to his code: if (y\<300){ int whiteValue = -123…

---

## [Problem with .obj file (scale shape)](https://discourse.processing.org/t/problem-with-obj-file-scale-shape/43390)

<div class="topic-metadata">

**Author:** [@Philippe1](https://discourse.processing.org/u/Philippe1)\
**Replies:** 11\
**Last updated:** [December 8, 2023, 11:10am UTC](https://discourse.processing.org/t/problem-with-obj-file-scale-shape/43390 "2023-12-08T11:10:30Z")

</div>

Hello, Returning to Processing, which I haven’t used for several years, I have a problem importing a 3D shape made in Blender and saved as an .obj file. the image I get is in 2D. if I test the file with viewer Windows…

---

## [Pixel Sorter with Processing (lighter pixels rise)](https://discourse.processing.org/t/pixel-sorter-with-processing-lighter-pixels-rise/43413)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 4\
**Last updated:** [December 8, 2023, 8:42pm UTC](https://discourse.processing.org/t/pixel-sorter-with-processing-lighter-pixels-rise/43413 "2023-12-08T20:42:15Z")

</div>

Hi there! I am trying to use this tutorial in processing. I know this function needs some values sortPixels(); but I don’t know how to do it. Could you please help me? Thanks! PImage img; void setup() { size (10…

---

## [Avoiding NullPointException in OpenWeatherMap](https://discourse.processing.org/t/avoiding-nullpointexception-in-openweathermap/43417)

<div class="topic-metadata">

**Author:** [@peja](https://discourse.processing.org/u/peja)\
**Replies:** 7\
**Last updated:** [December 8, 2023, 4:59pm UTC](https://discourse.processing.org/t/avoiding-nullpointexception-in-openweathermap/43417 "2023-12-08T16:59:36Z")

</div>

Hello, In theory, a simple question. First of all, apologies if I get my terms wrong as I am new to this… I am parsing data from OpenWeatherMap. I can get most of it, but the “rain” parameter is more difficult. This…

---

## [Name of the loaded shape](https://discourse.processing.org/t/name-of-the-loaded-shape/43397)

<div class="topic-metadata">

**Author:** [@mrbbp](https://discourse.processing.org/u/mrbbp)\
**Replies:** 2\
**Last updated:** [December 6, 2023, 8:11am UTC](https://discourse.processing.org/t/name-of-the-loaded-shape/43397 "2023-12-06T08:11:38Z")

</div>

Hello, i load few shape in an array. i change the used shape in the drawing area. the only thing i know is the index of the shape in the array. int nbrI = 24; PShape\[\] pinceaux = new PShape\[nbrI\]; for (int i=0; i\<nb…

---

## [millis() Not Resetting Properly in rolling() Method](https://discourse.processing.org/t/millis-not-resetting-properly-in-rolling-method/43375)

<div class="topic-metadata">

**Author:** [@HifumiLover](https://discourse.processing.org/u/HifumiLover)\
**Replies:** 6\
**Last updated:** [December 5, 2023, 3:08pm UTC](https://discourse.processing.org/t/millis-not-resetting-properly-in-rolling-method/43375 "2023-12-05T15:08:23Z")

</div>

I’m working on a game in Processing and facing an issue where millis() is not resetting as expected in my rolling() method within the Player class. The method is triggered by pressing the down arrow, and it’s supposed to…

---

## [How to leave some things "untouched" by resetting the background](https://discourse.processing.org/t/how-to-leave-some-things-untouched-by-resetting-the-background/43368)

<div class="topic-metadata">

**Author:** [@c0depie](https://discourse.processing.org/u/c0depie)\
**Replies:** 1\
**Last updated:** [December 2, 2023, 2:08am UTC](https://discourse.processing.org/t/how-to-leave-some-things-untouched-by-resetting-the-background/43368 "2023-12-02T02:08:10Z")

</div>

essentially what I want is for the outer line to place a dot at the tip every frame, but without the background over lapping the previous dots static float GOLD = 1.618; void setup() { fullScreen(P2D); frameRate(2000)…

---

## [I need help please (process pictures from a folder)](https://discourse.processing.org/t/i-need-help-please-process-pictures-from-a-folder/43341)

<div class="topic-metadata">

**Author:** [@Yanina](https://discourse.processing.org/u/Yanina)\
**Replies:** 3\
**Last updated:** [November 30, 2023, 7:53am UTC](https://discourse.processing.org/t/i-need-help-please-process-pictures-from-a-folder/43341 "2023-11-30T07:53:37Z")

</div>

Hello everybody! I am writing code that processes pictures into letters and I have a problem that the program does not consistently process pictures from a folder even though they are numbered (initially this is a video …

---

## [Help with a timer on a game to restart](https://discourse.processing.org/t/help-with-a-timer-on-a-game-to-restart/43349)

<div class="topic-metadata">

**Author:** [@beginn](https://discourse.processing.org/u/beginn)\
**Replies:** 1\
**Last updated:** [November 30, 2023, 12:27am UTC](https://discourse.processing.org/t/help-with-a-timer-on-a-game-to-restart/43349 "2023-11-30T00:27:02Z")

</div>

Ignore my notes on the code. But my timer just doesnt want to reset each time I play the game. I tried and I’m just not sure what to do. float ballX; float ballY; float xspeed; float yspeed; float speed =10; //INITAL S…

---

## [Processing 4.3 on Apple M3 chipset - Continuity Camera](https://discourse.processing.org/t/processing-4-3-on-apple-m3-chipset-continuity-camera/43343)

<div class="topic-metadata">

**Author:** [@simonbiggs](https://discourse.processing.org/u/simonbiggs)\
**Replies:** 0\
**Last updated:** [November 29, 2023, 6:16am UTC](https://discourse.processing.org/t/processing-4-3-on-apple-m3-chipset-continuity-camera/43343 "2023-11-29T06:16:06Z")

</div>

Hi all Have taken delivery of a new M3 Max Macbook Pro with Sonoma OS. Have got Processing 4.3 working on this. I am getting the following warning when running code that uses the GStreamer video library and an external …

---

## [Help with coding game (catch falling images)](https://discourse.processing.org/t/help-with-coding-game-catch-falling-images/43325)

<div class="topic-metadata">

**Author:** [@anamw88](https://discourse.processing.org/u/anamw88)\
**Replies:** 9\
**Last updated:** [November 28, 2023, 1:22pm UTC](https://discourse.processing.org/t/help-with-coding-game-catch-falling-images/43325 "2023-11-28T13:22:46Z")

</div>

Hello, I’m trying to make a game where random food items will fall from the top of the screen and a mouth on the bottom will catch them. I found an existing game with this concept and edited to add my own food pictures. …

---

## [Creation of a tower with boxes](https://discourse.processing.org/t/creation-of-a-tower-with-boxes/43232)

<div class="topic-metadata">

**Author:** [@Smail\_OUABED](https://discourse.processing.org/u/Smail_OUABED)\
**Replies:** 24\
**Last updated:** [November 26, 2023, 1:15pm UTC](https://discourse.processing.org/t/creation-of-a-tower-with-boxes/43232 "2023-11-26T13:15:34Z")

</div>

we have a homework which asks us to create a tower, I directly thought of using iterations with boxes to create a wall which I will then turn according to a certain angle to form a tower I expected it to be feasible and …

---

## [Trying to create a city scape, but code is running very slow, can this be fixed by creating each tower as a PShape?](https://discourse.processing.org/t/trying-to-create-a-city-scape-but-code-is-running-very-slow-can-this-be-fixed-by-creating-each-tower-as-a-pshape/43306)

<div class="topic-metadata">

**Author:** [@mdrmx](https://discourse.processing.org/u/mdrmx)\
**Replies:** 3\
**Last updated:** [November 25, 2023, 8:49pm UTC](https://discourse.processing.org/t/trying-to-create-a-city-scape-but-code-is-running-very-slow-can-this-be-fixed-by-creating-each-tower-as-a-pshape/43306 "2023-11-25T20:49:17Z")

</div>

import peasy.\*; PeasyCam cam; float cubeSize = 15; float xoff = 0.5; PShape Box; Building\[\] city = new Building\[100\]; void setup() { //size( 1000, 1000, P3D); fullScreen(P3D); cam = new PeasyCam(this, width/2 -5…

---

## [How to specify files encoding?](https://discourse.processing.org/t/how-to-specify-files-encoding/43299)

<div class="topic-metadata">

**Author:** [@MGDSStudio](https://discourse.processing.org/u/MGDSStudio)\
**Replies:** 0\
**Last updated:** [November 24, 2023, 9:17pm UTC](https://discourse.processing.org/t/how-to-specify-files-encoding/43299 "2023-11-24T21:17:32Z")

</div>

I have troubles with deployment of my videogame for Windows 64 platform. After the export with embedded Java I can not read Cyrillic text from external files. This means - I can read normally Cyrrilc text from an externa…

---

## [Problem reading csv file in SecondApplet](https://discourse.processing.org/t/problem-reading-csv-file-in-secondapplet/43297)

<div class="topic-metadata">

**Author:** [@graham](https://discourse.processing.org/u/graham)\
**Replies:** 1\
**Last updated:** [November 24, 2023, 11:13am UTC](https://discourse.processing.org/t/problem-reading-csv-file-in-secondapplet/43297 "2023-11-24T11:13:47Z")

</div>

---

## [UPDATED: Creating a Game: Just need a kick in the right direction](https://discourse.processing.org/t/updated-creating-a-game-just-need-a-kick-in-the-right-direction/43287)

<div class="topic-metadata">

**Author:** [@beginn](https://discourse.processing.org/u/beginn)\
**Replies:** 1\
**Last updated:** [November 23, 2023, 6:06am UTC](https://discourse.processing.org/t/updated-creating-a-game-just-need-a-kick-in-the-right-direction/43287 "2023-11-23T06:06:43Z")

</div>

Hopefully I formatted this right… So this is the code I have so far on making a somewhat pong game but also that game where you bounce the ball off the bar (rect) (like that game where you break bricks with the ball). I …

---

## [Making images appear under mousePressed() function](https://discourse.processing.org/t/making-images-appear-under-mousepressed-function/43252)

<div class="topic-metadata">

**Author:** [@bwowie](https://discourse.processing.org/u/bwowie)\
**Replies:** 4\
**Last updated:** [November 19, 2023, 10:28pm UTC](https://discourse.processing.org/t/making-images-appear-under-mousepressed-function/43252 "2023-11-19T22:28:11Z")

</div>

Hi! Very new to processing for my design class, but I’m trying to make an image appear under mousePressed() function. I have six total and I’ve gotten them to load when the mouse is pressed but I want to know how to make…

---

## [Key and coded key shift combo (cmd + something)](https://discourse.processing.org/t/key-and-coded-key-shift-combo-cmd-something/43199)

<div class="topic-metadata">

**Author:** [@Leo\_Aguiar](https://discourse.processing.org/u/Leo_Aguiar)\
**Replies:** 14\
**Last updated:** [November 19, 2023, 8:02am UTC](https://discourse.processing.org/t/key-and-coded-key-shift-combo-cmd-something/43199 "2023-11-19T08:02:43Z")

</div>

Hi I am attempting to make a simple sketch that draws two different shapes depending on what keys a user presses. The first part of the code detects when the lowercase ‘o’ is pressed and draws a small ellipse. The second…

---

## [Issue with alpha in P2D Renderer](https://discourse.processing.org/t/issue-with-alpha-in-p2d-renderer/43137)

<div class="topic-metadata">

**Author:** [@eltrem](https://discourse.processing.org/u/eltrem)\
**Replies:** 2\
**Last updated:** [November 17, 2023, 6:56pm UTC](https://discourse.processing.org/t/issue-with-alpha-in-p2d-renderer/43137 "2023-11-17T18:56:46Z")

</div>

Hello Processing Community, I’ve encountered a challenging issue while working with the P2D renderer in Processing, specifically when trying to layer semi-transparent shapes over a white background. The expected result …

---

## [Voxel Game Memory Problems](https://discourse.processing.org/t/voxel-game-memory-problems/43231)

<div class="topic-metadata">

**Author:** [@Noodlybanan](https://discourse.processing.org/u/Noodlybanan)\
**Replies:** 2\
**Last updated:** [November 17, 2023, 3:02pm UTC](https://discourse.processing.org/t/voxel-game-memory-problems/43231 "2023-11-17T15:02:48Z")

</div>

Hi! I recoded my voxel game, and now it gets 700 Fps with as many chunks as i want, the only problem is memory. 32 chunks that are meshed take up almost 2 gb (a chunk is 32x32x32) without the mesh data load it takes up a…

---

## [Weird P3D Error](https://discourse.processing.org/t/weird-p3d-error/43220)

<div class="topic-metadata">

**Author:** [@Noodlybanan](https://discourse.processing.org/u/Noodlybanan)\
**Replies:** 2\
**Last updated:** [November 17, 2023, 3:56pm UTC](https://discourse.processing.org/t/weird-p3d-error/43220 "2023-11-17T15:56:37Z")

</div>

Hello! My P3D game has the function voxel(x, y, z, img\_front, img\_back, img\_right, img\_left, img\_top, img\_bottom). If i use the same image as input (for all voxel calls in a chunk), the framerate is very stable at 60fps…

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

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