# Coding Questions

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

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

**Page:** 70

---

## [Making something spin/rotate](https://discourse.processing.org/t/making-something-spin-rotate/26244)

<div class="topic-metadata">

**Author:** [@Khwarizmi](https://discourse.processing.org/u/Khwarizmi)\
**Replies:** 2\
**Last updated:** [December 14, 2020, 10:00pm UTC](https://discourse.processing.org/t/making-something-spin-rotate/26244 "2020-12-14T22:00:34Z")

</div>

I made this small survival game where you are a ball and are supposed to dodge shurikens using the arrow keys.I want to draw the 2 shuriken triangles in a way so that they rotate around the center of the shuriken at a co…

---

## [Downloading Example Files](https://discourse.processing.org/t/downloading-example-files/26249)

<div class="topic-metadata">

**Author:** [@jeromeernestgarcia](https://discourse.processing.org/u/jeromeernestgarcia)\
**Replies:** 2\
**Last updated:** [December 14, 2020, 9:54pm UTC](https://discourse.processing.org/t/downloading-example-files/26249 "2020-12-14T21:54:22Z")

</div>

I am trying to experiment with the scrollbar example. How to I download the image files associated with the example. img1 = loadImage(“seedTop.jpg”); img2 = loadImage(“seedBottom.jpg”); Thanks, Jerome

---

## [Change text height depending on position](https://discourse.processing.org/t/change-text-height-depending-on-position/25833)

<div class="topic-metadata">

**Author:** [@hannes](https://discourse.processing.org/u/hannes)\
**Replies:** 6\
**Last updated:** [December 14, 2020, 1:58am UTC](https://discourse.processing.org/t/change-text-height-depending-on-position/25833 "2020-12-14T01:58:53Z")

</div>

Hey Guys, I wanted to achieve something like a “text roll”. Here is an example: I want that, when scrolling up and down through my text, the type will change its text height. Like when text is written on a tube. Hope …

---

## [Need help with my project](https://discourse.processing.org/t/need-help-with-my-project/26210)

<div class="topic-metadata">

**Author:** [@Cheshire1](https://discourse.processing.org/u/Cheshire1)\
**Replies:** 9\
**Last updated:** [December 13, 2020, 9:19pm UTC](https://discourse.processing.org/t/need-help-with-my-project/26210 "2020-12-13T21:19:11Z")

</div>

Hello I’m stuck on my project I just need to end my game after the timer is 0 and display a screen that says game over with the score but the timer just keeps going to negative and wouldn’t stop. I would also like if any…

---

## [How to create an infinite 2D array list map](https://discourse.processing.org/t/how-to-create-an-infinite-2d-array-list-map/26191)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 2\
**Last updated:** [December 13, 2020, 9:13pm UTC](https://discourse.processing.org/t/how-to-create-an-infinite-2d-array-list-map/26191 "2020-12-13T21:13:52Z")

</div>

Hi! I recently made the game of life. I am interested in how to create infinite map (in all directions) The arrays would be like (imagine a graph window): So the arrays would be ++, ±, -+, --. Would this be a viabl…

---

## [I have an assignment to do but its kind of confusing and I want to know if what I did is correct (get Minimum)](https://discourse.processing.org/t/i-have-an-assignment-to-do-but-its-kind-of-confusing-and-i-want-to-know-if-what-i-did-is-correct-get-minimum/26140)

<div class="topic-metadata">

**Author:** [@DijaAngel](https://discourse.processing.org/u/DijaAngel)\
**Replies:** 1\
**Last updated:** [December 11, 2020, 6:14pm UTC](https://discourse.processing.org/t/i-have-an-assignment-to-do-but-its-kind-of-confusing-and-i-want-to-know-if-what-i-did-is-correct-get-minimum/26140 "2020-12-11T18:14:47Z")

</div>

Write a program which has a global array of integers with values assigned to the array. • Write a function ‘getArrayMin’ to return the minimum value in the array. • Draw a circle in the centre of the window with the…

---

## [Move objekt with mouse](https://discourse.processing.org/t/move-objekt-with-mouse/26185)

<div class="topic-metadata">

**Author:** [@Wengi](https://discourse.processing.org/u/Wengi)\
**Replies:** 1\
**Last updated:** [December 13, 2020, 2:59pm UTC](https://discourse.processing.org/t/move-objekt-with-mouse/26185 "2020-12-13T14:59:54Z")

</div>

Good Morning Does anyone of you know how to move an object with the mouse. So if I go to the left with the mouse, the object also goes to the left. With kind regards

---

## [Needing help for rotating movement directions with mouseMoved() in 3D](https://discourse.processing.org/t/needing-help-for-rotating-movement-directions-with-mousemoved-in-3d/26169)

<div class="topic-metadata">

**Author:** [@SailorToei](https://discourse.processing.org/u/SailorToei)\
**Replies:** 3\
**Last updated:** [December 13, 2020, 2:35pm UTC](https://discourse.processing.org/t/needing-help-for-rotating-movement-directions-with-mousemoved-in-3d/26169 "2020-12-13T14:35:56Z")

</div>

I am working with threedimensional spaces lately. This is my Code: //The Main Programm: Figur figur1; void setup() { size(1300,750,P3D); figur1=new Figur(650,375,0); } void draw() { println(mousey); background…

---

## [Update vertex fragment from a texture](https://discourse.processing.org/t/update-vertex-fragment-from-a-texture/26190)

<div class="topic-metadata">

**Author:** [@regularsam](https://discourse.processing.org/u/regularsam)\
**Replies:** 0\
**Last updated:** [December 13, 2020, 1:04pm UTC](https://discourse.processing.org/t/update-vertex-fragment-from-a-texture/26190 "2020-12-13T13:04:48Z")

</div>

Hi, I’m looking for a way to update vertex positions within a vertex shader, passing from Processing a texture (sampler2D in GLSL) taken as an output from a fragment shader, which contains new position’s coordinates (x,y…

---

## [Getting the name of the instance](https://discourse.processing.org/t/getting-the-name-of-the-instance/26144)

<div class="topic-metadata">

**Author:** [@dave307](https://discourse.processing.org/u/dave307)\
**Replies:** 4\
**Last updated:** [December 12, 2020, 4:31pm UTC](https://discourse.processing.org/t/getting-the-name-of-the-instance/26144 "2020-12-12T16:31:25Z")

</div>

is there a way of within an object to get the name of the instance it is running the code for.

---

## [Processing won't allow decimal increment since it is float not int](https://discourse.processing.org/t/processing-wont-allow-decimal-increment-since-it-is-float-not-int/26157)

<div class="topic-metadata">

**Author:** [@BillyxBonka](https://discourse.processing.org/u/BillyxBonka)\
**Replies:** 2\
**Last updated:** [December 12, 2020, 2:29pm UTC](https://discourse.processing.org/t/processing-wont-allow-decimal-increment-since-it-is-float-not-int/26157 "2020-12-12T14:29:59Z")

</div>

\<//Increase perSec int perSec = 0; //Time int time = 0; //Amount of current milk int amount = 0; //Milk image PImage milky; //Font setting PFont BoldFont; void setup() { //Canvas Size size(500,500); //Fonts …

---

## [Discreet data interpolation](https://discourse.processing.org/t/discreet-data-interpolation/26118)

<div class="topic-metadata">

**Author:** [@SurfWise](https://discourse.processing.org/u/SurfWise)\
**Replies:** 2\
**Last updated:** [December 12, 2020, 2:26pm UTC](https://discourse.processing.org/t/discreet-data-interpolation/26118 "2020-12-12T14:26:41Z")

</div>

Hello everyone! I struggle to solve one problem. I have discreet set of data of 2 functions C\_L(alpha) and C\_D(alpha) - lift coefficient and drag coefficient depending on angle of attack alpha. The set looks as follows: …

---

## [Can I make words float around the screen with the word I type in?](https://discourse.processing.org/t/can-i-make-words-float-around-the-screen-with-the-word-i-type-in/26087)

<div class="topic-metadata">

**Author:** [@Quinton](https://discourse.processing.org/u/Quinton)\
**Replies:** 3\
**Last updated:** [December 11, 2020, 2:36pm UTC](https://discourse.processing.org/t/can-i-make-words-float-around-the-screen-with-the-word-i-type-in/26087 "2020-12-11T14:36:50Z")

</div>

I was trying to make a code that can make the word of sentence I type in would float around the screen. when I type the letters and hit enter, the typed sentence will bounce around. It was kinda tricky… since I didnt c…

---

## [From the Menu to the Game (mousePressed, programming tic tac toe)](https://discourse.processing.org/t/from-the-menu-to-the-game-mousepressed-programming-tic-tac-toe/26067)

<div class="topic-metadata">

**Author:** [@librakl](https://discourse.processing.org/u/librakl)\
**Replies:** 11\
**Last updated:** [December 11, 2020, 12:34pm UTC](https://discourse.processing.org/t/from-the-menu-to-the-game-mousepressed-programming-tic-tac-toe/26067 "2020-12-11T12:34:40Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello, we need to write a programm in processing for the game tic tac toe But our problem is, when we click on ‘play against human’ the field …

---

## [Multiple mouse clicks issue](https://discourse.processing.org/t/multiple-mouse-clicks-issue/26126)

<div class="topic-metadata">

**Author:** [@millionish](https://discourse.processing.org/u/millionish)\
**Replies:** 9\
**Last updated:** [December 10, 2020, 9:41pm UTC](https://discourse.processing.org/t/multiple-mouse-clicks-issue/26126 "2020-12-10T21:41:51Z")

</div>

How do I consider multiple mouse clicks as one mouse click? I have an if condition which checks for mouse click condition and increments the counter variable, but when mouse is kept pressed for a long time, there are mu…

---

## [Randomise Asteroids from sky](https://discourse.processing.org/t/randomise-asteroids-from-sky/26129)

<div class="topic-metadata">

**Author:** [@Wengi](https://discourse.processing.org/u/Wengi)\
**Replies:** 2\
**Last updated:** [December 10, 2020, 10:28pm UTC](https://discourse.processing.org/t/randomise-asteroids-from-sky/26129 "2020-12-10T22:28:18Z")

</div>

Good evening programmers! I want to program a game where asteroids fall from the sky. Does anyone know how I can happen this to come from above? The asteroids are just normal circles. Thanks in advance! Kind regards

---

## [Mathematical circle animation](https://discourse.processing.org/t/mathematical-circle-animation/26117)

<div class="topic-metadata">

**Author:** [@IziBartek](https://discourse.processing.org/u/IziBartek)\
**Replies:** 12\
**Last updated:** [December 10, 2020, 7:40pm UTC](https://discourse.processing.org/t/mathematical-circle-animation/26117 "2020-12-10T19:40:29Z")

</div>

Hello, I am very new to processing and would be grateful if I got some help with my assignment. I have took on a project to create something like this animation in processing. I have little to no idea how to come up wit…

---

## [Moving backgroud coordinate issue](https://discourse.processing.org/t/moving-backgroud-coordinate-issue/26107)

<div class="topic-metadata">

**Author:** [@millionish](https://discourse.processing.org/u/millionish)\
**Replies:** 1\
**Last updated:** [December 10, 2020, 10:38am UTC](https://discourse.processing.org/t/moving-backgroud-coordinate-issue/26107 "2020-12-10T10:38:32Z")

</div>

I’m making a top down shooter game. The way I’m moving the player is by keeping him in the center of the screen and moving the background instead. But as I move it, the coordinates of the screen change continuously and I…

---

## [Make 3 functions into one](https://discourse.processing.org/t/make-3-functions-into-one/26101)

<div class="topic-metadata">

**Author:** [@vestergaard12](https://discourse.processing.org/u/vestergaard12)\
**Replies:** 15\
**Last updated:** [December 9, 2020, 10:07pm UTC](https://discourse.processing.org/t/make-3-functions-into-one/26101 "2020-12-09T22:07:37Z")

</div>

Hello Processing foundation I have this really simple question and I know it might seem very easy to do, but I cannot see how to do it correctly. I have these 3 functions which i want to compromise to one simple functi…

---

## [Someone change this code but make it stay the same](https://discourse.processing.org/t/someone-change-this-code-but-make-it-stay-the-same/26026)

<div class="topic-metadata">

**Author:** [@Mohammed](https://discourse.processing.org/u/Mohammed)\
**Replies:** 10\
**Last updated:** [December 9, 2020, 10:43am UTC](https://discourse.processing.org/t/someone-change-this-code-but-make-it-stay-the-same/26026 "2020-12-09T10:43:50Z")

</div>

please format code with \</\> button \* homework policy \* asking questions int radius = 12; int direction = 1; int direction2 = 0; float x = 250; float y = 250; void setup() { size(500, 500); ellipseMode(RADIUS); …

---

## [I need help with filling in a grid](https://discourse.processing.org/t/i-need-help-with-filling-in-a-grid/25939)

<div class="topic-metadata">

**Author:** [@SadCSstudent](https://discourse.processing.org/u/SadCSstudent)\
**Replies:** 17\
**Last updated:** [December 9, 2020, 12:48am UTC](https://discourse.processing.org/t/i-need-help-with-filling-in-a-grid/25939 "2020-12-09T00:48:26Z")

</div>

Hi,i created a 3x3 grid and i need each cell in the grid to change colour when clicked but it fills the entire screen. I’m, also unfortunately not allowed to use 2D arrays or the 'color function as I’ve seen online. Can…

---

## [How to move shape](https://discourse.processing.org/t/how-to-move-shape/26066)

<div class="topic-metadata">

**Author:** [@Adamasmal02](https://discourse.processing.org/u/Adamasmal02)\
**Replies:** 2\
**Last updated:** [December 9, 2020, 12:27am UTC](https://discourse.processing.org/t/how-to-move-shape/26066 "2020-12-09T00:27:18Z")

</div>

I have made this so far I’m new to processing I’m wondering how I can make it move right left up and down

---

## [Help please! - Ball screensaver](https://discourse.processing.org/t/help-please-ball-screensaver/26042)

<div class="topic-metadata">

**Author:** [@NathanGulrajani](https://discourse.processing.org/u/NathanGulrajani)\
**Replies:** 3\
**Last updated:** [December 8, 2020, 6:53pm UTC](https://discourse.processing.org/t/help-please-ball-screensaver/26042 "2020-12-08T18:53:06Z")

</div>

I want the ball to bounce of all edges of the screen as well as the center spinning rectangle, but the ball just ejects out of the rectangle and falls down. float r = 0; float ballx; float bally; float IIballx; floa…

---

## [Opening and closing extra window](https://discourse.processing.org/t/opening-and-closing-extra-window/26021)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 7\
**Last updated:** [December 8, 2020, 12:37pm UTC](https://discourse.processing.org/t/opening-and-closing-extra-window/26021 "2020-12-08T12:37:12Z")

</div>

This is my second time asking. The previous time I was unclear about what I wanted, however, it was still useful, so I don’t want to delete it. I want to be able to create an extra window, within the same sketch and mak…

---

## [SVG Export in one file](https://discourse.processing.org/t/svg-export-in-one-file/26022)

<div class="topic-metadata">

**Author:** [@Dimdimtri](https://discourse.processing.org/u/Dimdimtri)\
**Replies:** 2\
**Last updated:** [December 8, 2020, 10:16am UTC](https://discourse.processing.org/t/svg-export-in-one-file/26022 "2020-12-08T10:16:08Z")

</div>

Hello hello everyone, I used to export my svg with processing, but this time I can’t export a single svg with all the designs. Let me explain. Either it exports the first drawing, or it exports a file for each Frame. I w…

---

## [NullPointerException?](https://discourse.processing.org/t/nullpointerexception/26035)

<div class="topic-metadata">

**Author:** [@angela1811](https://discourse.processing.org/u/angela1811)\
**Replies:** 1\
**Last updated:** [December 8, 2020, 7:20am UTC](https://discourse.processing.org/t/nullpointerexception/26035 "2020-12-08T07:20:33Z")

</div>

Could someone help me? When I import the 31st png file, I have an error :frowning: PImage img; PImage img1; PImage img2; PImage img3; PImage img4; PImage img5; PImage img6; PImage img7; PImage img8; PImage img9; PImag…

---

## [Want to make a little debug mode in my program, need help](https://discourse.processing.org/t/want-to-make-a-little-debug-mode-in-my-program-need-help/26015)

<div class="topic-metadata">

**Author:** [@Braunstein](https://discourse.processing.org/u/Braunstein)\
**Replies:** 9\
**Last updated:** [December 7, 2020, 7:55pm UTC](https://discourse.processing.org/t/want-to-make-a-little-debug-mode-in-my-program-need-help/26015 "2020-12-07T19:55:28Z")

</div>

Hi, im a beginner (like, REALLY beginner) and i want to make a Debug Mode for my program. It shold be activated by pressing “o”, and deactivated with “p” (yes, it is intentional that it is (de-)activated with two differe…

---

## [We need to make a pure function where the pinde need to get sorted with highest to the left](https://discourse.processing.org/t/we-need-to-make-a-pure-function-where-the-pinde-need-to-get-sorted-with-highest-to-the-left/26011)

<div class="topic-metadata">

**Author:** [@ctc2502](https://discourse.processing.org/u/ctc2502)\
**Replies:** 2\
**Last updated:** [December 7, 2020, 7:15pm UTC](https://discourse.processing.org/t/we-need-to-make-a-pure-function-where-the-pinde-need-to-get-sorted-with-highest-to-the-left/26011 "2020-12-07T19:15:52Z")

</div>

please format code with \</\> button \* homework policy \* asking questions int liste = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int index = 0; void setup() { size(400, 400); frameRate(10); blanding(0, liste); } void draw…

---

## [Creating an additional input window](https://discourse.processing.org/t/creating-an-additional-input-window/25982)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 7\
**Last updated:** [December 7, 2020, 6:57pm UTC](https://discourse.processing.org/t/creating-an-additional-input-window/25982 "2020-12-07T18:57:48Z")

</div>

Hi, I’ve gone insane trying to create constant input windows. I’ve been trying to create ways to enter inputs into the program. My question is, how to create a program, which can open a new window whenever a specific f…

---

## [The homework I failed](https://discourse.processing.org/t/the-homework-i-failed/26006)

<div class="topic-metadata">

**Author:** [@duruko](https://discourse.processing.org/u/duruko)\
**Replies:** 4\
**Last updated:** [December 7, 2020, 5:50pm UTC](https://discourse.processing.org/t/the-homework-i-failed/26006 "2020-12-07T17:50:55Z")

</div>

Hello, my Processing skills are as bad as my English. I consult you here with my teacher’s suggestion. I showed the work I tried to do from Processing with sample pictures. I want a spring to multiply by moving to th…

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

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