# Maximum score

**URL:** https://forum.makecode.com/t/maximum-score/3940
**Category:** Game Design
**Created:** [October 17, 2020, 7:50pm UTC](https://forum.makecode.com/t/maximum-score/3940 "2020-10-17T19:50:56Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)
#### Post date: [October 17, 2020, 7:50pm UTC](https://forum.makecode.com/t/maximum-score/3940/1 "2020-10-17T19:50:56Z")

</div>

A quick question if I may ask. 😁  
Is there a maximum score that can be set? ([https://arcade.makecode.com/reference/info/score](https://arcade.makecode.com/reference/info/score))

Don’t worry, I should really answer my own question by investigating the possibility.

> **[Number.MAX\_VALUE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE)**
>
> The Number.MAX\_VALUE property represents the maximum numeric value representable in JavaScript.

I didn’t try reaching the maximum value, but I noticed that the ‘info.score’ only has room for 10 decimal places to the left.

---

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [October 17, 2020, 7:57pm UTC](https://forum.makecode.com/t/maximum-score/3940/2 "2020-10-17T19:57:10Z")

</div>

```
If score = x
change score by -1

```

where x-1 = max score

---

<div class="post-metadata">

### Author: ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)
#### Post date: [October 17, 2020, 9:52pm UTC](https://forum.makecode.com/t/maximum-score/3940/3 "2020-10-17T21:52:13Z")

</div>

I have another question relating to the score in ‘info’. Is there anyway to reset the highest score of a game ? Or does this happen automatically when you publish a new version?

---

<div class="post-metadata">

### Author: ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)
#### Post date: [October 18, 2020, 4:04pm UTC](https://forum.makecode.com/t/maximum-score/3940/4 "2020-10-18T16:04:36Z")

</div>

Just some observations and thoughts; I haven’t dug through the source code to verify. 🙂

The game’s `score` appears to be stored as an integer and not a floating-point data type. It looks like it rolls over at around two billion, so I’m guessing it’s a signed 32-bit integer.

As far as high score, it should be stored in the browser’s data store along with the game. So, convincing MakeCode Arcade that you have a new game would cause the high score to reset. Clearing your browser’s data store, duplicating the game, or opening the game in your browser’s anonymous mode are a few ways that I can think of to open the game with an initialized state. Publishing a new copy of the game generates a new URL, so using that new URL should also convince MakeCode Arcade that you are playing a new game and give you a clean state.

---

<div class="post-metadata">

### Author: ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)
#### Post date: [October 18, 2020, 6:23pm UTC](https://forum.makecode.com/t/maximum-score/3940/5 "2020-10-18T18:23:05Z")

</div>

Thank you Alex for explaining that. It makes sense indeed, that a new web page would contain a new cache.
