# Beginners

**URL:** https://discourse.processing.org/c/processing/processing-beginners/14.md?page=11

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

**Page:** 12

---

## [Frogger High score](https://discourse.processing.org/t/frogger-high-score/37427)

<div class="topic-metadata">

**Author:** [@king\_B99](https://discourse.processing.org/u/king_B99)\
**Replies:** 2\
**Last updated:** [June 9, 2022, 5:17pm UTC](https://discourse.processing.org/t/frogger-high-score/37427 "2022-06-09T17:17:17Z")

</div>

So I am trying to make a high score system for my frogger game I am using JSONObjects but its a little confusing can anyone show an example or explain it. Thanks.

---

## [Are properties such as fill color, stroke weight, text size, etc. write only?](https://discourse.processing.org/t/are-properties-such-as-fill-color-stroke-weight-text-size-etc-write-only/33024)

<div class="topic-metadata">

**Author:** [@Math\_Machine](https://discourse.processing.org/u/Math_Machine)\
**Replies:** 7\
**Last updated:** [June 19, 2022, 6:33am UTC](https://discourse.processing.org/t/are-properties-such-as-fill-color-stroke-weight-text-size-etc-write-only/33024 "2022-06-19T06:33:10Z")

</div>

Hi, this is a question I’ve had on my mind for quite a while, and I apologize in advance if someone already asked it, but is there any way to just ask processing what the current stroke weight is? Or the current fill co…

---

## [The function blendmode(int) does not exist](https://discourse.processing.org/t/the-function-blendmode-int-does-not-exist/37619)

<div class="topic-metadata">

**Author:** [@rpp](https://discourse.processing.org/u/rpp)\
**Replies:** 1\
**Last updated:** [June 18, 2022, 2:51pm UTC](https://discourse.processing.org/t/the-function-blendmode-int-does-not-exist/37619 "2022-06-18T14:51:28Z")

</div>

Hi Team, Just installed Processing 4 and started followed some tutorials, namely the one from Daniel Simu (https://www.youtube.com/watch?v=wghDDYnIFM0). I’ve ran his code and the BlendMode() function is not present (do…

---

## [Nesting "Else If"](https://discourse.processing.org/t/nesting-else-if/37521)

<div class="topic-metadata">

**Author:** [@panko](https://discourse.processing.org/u/panko)\
**Replies:** 6\
**Last updated:** [June 14, 2022, 7:18am UTC](https://discourse.processing.org/t/nesting-else-if/37521 "2022-06-14T07:18:05Z")

</div>

Hi there - I’d like to have a variable number of “else if” statements. I wrote the following code, but it gets a bunch of errors (which I copied and pasted below the code. Does anyone know how to do this? Thanks! void…

---

## [Help with arrays!](https://discourse.processing.org/t/help-with-arrays/37329)

<div class="topic-metadata">

**Author:** [@JosepAlqueza](https://discourse.processing.org/u/JosepAlqueza)\
**Replies:** 9\
**Last updated:** [June 8, 2022, 1:38am UTC](https://discourse.processing.org/t/help-with-arrays/37329 "2022-06-08T01:38:08Z")

</div>

Hello to all! I have an array (Cities) where the first column is the X position and the second column is the Y position. Combined they represent the position on a map of a city. The third can be ignored. I need these v…

---

## [Have two questions, one about arrays and one about integers](https://discourse.processing.org/t/have-two-questions-one-about-arrays-and-one-about-integers/37500)

<div class="topic-metadata">

**Author:** [@Mikey83](https://discourse.processing.org/u/Mikey83)\
**Replies:** 9\
**Last updated:** [June 13, 2022, 12:40am UTC](https://discourse.processing.org/t/have-two-questions-one-about-arrays-and-one-about-integers/37500 "2022-06-13T00:40:10Z")

</div>

Hi, im just wondering if there is a quick solution to fill an array, similar to range in python, i usually use a for loop but is there a shorter way? Also, i know the largest possible integer is 2,147,483,647 and long a…

---

## [How to find a max value with loop](https://discourse.processing.org/t/how-to-find-a-max-value-with-loop/37476)

<div class="topic-metadata">

**Author:** [@mvb](https://discourse.processing.org/u/mvb)\
**Replies:** 12\
**Last updated:** [June 12, 2022, 8:25pm UTC](https://discourse.processing.org/t/how-to-find-a-max-value-with-loop/37476 "2022-06-12T20:25:16Z")

</div>

How do I find the maximum and minimum value of an array with loops?

---

## [What parts of the transform get reset in the draw loop? Does the matrix stack get reset?](https://discourse.processing.org/t/what-parts-of-the-transform-get-reset-in-the-draw-loop-does-the-matrix-stack-get-reset/37454)

<div class="topic-metadata">

**Author:** [@LordXerus](https://discourse.processing.org/u/LordXerus)\
**Replies:** 5\
**Last updated:** [June 10, 2022, 10:32pm UTC](https://discourse.processing.org/t/what-parts-of-the-transform-get-reset-in-the-draw-loop-does-the-matrix-stack-get-reset/37454 "2022-06-10T22:32:58Z")

</div>

Asking because this wasn’t clear in the reference. I thought that the entire matrix stack was discarded, but I ran into the cannot push more than 32 time error. Are the translate, rotate, and scale the only things that a…

---

## [Please, help me, really easy question](https://discourse.processing.org/t/please-help-me-really-easy-question/37433)

<div class="topic-metadata">

**Author:** [@Carlos138](https://discourse.processing.org/u/Carlos138)\
**Replies:** 2\
**Last updated:** [June 9, 2022, 8:49pm UTC](https://discourse.processing.org/t/please-help-me-really-easy-question/37433 "2022-06-09T20:49:19Z")

</div>

With this easy code: void setup () { size(500, 500); background(255, 255, 255); } void draw() { if(keyPressed){ if(key=='a'){ rect(20, 20, 50, 50); } } } Why the square didn’t disappear when I stop clic…

---

## [Simple Iterative List](https://discourse.processing.org/t/simple-iterative-list/37398)

<div class="topic-metadata">

**Author:** [@panko](https://discourse.processing.org/u/panko)\
**Replies:** 1\
**Last updated:** [June 8, 2022, 7:53am UTC](https://discourse.processing.org/t/simple-iterative-list/37398 "2022-06-08T07:53:41Z")

</div>

Hi there - I am doing something a few times in a row. I feel like there must be a better way to write this. Can anyone help me? Thank you! PShape square1, square2, square3; void setup() { size(300, 300); // Crea…

---

## [How to count how long a key is pressed](https://discourse.processing.org/t/how-to-count-how-long-a-key-is-pressed/37375)

<div class="topic-metadata">

**Author:** [@gdt1k](https://discourse.processing.org/u/gdt1k)\
**Replies:** 10\
**Last updated:** [June 7, 2022, 9:37am UTC](https://discourse.processing.org/t/how-to-count-how-long-a-key-is-pressed/37375 "2022-06-07T09:37:25Z")

</div>

I’ve been trying to make a program that counts how long you’ve pressed a key. Is this possible in Processing Java? Here’s my code so far: int frames; void keyPressed() { frames++; } void keyReleased() { println(frames…

---

## [How do I get my PDF to render properly?](https://discourse.processing.org/t/how-do-i-get-my-pdf-to-render-properly/37349)

<div class="topic-metadata">

**Author:** [@jakebeamish](https://discourse.processing.org/u/jakebeamish)\
**Replies:** 4\
**Last updated:** [June 6, 2022, 5:58pm UTC](https://discourse.processing.org/t/how-do-i-get-my-pdf-to-render-properly/37349 "2022-06-06T17:58:08Z")

</div>

I’ve just started getting my feet wet with Processing, and I’m having trouble figuring out why I’m having problems with this sketch rendering out PDFs and SVGs that are missing a lot of the picture. I’m using the beginRe…

---

## [How to put a "\>" sign after "==" in an if statement](https://discourse.processing.org/t/how-to-put-a-sign-after-in-an-if-statement/37313)

<div class="topic-metadata">

**Author:** [@mx.pq](https://discourse.processing.org/u/mx.pq)\
**Replies:** 3\
**Last updated:** [June 4, 2022, 5:08am UTC](https://discourse.processing.org/t/how-to-put-a-sign-after-in-an-if-statement/37313 "2022-06-04T05:08:15Z")

</div>

Hi, im kind of new to processing and I am working on a starter fighting game and one of the things that I am using to make it so my character can hit the enemy is if statements. I want to type it out like \< \< if(knight…

---

## [I'm new and I need help with arrays](https://discourse.processing.org/t/im-new-and-i-need-help-with-arrays/37281)

<div class="topic-metadata">

**Author:** [@JosepAlqueza](https://discourse.processing.org/u/JosepAlqueza)\
**Replies:** 3\
**Last updated:** [June 2, 2022, 4:40pm UTC](https://discourse.processing.org/t/im-new-and-i-need-help-with-arrays/37281 "2022-06-02T16:40:41Z")

</div>

Hello everyone! I’m new to the world of programming and need help with arrays. I have to do a practice where I have a multidimensional array (attached image) where the first column appears the position X and the second …

---

## [Time based project](https://discourse.processing.org/t/time-based-project/37258)

<div class="topic-metadata">

**Author:** [@activegenius](https://discourse.processing.org/u/activegenius)\
**Replies:** 1\
**Last updated:** [June 1, 2022, 3:44am UTC](https://discourse.processing.org/t/time-based-project/37258 "2022-06-01T03:44:47Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I am working on a music video project in processing in which I will have a song playing with animations that correspond to the lyrics. I’m wonde…

---

## [Making functions](https://discourse.processing.org/t/making-functions/37196)

<div class="topic-metadata">

**Author:** [@yug717](https://discourse.processing.org/u/yug717)\
**Replies:** 2\
**Last updated:** [May 29, 2022, 8:04am UTC](https://discourse.processing.org/t/making-functions/37196 "2022-05-29T08:04:55Z")

</div>

Hi all!, I have to make this game similar to crossy road for a project. My pedestrain is meant to have a certain number of lives (livesLeft) before the game ends. If the pedestrain runs out of lives, the game is meant to…

---

## [How to make per box the lightest to darkest color in a Nested loop?](https://discourse.processing.org/t/how-to-make-per-box-the-lightest-to-darkest-color-in-a-nested-loop/37200)

<div class="topic-metadata">

**Author:** [@Stoya](https://discourse.processing.org/u/Stoya)\
**Replies:** 2\
**Last updated:** [May 29, 2022, 5:30am UTC](https://discourse.processing.org/t/how-to-make-per-box-the-lightest-to-darkest-color-in-a-nested-loop/37200 "2022-05-29T05:30:53Z")

</div>

Hello! I’m asking for advice. I’m experimenting on how can one make the first box the lightest value then it gradually goes darker per box. So if I input the color blue, it’ll show the lightest blue at the first box of t…

---

## [How do I make my score for the game increase by 1 and have it displayed on the bottom corner?](https://discourse.processing.org/t/how-do-i-make-my-score-for-the-game-increase-by-1-and-have-it-displayed-on-the-bottom-corner/37160)

<div class="topic-metadata">

**Author:** [@itisti21](https://discourse.processing.org/u/itisti21)\
**Replies:** 25\
**Last updated:** [May 28, 2022, 4:06pm UTC](https://discourse.processing.org/t/how-do-i-make-my-score-for-the-game-increase-by-1-and-have-it-displayed-on-the-bottom-corner/37160 "2022-05-28T16:06:30Z")

</div>

Hi! I am stuggling with a project I have. I have a game whereby the pedestrian has to pass through lanes without hitting the vehicle and once it does, I need for the scores to go up by 1. I am unsure as to how to do the …

---

## [Making multiple lanes using arrays](https://discourse.processing.org/t/making-multiple-lanes-using-arrays/37161)

<div class="topic-metadata">

**Author:** [@itisti21](https://discourse.processing.org/u/itisti21)\
**Replies:** 19\
**Last updated:** [May 28, 2022, 2:25pm UTC](https://discourse.processing.org/t/making-multiple-lanes-using-arrays/37161 "2022-05-28T14:25:46Z")

</div>

Hi ! I am having issues trying to make multiple lanes for a project. I have made one lane using a loop as it is a dashed lane. I am struggling to make multiple of those lanes in my game using an array. Can someone please…

---

## [Nested Loop 3 Colors, How do I set them their colors in uniform column order?](https://discourse.processing.org/t/nested-loop-3-colors-how-do-i-set-them-their-colors-in-uniform-column-order/37153)

<div class="topic-metadata">

**Author:** [@Stoya](https://discourse.processing.org/u/Stoya)\
**Replies:** 5\
**Last updated:** [May 28, 2022, 4:49am UTC](https://discourse.processing.org/t/nested-loop-3-colors-how-do-i-set-them-their-colors-in-uniform-column-order/37153 "2022-05-28T04:49:23Z")

</div>

Hello! I’ve finished the “6.6: Nested Loops - Processing Tutorial” from the Coding Train and I’ve been wondering about how to set the colours uniformly. Currently, I want the colours to be red, then blue, then green in c…

---

## [Help! Problem with Sound Library not playing properly](https://discourse.processing.org/t/help-problem-with-sound-library-not-playing-properly/37142)

<div class="topic-metadata">

**Author:** [@Flor\_st](https://discourse.processing.org/u/Flor_st)\
**Replies:** 2\
**Last updated:** [May 27, 2022, 11:38pm UTC](https://discourse.processing.org/t/help-problem-with-sound-library-not-playing-properly/37142 "2022-05-27T23:38:04Z")

</div>

I am very new with this so please bare with me I am doing an exercise which involves using two libraries, so the idea is doing something with a video and them play a song. I starts fine but when it gets to the song it p…

---

## [Making a Transparent Background and Exporting to PNG](https://discourse.processing.org/t/making-a-transparent-background-and-exporting-to-png/37073)

<div class="topic-metadata">

**Author:** [@panko](https://discourse.processing.org/u/panko)\
**Replies:** 3\
**Last updated:** [May 25, 2022, 12:30pm UTC](https://discourse.processing.org/t/making-a-transparent-background-and-exporting-to-png/37073 "2022-05-25T12:30:09Z")

</div>

Hi there - I have made a simple design that has a 17x11 grid of circle shapes. I would like to modify this code to save this image as a PNG with a transparent background. Can anyone help me? Thanks! int horiz = 17;…

---

## [Flipcard (based on Topics/Textures/TextureQuad example) Front and Back](https://discourse.processing.org/t/flipcard-based-on-topics-textures-texturequad-example-front-and-back/37024)

<div class="topic-metadata">

**Author:** [@Gus\_Fermin](https://discourse.processing.org/u/Gus_Fermin)\
**Replies:** 12\
**Last updated:** [May 24, 2022, 3:33pm UTC](https://discourse.processing.org/t/flipcard-based-on-topics-textures-texturequad-example-front-and-back/37024 "2022-05-24T15:33:30Z")

</div>

Hi there, Hope this msg finds you well. Greetings from the Dominican Rep. :slight\_smile: I am trying to do a FLIPCARD, meaning, a image on one side and another image on the other side. So that when you rotate it, you s…

---

## [Java, python, p5.js](https://discourse.processing.org/t/java-python-p5-js/37051)

<div class="topic-metadata">

**Author:** [@panko](https://discourse.processing.org/u/panko)\
**Replies:** 2\
**Last updated:** [May 24, 2022, 7:15am UTC](https://discourse.processing.org/t/java-python-p5-js/37051 "2022-05-24T07:15:50Z")

</div>

hi there - i’m curious to see if the community has weighed in on the difference between coding languages offered by Processing at this point. maybe there’s a good resource that compares and contrasts all three. i’m in …

---

## [Simple Pong-like Interactive](https://discourse.processing.org/t/simple-pong-like-interactive/34615)

<div class="topic-metadata">

**Author:** [@hullstar242](https://discourse.processing.org/u/hullstar242)\
**Replies:** 1\
**Last updated:** [May 24, 2022, 2:43am UTC](https://discourse.processing.org/t/simple-pong-like-interactive/34615 "2022-05-24T02:43:10Z")

</div>

I literally started with processing on Monday and decided to try and make a simple animation where the ball is bouncing back and forth, the Y of the ball not changing just the X and have the ball change direction when it…

---

## [How to slow down the switch in draw function?](https://discourse.processing.org/t/how-to-slow-down-the-switch-in-draw-function/33973)

<div class="topic-metadata">

**Author:** [@badbatman](https://discourse.processing.org/u/badbatman)\
**Replies:** 1\
**Last updated:** [May 24, 2022, 6:50am UTC](https://discourse.processing.org/t/how-to-slow-down-the-switch-in-draw-function/33973 "2022-05-24T06:50:06Z")

</div>

How can I slow down the switch i’m using in draw? I’ve played with framerate and delay but it just makes the video('s) very slow which is not what I want, it still need to run smoothly. This is the only way i’ve found o…

---

## [Using Pictures in Arrays](https://discourse.processing.org/t/using-pictures-in-arrays/36957)

<div class="topic-metadata">

**Author:** [@Katharina](https://discourse.processing.org/u/Katharina)\
**Replies:** 4\
**Last updated:** [May 22, 2022, 12:57pm UTC](https://discourse.processing.org/t/using-pictures-in-arrays/36957 "2022-05-22T12:57:57Z")

</div>

So I have this little problem here. I want to use my pictures that I made with arrays. The goal is when you click your mouse the fist picture (array\[0\]) comes up and when u click again the second picture in array\[2\] com…

---

## [How to display multiple line using nested loop](https://discourse.processing.org/t/how-to-display-multiple-line-using-nested-loop/36994)

<div class="topic-metadata">

**Author:** [@Bossinnit](https://discourse.processing.org/u/Bossinnit)\
**Replies:** 4\
**Last updated:** [May 21, 2022, 12:39pm UTC](https://discourse.processing.org/t/how-to-display-multiple-line-using-nested-loop/36994 "2022-05-21T12:39:16Z")

</div>

I am trying to draw a lane through the use of nested loop, where i can control the lanes through use of “final int”, I have pretty much tried everything but didn’t result as i would like to be.

---

## [Hey guys, was wondering how i can make a scoring system and get my character to reset? I also need to be able to change the max score](https://discourse.processing.org/t/hey-guys-was-wondering-how-i-can-make-a-scoring-system-and-get-my-character-to-reset-i-also-need-to-be-able-to-change-the-max-score/36940)

<div class="topic-metadata">

**Author:** [@mosey](https://discourse.processing.org/u/mosey)\
**Replies:** 9\
**Last updated:** [May 20, 2022, 4:13am UTC](https://discourse.processing.org/t/hey-guys-was-wondering-how-i-can-make-a-scoring-system-and-get-my-character-to-reset-i-also-need-to-be-able-to-change-the-max-score/36940 "2022-05-20T04:13:22Z")

</div>

int pedestrianX; int pedestrianY; int vehicleX; int vehicleY; PFont f; int lineX = 0; int lineY = 80; // Vertical location of each line int spacing = 50; // How far apart is each line int len = 50; // L…

---

## [Loop inside loop - find latest loop value](https://discourse.processing.org/t/loop-inside-loop-find-latest-loop-value/36945)

<div class="topic-metadata">

**Author:** [@Erif](https://discourse.processing.org/u/Erif)\
**Replies:** 2\
**Last updated:** [May 18, 2022, 8:40pm UTC](https://discourse.processing.org/t/loop-inside-loop-find-latest-loop-value/36945 "2022-05-18T20:40:47Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hi there, I still have some issues with nested loops conceptually. Is there a way to know what would be the last value of ‘angle’ before the lo…

[Previous page](https://discourse.processing.org/c/processing/processing-beginners/14.md?page=10)

[Next page](https://discourse.processing.org/c/processing/processing-beginners/14.md?page=12)
