Skip to content

Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.

Cookie Clicker: README, pictures, media and font licenses

Mason363445585d91b38
diff --git a/LICENSES/OFL-1.1-Kavoon.txt b/LICENSES/OFL-1.1-Kavoon.txt
new file mode 100644
index 00000000..1412db69
--- /dev/null
+++ b/LICENSES/OFL-1.1-Kavoon.txt
@@ -0,0 +1,93 @@
+Copyright (c) 2011-2012, Sorkin Type Co (www.sorkintype.com) with Reserved Font Name 'Kavoon'
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/LICENSES/OFL-1.1-Merriweather.txt b/LICENSES/OFL-1.1-Merriweather.txt
new file mode 100644
index 00000000..17d2c515
--- /dev/null
+++ b/LICENSES/OFL-1.1-Merriweather.txt
@@ -0,0 +1,93 @@
+Copyright 2020 The Merriweather Project Authors (https://github.com/EbenSorkin/Merriweather4) with Reserved Font Name "Merriweather".
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+https://openfontlicense.org
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/LICENSES/OFL-1.1-NotoSans.txt b/LICENSES/OFL-1.1-NotoSans.txt
new file mode 100644
index 00000000..6843f318
--- /dev/null
+++ b/LICENSES/OFL-1.1-NotoSans.txt
@@ -0,0 +1,93 @@
+Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+https://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/docs/media/cookieclicker.gif b/docs/media/cookieclicker.gif
new file mode 100644
index 00000000..11dd1686
Binary files /dev/null and b/docs/media/cookieclicker.gif differ
diff --git a/docs/media/gallery/cookieclicker.gif b/docs/media/gallery/cookieclicker.gif
index 7c9fdc23..e8086744 100644
Binary files a/docs/media/gallery/cookieclicker.gif and b/docs/media/gallery/cookieclicker.gif differ
diff --git a/docs/media/thumb_cookieclicker.png b/docs/media/thumb_cookieclicker.png
index 413c5b18..9c768bce 100644
Binary files a/docs/media/thumb_cookieclicker.png and b/docs/media/thumb_cookieclicker.png differ
diff --git a/games/cookieclicker/README.md b/games/cookieclicker/README.md
index a1a68edc..ff7621ef 100644
--- a/games/cookieclicker/README.md
+++ b/games/cookieclicker/README.md
@@ -1,37 +1,92 @@
-# Cookie Clicker
+> **Cookie Clicker is a [NumPlay](../../README.md) game that comes on its own.** It is too big to sit next to NumPlay. Get `CookieClicker.nwa` from the [latest release](https://github.com/Mason363/NumPlay/releases/latest).
-Click the big cookie. Buy buildings that bake for you, upgrades that make them bake more, and catch the golden cookies. Orteil's idle game for the NumWorks calculator, with its own numbers, names and news.
+<p align="center">
+ <img src="src/icon.png" width="84" alt="Cookie Clicker icon">
+</p>
-<img src="docs/shot.png" width="320" alt="A young bakery: 128 cookies, three cursors and a grandma">
+<h1 align="center">Cookie Clicker</h1>
-- **The 20 buildings**, from the Cursor and the Grandma to the Cortex baker and You, at the game's prices and cookies per second, each one 15% dearer than the last. Buy 1, 10 or 100 at a time; the next two you can't afford yet show as **???**, as in the game.
-- **Upgrades with their real names and prices:** the cursor's Reinforced index finger, Carpal tunnel prevention cream, Ambidextrous and Thousand fingers (which grow with every other building you own), the first three tiers of every building's upgrades (Forwards from grandma, Cheap hoes, Sugar gas...), the mice that make each click worth a part of your cookies per second, flavored cookies from Plain cookies on, Lucky day, Serendipity and Get lucky. They show up as your bakery grows, cheapest first.
-- **Golden cookies** appear every 5 to 15 minutes and stay 13 seconds: catch one for **Frenzy** (production x7 for 77 seconds), **Lucky!** (15% of your bank, up to 15 minutes of production) or, now and then, **Click frenzy** (clicks x777 for 13 seconds).
-- **59 achievements** with the game's names, from Wake and bake to Clickolympics, and the **milk** they fill: every achievement is 4% milk, every 25 change its flavor, and the kitten upgrades turn it into more cookies.
-- **The news ticker** tells how famous your cookies have become, from "nobody wants to eat your cookies" to the elder gods.
-- The numbers read like the game's: 123,456, then 1.234 million, 56.7 billion and on to the duodecillions.
-- Your bakery is saved as you play and when you leave. It only bakes while the game is open: the calculator has no clock to tell how long it was closed.
+<p align="center">
+ <b>Click the big cookie, bake billions, then quadrillions, on the NumWorks calculator.</b><br>
+ Orteil's whole game with its own pictures: every building, upgrade and achievement, golden and wrath cookies, the grandmapocalypse, ascension and the heavenly upgrades, sugar lumps, the dragon, Santa, the Grimoire and the Pantheon.
+</p>
-Left out to fit in NumPlay: ascension and prestige, selling buildings, grandma types, the higher tiers of upgrades and achievements, wrath cookies and the building specials, sugar lumps and the minigames.
+<p align="center">
+ <a href="https://github.com/Mason363/NumPlay/releases/latest/download/CookieClicker.nwa"><b>Download CookieClicker.nwa</b></a>
+ &nbsp;·&nbsp; <a href="#controls">Controls</a>
+</p>
+
+<p align="center">
+ <img src="../../docs/media/cookieclicker.gif" width="640" alt="Clicking the big cookie, a golden cookie caught for a Frenzy, upgrades bought, the Grimoire, then an ascension">
+</p>
+
+## Highlights
+
+* **The game's own look, at the calculator's size:** the big cookie with its shine turning behind it and its squash when you click, the blue background and the cookies falling down it, the cursors circling, the milk rising with your achievements (all 25 flavors), the numbers floating up, the store on the right with the upgrades in their crates and the buildings on their wooden tiles, the news ticker at the top, the game's fonts, icons and pictures.
+* **All 20 buildings**, from the Cursor and the Grandma to the Idleverse, the Cortex baker and You, at the game's prices and cookies per second. Buy 1, 10 or 100 at a time, or sell them back. The next ones you can't afford yet show as dark silhouettes and **???**.
+* **Every upgrade, 700-odd of them:** the cursors' fingers, every tier of every building's upgrades up to the fifteenth, the synergies, the grandma types (farmer, worker, miner, cosmic... and the elves and bunnies of the seasons) who show up in the grandmas' row, the kittens, the hundreds of flavored cookies, the golden cookie upgrades, the research and the grandmapocalypse's covenant and pledge, the switches, and the fortunes the ticker gives.
+* **622 achievements** and the shadow ones, with their names, descriptions and quotes, and the milk they fill.
+* **Golden cookies** (Frenzy, Lucky!, Click frenzy, Cookie chain, Cookie storm, the building specials, Dragon Harvest, Dragonflight...) and **wrath cookies** (Clot, Ruin, Elder frenzy, Cursed finger) when the elders are angry; the **grandmapocalypse**, its background turning red, and the **wrinklers** that eat your cookies and give them back, and more, when popped.
+* **The buildings' rows**, as in the middle of the game's screen: each building owned on its own background, as many of its pictures as fit, set the game's way, your grandmas named and aged.
+* **The Grimoire:** magic that refills by itself, its nine spells (Conjure Baked Goods, Force the Hand of Fate, Stretch Time, Spontaneous Edifice, Haggler's Charm, Summon Crafty Pixies, Gambler's Fever Dream, Resurrect Abomination, Diminish Ineptitude) and their backfires.
+* **The Pantheon:** the eleven spirits, the diamond, ruby and jade slots, and the worship swaps that come back with time.
+* **Ascension:** the cookie bursts, then the heavens open with **all 129 heavenly upgrades** in their tree to buy with heavenly chips, the permanent upgrade slots, the Born again challenge, and a new run.
+* **Sugar lumps** that grow, ripen and level your buildings up; **Krumblor the cookie dragon** and its 21 auras; **Santa**'s 15 stages; the **seasons** of the season switcher, with their reindeer, eggs, hearts and spooky drops.
+* **The news ticker**, every English line of it, and **statistics** and **options** as the game has them.
+* **Saves:** the game saves itself every minute and when you leave, also in `cookieclicker_saves.py`, so installing the app again doesn't erase your bakery.
+
+<table>
+ <tr>
+ <td align="center"><img src="docs/shot.png" width="390" alt="A Frenzy"><br><sub>A golden cookie caught: Frenzy</sub></td>
+ <td align="center"><img src="docs/store.png" width="390" alt="The store's upgrades"><br><sub>The store's upgrades, and one's tooltip</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/rows.png" width="390" alt="The buildings' rows"><br><sub>The buildings' rows: the grandmas, the farms, the mines</sub></td>
+ <td align="center"><img src="docs/wrinklers.png" width="390" alt="Wrinklers"><br><sub>The grandmapocalypse: wrinklers on the cookie</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/grimoire.png" width="390" alt="The Grimoire"><br><sub>The Grimoire and its spells</sub></td>
+ <td align="center"><img src="docs/pantheon.png" width="390" alt="The Pantheon"><br><sub>The Pantheon's spirits and slots</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/ascending.png" width="390" alt="Ascending"><br><sub>Ascending: the cookie bursts</sub></td>
+ <td align="center"><img src="docs/heavens.png" width="390" alt="The heavenly upgrades"><br><sub>The heavens and their upgrades</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/stats.png" width="390" alt="Achievements"><br><sub>Statistics: the achievements</sub></td>
+ <td align="center"><img src="docs/dragon.png" width="390" alt="Krumblor"><br><sub>Krumblor, cookie dragon</sub></td>
+ </tr>
+</table>
## Controls
-| Key | Action |
+| Key | What it does |
| --- | --- |
-| OK (or 5) | Click the big cookie |
-| shift | Catch a golden cookie |
-| Up, Down (or 8, 2) | Choose a building, an upgrade or an achievement |
-| Left, Right (or 4, 6) | Upgrades, Buildings, Stats |
-| EXE | Buy it |
-| × | Buy 1, 10 or 100 buildings at a time |
-| Back | Menu: Resume, How to play, Quit game |
+| OK | Click the big cookie |
+| Arrows | Choose in the store (up from its top: the news ticker) |
+| EXE | Buy (or sell) what is chosen; press the news ticker |
+| ÷ | Buy / sell |
+| × | 1, 10, 100 at a time (and all, to sell) |
+| shift | Click a golden cookie, a wrath cookie or a reindeer |
+| var | Pop a wrinkler (three hits) |
+| x,n,t | Harvest the sugar lump |
+| alpha | The buildings' rows: EXE on one to level it up or open its minigame |
+| 1 to 9 | Cast a spell, in the Grimoire |
+| toolbox | Statistics |
+| ⌫ | Close a note |
+| Back | The menu: Options, Statistics, Info, Legacy (ascend), Santa, Krumblor, Keys, Save |
+| Home | Save and quit |
-## Credits
+On the heavens: the arrows go from upgrade to upgrade, EXE buys one (or chooses a permanent slot's upgrade), shift picks the challenge mode and Back reincarnates.
+
+## Differences
-Cookie Clicker is **[Orteil](https://orteil.dashnet.org)**'s game (DashNet, 2013). This version is written in C for NumPlay: the numbers, the names of the buildings, upgrades and achievements and the news follow the game (version 2.05), the cookie, the store's pictures and everything else are drawn for the calculator. It isn't affiliated with Orteil or DashNet.
+* The calculator has no clock: the game counts the time it runs, so the bakery doesn't bake while it is closed, and **sugar lumps grow 24 times faster** to make up for it. A season from the season switcher lasts 24 hours of play.
+* Golden cookies come to the left column, where the big cookie is.
+* There is no sound. The Garden and the Stock Market, the farms' and banks' minigames, are not here yet.
-Inside NumPlay it draws with the launcher's own shapes and fonts and unpacks its names with NumPlay's DEFLATE decoder, so the game itself is about 11 KB. `tools/data.py` makes `src/data.h` (the names, news and pictures); `tools/icon.py` draws the icon.
+## Credits
-It comes inside [NumPlay](https://github.com/Mason363/NumPlay), or on its own as `CookieClicker.nwa` from the [latest release](https://github.com/Mason363/NumPlay/releases/latest).
+**Cookie Clicker** is by **[Orteil](https://orteil.dashnet.org)** and Opti (DashNet). This version is written in C for the NumWorks calculator: its pictures, texts, numbers and rules are the game's own (version 2.058), read from the game's public mirror [ozh/cookieclicker](https://github.com/ozh/cookieclicker) by `tools/fetch.py`, `tools/extract.js` (which runs the game's script for its numbers and texts) and `tools/pack.py` (which packs them into `src/data.bin`). Its fonts are **Merriweather**, **Kavoon** and **Noto Sans** (SIL Open Font License: [Merriweather](../../LICENSES/OFL-1.1-Merriweather.txt), [Kavoon](../../LICENSES/OFL-1.1-Kavoon.txt), [Noto Sans](../../LICENSES/OFL-1.1-NotoSans.txt)). Not affiliated with Orteil or DashNet.
-Build: `make` (needs `arm-none-eabi-gcc` and Node.js for nwlink).
+Build: `make` (needs `arm-none-eabi-gcc` and Node.js for nwlink); `make host test` plays it on a computer, and `make data REF=<folder>` packs the data again from what `python3 -I tools/fetch.py <folder>` gathers.
diff --git a/games/cookieclicker/docs/ascending.png b/games/cookieclicker/docs/ascending.png
new file mode 100644
index 00000000..352a38f1
Binary files /dev/null and b/games/cookieclicker/docs/ascending.png differ
diff --git a/games/cookieclicker/docs/dragon.png b/games/cookieclicker/docs/dragon.png
new file mode 100644
index 00000000..7129fe70
Binary files /dev/null and b/games/cookieclicker/docs/dragon.png differ
diff --git a/games/cookieclicker/docs/grimoire.png b/games/cookieclicker/docs/grimoire.png
new file mode 100644
index 00000000..e1c9244e
Binary files /dev/null and b/games/cookieclicker/docs/grimoire.png differ
diff --git a/games/cookieclicker/docs/heavens.png b/games/cookieclicker/docs/heavens.png
new file mode 100644
index 00000000..512dd71f
Binary files /dev/null and b/games/cookieclicker/docs/heavens.png differ
diff --git a/games/cookieclicker/docs/pantheon.png b/games/cookieclicker/docs/pantheon.png
new file mode 100644
index 00000000..79e10007
Binary files /dev/null and b/games/cookieclicker/docs/pantheon.png differ
diff --git a/games/cookieclicker/docs/rows.png b/games/cookieclicker/docs/rows.png
new file mode 100644
index 00000000..7107b7f1
Binary files /dev/null and b/games/cookieclicker/docs/rows.png differ
diff --git a/games/cookieclicker/docs/shot.png b/games/cookieclicker/docs/shot.png
index 78579272..8ea1887b 100644
Binary files a/games/cookieclicker/docs/shot.png and b/games/cookieclicker/docs/shot.png differ
diff --git a/games/cookieclicker/docs/stats.png b/games/cookieclicker/docs/stats.png
new file mode 100644
index 00000000..1b6c6aec
Binary files /dev/null and b/games/cookieclicker/docs/stats.png differ
diff --git a/games/cookieclicker/docs/store.png b/games/cookieclicker/docs/store.png
new file mode 100644
index 00000000..b7a31f9c
Binary files /dev/null and b/games/cookieclicker/docs/store.png differ
diff --git a/games/cookieclicker/docs/wrinklers.png b/games/cookieclicker/docs/wrinklers.png
new file mode 100644
index 00000000..82dab5f5
Binary files /dev/null and b/games/cookieclicker/docs/wrinklers.png differ
diff --git a/games/cookieclicker/src/icon.png b/games/cookieclicker/src/icon.png
index 18701cbf..8bc37ea8 100644
Binary files a/games/cookieclicker/src/icon.png and b/games/cookieclicker/src/icon.png differ
diff --git a/games/cookieclicker/src/ui.c b/games/cookieclicker/src/ui.c
index a05d39fa..f99c95d5 100644
--- a/games/cookieclicker/src/ui.c
+++ b/games/cookieclicker/src/ui.c
@@ -152,7 +152,8 @@ void draw_prompt(void) {
}
/* ------------------------------------------------------------------ the news */
-#define NEWS_X 22
+/* where the news starts: past the sugar lump and its count, once there are lumps */
+#define NEWS_X (can_lumps() ? 38 : 4)
void ui_news_next(void) {
char t[sizeof U.news[0]];
news_next(t, sizeof t);
@@ -218,16 +219,16 @@ void draw_news(void) {
gfx_rect(NEWS_X - 2, 0, SCREEN_W - NEWS_X + 2, NEWS_H - 2, RGB(255, 238, 200), 200);
gfx_fill_alpha(NEWS_X - 1, 1, SCREEN_W - NEWS_X, NEWS_H - 4, WHITE, 20);
}
- /* the sugar lump */
+ /* the sugar lump, growing, and how many there are */
if (can_lumps()) {
int icon, icon2;
float o;
lump_icons(&icon, &icon2, &o);
- gfx_icon_scaled(icon, 1, 0, 18, 256);
- if (o > 0 && o < 1) gfx_icon_scaled(icon2, 1, 0, 18, (int)(o * 256));
+ gfx_icon_scaled(icon, 0, -1, 20, 256);
+ if (o > 0 && o < 1) gfx_icon_scaled(icon2, 0, -1, 20, (int)(o * 256));
char t[16];
snprintf(t, sizeof t, "%.0f", S.lumps);
- gfx_text_outline_center(F_SMALL, 10, NEWS_H - 2, t, WHITE, 256);
+ gfx_text_outline(F_NAME_SMALL, 20, 13, t, WHITE, 256);
}
}
diff --git a/games/cookieclicker/tests/play.c b/games/cookieclicker/tests/play.c
index 16c0081c..4f69bec3 100644
--- a/games/cookieclicker/tests/play.c
+++ b/games/cookieclicker/tests/play.c
@@ -112,7 +112,7 @@ static void preset(const char *name) {
buy_upgrades(2000);
S.cookies = 1400;
} else if (!strcmp(name, "mid") || !strcmp(name, "golden") || !strcmp(name, "wrath") || !strcmp(name, "grimoire") ||
- !strcmp(name, "wrinklers") || !strcmp(name, "pantheon")) {
+ !strcmp(name, "wrinklers") || !strcmp(name, "pantheon") || !strcmp(name, "show")) {
S.cookies_earned = 6.2e9, S.cookie_clicks = 5400, S.handmade_cookies = 2.1e7;
static const int n[] = {80, 70, 50, 40, 35, 25, 20, 15, 8, 3};
for (int b = 0; b < 10; b++) own(b, n[b]);
@@ -135,6 +135,12 @@ static void preset(const char *name) {
bit_set(S.upgrades_bought, U_ONE_MIND, true), bit_set(S.upgrades_bought, U_COMMUNAL_BRAINSWEEP, true);
for (int i = 0; i < 6; i++) S.wrinklers[i].phase = 2, S.wrinklers[i].close = 1, S.wrinklers[i].hp = 2.1f;
}
+ if (!strcmp(name, "show")) { /* (for the pictures: a golden cookie soon, the Grimoire ready) */
+ S.buildings[B_WIZARD_TOWER].level = 1;
+ extern void grimoire_reset(bool hard);
+ grimoire_reset(true);
+ S.golden_time = S.golden_max;
+ }
if (!strcmp(name, "pantheon")) {
S.buildings[B_TEMPLE].level = 1;
S.gods[0] = GOD_INDUSTRY + 1, S.gods[2] = GOD_AGES + 1, S.swaps = 2;
diff --git a/games/cookieclicker/tools/pack.py b/games/cookieclicker/tools/pack.py
index e1d99ffb..380433af 100644
--- a/games/cookieclicker/tools/pack.py
+++ b/games/cookieclicker/tools/pack.py
@@ -29,11 +29,12 @@ import struct
import sys
import numpy as np
-from PIL import Image, ImageFont
+from PIL import Image, ImageDraw, ImageFont
HERE = os.path.dirname(os.path.abspath(__file__))
OUT_BIN = os.path.join(HERE, "..", "src", "data.bin")
OUT_H = os.path.join(HERE, "..", "src", "data.h")
+OUT_ICON = os.path.join(HERE, "..", "src", "icon.png")
S = 0.37 # the left column's pictures (the big cookie: 256 -> 95 pixels)
# the characters past ASCII the texts and fonts have, from 0x80 on
@@ -953,6 +954,20 @@ def main(ref, game_json):
defs.append(f"#define IM_{name} {i}")
defs.append(f"#define DATA_SIZE {len(P.blob)}")
+ # ---- the app's icon: the big cookie on the blue background, its shine and shadow, rounded corners
+ icon = Image.new("RGBA", (55, 56))
+ bg = load(ref, "bgBlue.jpg").resize((110, 110), Image.LANCZOS).crop((27, 27, 82, 83))
+ icon.alpha_composite(bg)
+ icon.alpha_composite(premul_resize(load(ref, "shadedBordersSoft.png"), (55, 56)))
+ shine = premul_resize(load(ref, "flare.png"), (60, 60))
+ icon.alpha_composite(shine, (-3, -2))
+ icon.alpha_composite(premul_resize(load(ref, "cookieShadow.png"), (46, 46)), (5, 9))
+ icon.alpha_composite(premul_resize(load(ref, "perfectCookie.png"), (45, 45)), (5, 5))
+ mask = Image.new("L", (55 * 4, 56 * 4), 0)
+ ImageDraw.Draw(mask).rounded_rectangle((0, 0, 55 * 4 - 1, 56 * 4 - 1), radius=40, fill=255)
+ icon.putalpha(Image.fromarray(np.minimum(np.asarray(icon)[..., 3], np.asarray(mask.resize((55, 56), Image.LANCZOS)))))
+ icon.save(OUT_ICON)
+
with open(OUT_BIN, "wb") as f:
f.write(P.blob)
lines = ["/* Written by tools/pack.py: what data.bin holds. */", "#ifndef CC_DATA_H", "#define CC_DATA_H", ""]