Quote (carteblanche @ Dec 5 2016 11:24pm)
from looking at his numerous topics, very few of his problems has to do with processingjs-specific knowledge. just general coding knowledge is usually sufficient to help the poor guy out. i've just lost interest in his lack of desire to trouble shoot, so i gave up holding his hand.
offhand, i have a few guesses.
where's your code for btn1 that executes when you click it?
Code
var drawRects = function () {
for (var i = 0; i < randomRects.length; i++) {
soo....randomRects.length is always 0, so drawRects doesn't really do much. the only time you increase the length is when you call levelUp. which, by the way, you never call.
i recommend you either
add logging or debug to see what code is getting executing "after the player clicks ready". it will answer many of your questions.
I am awful at debugging. I looked up the println method and I'm starting to realize what you mean here. This is what I've narrowed down/changed:
- on line 2 where i declared my levelNumber variable, I left it empty (not set to 0 anymore). So it looks like this: var levelNumber;
- on line 87, in my scene2 function, I call levelUp();
I used the println method to see if anything had changed, which it did. It looks like the levels are increasing now as you can see in the console, every time I hit "click to play," the console increases by 1. (it says 5 because I hit click to play 5 times each time it increased by 1)

Then I chose to see what happens when I println randomRects. Nothing displays so I think it has something to do with a for loop, somewhere.

What do you mean by the bold?
This post was edited by Shakti on Dec 6 2016 02:49am