# How to create a point system

**URL:** https://discourse.processing.org/t/how-to-create-a-point-system/9179
**Category:** Coding Questions
**Created:** [March 10, 2019, 8:56pm UTC](https://discourse.processing.org/t/how-to-create-a-point-system/9179 "2019-03-10T20:56:42Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [March 10, 2019, 9:52pm UTC](https://discourse.processing.org/t/how-to-create-a-point-system/9179/8 "2019-03-10T21:52:36Z")

</div>

Remember to hit **ctrl-t** in processing to get auto-format

**Remark 1**

popped is actually similar to isAlive.

Are they the same?

I mean do they serve the same functions? Then you should unify them and get rid of one.

**Remark 2**

You only have 2 balloons at the moment. You could **restart** a balloon that is at the top.

In the if-clause in the function `top()` :

```auto
x=random(width-diameter); 
y=height+diameter+random(30); 
isAlive=true; 
popped=false;
diameter=random(18,62); 

```

**Remark 3**

Here is a similar thing with many balloons. Instead of restarting them they are managed in an `ArrayList` and added and removed from it.

> [@Newbie - Trying to make a "Taiko"-like game](https://discourse.processing.org/t/newbie-trying-to-make-a-taiko-like-game/9120/3):
>
> That requires a small timer and then the boules.add(... part from above. The position of the ball is randomly, see command random(). A timer looks like this: if(millis() - timeStarted \> 1000){ boules.add(new Boule......... timeStarted=millis(); } Example Example not using your code above… ArrayList\<Ball\> balls = new ArrayList(); int timeStarted=0; void setup() { size(800, 800); noStroke(); timeStarted=-1000; } // func void draw() { background(255); // for-lo…

Regards, Chrisir

---

_[View the full topic](https://discourse.processing.org/t/how-to-create-a-point-system/9179)._
