# Modifying a game: score, random, display

**URL:** <https://discourse.processing.org/t/modifying-a-game-score-random-display/22785>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [July 22, 2020, 8:41pm UTC](https://discourse.processing.org/t/modifying-a-game-score-random-display/22785 "2020-07-22T20:41:48Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 23, 2020, 5:17pm UTC](https://discourse.processing.org/t/modifying-a-game-score-random-display/22785/14 "2020-07-23T17:17:12Z")

</div>

Hello,

Stop asking questions (I counted 4) and start writing code. \<\< That is encouragement and the same advise I give everyone. `:)`

Every time I have an idea or given a suggestion… I research it, explore it, start writing a simple example to understand it and then may integrate it into my code.

There are numerous posts on timers.  
Look at them, try them out and then write them out on your own; the last step will help you understand them and a good exercise.

A few of mine:

> [@Need assistance with timing! \[millis()\]](https://discourse.processing.org/t/need-assistance-with-timing-millis/18854/4):
>
> I provided a simple example: int whattimeisitnow; int whattimeisitatstartofstopwatch; int timepassedtoresetstopwatch = 1000; //setup runs once void setup() { whattimeisitatstartofstopwatch = millis(); } //draw loops 60 frames per sec void draw() { whattimeisitnow = millis(); if (whattimeisitnow \> whattimeisitatstartofstopwatch + timepassedtoresetstopwatch) { println("1000 ms have passed!"); whattimeisitatstartofstopwatch = millis(); //reset st…

> [@Some questions about millis()](https://discourse.processing.org/t/some-questions-about-millis/19541/3):
>
> Hello, You can’t reset millis(). You can start a time elapsed counter that counts from the time started. A simple example: int timeStart; int timeElapsed; void setup() { timeStart = millis(); } void draw() { timeElapsed = millis() - timeStart; println(timeElapsed); } void keyPressed() { timeStart = millis(); //Resets time elapsed counter }slight_smile Other millis() examples here:

`:)`

---

_[View the full topic](https://discourse.processing.org/t/modifying-a-game-score-random-display/22785)._
