Making a square bigger while clicking, Processing.

‘Making a square bigger when clicking’

Today we’re creating a square that gets bigger every time you click the mouse and when you hit any key on the keyboard it resets to the size it started at.

Here’s a picture of the code, I have changed the color of the background and the size of the square, I also made sure I was using camelCase within the code for other people to understand it better.pic of code

pic of code after

 

 

 

 

 

I added comments into the code so it makes other people understand the code better.

after adding commnets

 

 

After completing adding the text in the code I decided to add text in the game saying:

  • ‘Click to increase the square’
  • ‘Click any key to reset the square’

code with new text

After adding text into the game this is the final result.

picture with new text

 

 

 

 

 

 

 

 

2 thoughts on “Making a square bigger while clicking, Processing.

Add yours

Leave a reply to error Cancel reply

Blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started