USA Clicker
Jace Mougne · America 250 mini MYP Personal Project
Objective A: Planning
My learning goal
My learning goal was to learn how to write JavaScript well enough to build a working program from an empty file, and to use it to answer our class question: what does it mean to be an American?
This goal came from a personal interest. I run a Raspberry Pi at home that hosts a few websites, and I look after it myself. That is what led to the goal, because it also showed me what I was missing. I could set up and run software, but I could not write any. So the goal had to end with a program I wrote myself, running on my own server. I also knew I never finish practice exercises, because they stop mattering once they work. Tying the code to the America 250 question fixed that, because then every hour I spent coding was also an hour spent on the question.
| S | Learn the main parts of JavaScript by using each one for a real reason: variables, arrays, objects, loops, functions, and changing a web page. At the same time, research American history and split it into eras. |
| M | I will know I have learned enough when I can build a whole feature on my own, without being given the code. For the history, when I can cover 1492 to today with no gap bigger than about thirty years. |
| A | I already know HTML and CSS and already have the server, so JavaScript is the only new part. I will start with one button that counts and add one feature at a time. |
| R | I want to work with computers. Writing software instead of only running it is the skill everything else I want to do is built on. |
| T | Done by 3 September 2026. |
My product goal
My product is USA Clicker, a browser game about American history that anyone can play online. You click to earn money and spend it on buildings from the time period you are in. Those buildings then earn money on their own, which pays for bigger buildings, which unlocks the next era. Each era has its own currency, its own summary and its own list of real dated events, so moving forward in the game means moving forward in time. I picked a clicker game because a clicker rewards you for going forward, and here going forward means living through the history instead of just reading it.
| S | A single web page, written in HTML, CSS and JavaScript, where the player clicks for money, buys historical buildings that earn on their own, buys upgrades, and unlocks the eras of American history in order. |
| M | Done when all eight success criteria below are met, and when someone who has never seen it can start at zero and reach the modern era without me explaining anything. |
| A | No single part is hard; there are just a lot of parts. Writing the history as a plain list first, and the game rules second, means adding an era is adding a few lines instead of rewriting the game. |
| R | A game makes someone go through the timeline in order and at their own speed, which is how I wanted the question answered. It also proves the learning goal, because you cannot fake a working game. |
| T | Finished and online by 3 September 2026. |
My success criteria
- The game covers 1492 to today in at least 5 eras, with no gap bigger than about thirty years.
- Every era has a summary in my own words and at least four real events with real dates.
- At least eight entries name a specific cost paid by a specific group, so the game is not just a highlight reel of good news.
- The player cannot skip those entries. Reaching a new era needs a minimum of every building in the era you are in, not just money.
- It is a real game, not a slideshow: clicking earns money, buildings earn on their own, and prices go up as you buy so your choices matter.
- It remembers you. Progress survives closing the tab, and you earn something while you are away.
- Impact on me: by the end I can write a whole feature without being given the code. I will test this on the last feature I build.
- Impact on others: it is online on a public link, and at least three people play it and can each name one thing it taught them.
My plan
I planned it in stages, each one adding a single new idea to something that already worked. My rule was that the game had to run at the end of every stage, so I always had a working version and any new bug had to be from the thing I had just added.
| Date | What I plan to do | Criteria |
|---|---|---|
| 25 Aug | Decide what question my project answers, and research where each era of American history starts and stops. | 1 |
| 26-27 Aug | Write the history out as a plain list: each era with its name, years, currency, summary and events. Then the building list, checking every fact. | 1, 2, 3 |
| 28 Aug | Build one button that counts and shows the number, so I learn how to change a page before anything else is built on top. | 5 |
| 29-31 Aug | Add the shop, rising prices, money per second, upgrades, and the rules that unlock each era. | 3, 4, 5 |
| 1 Sept | Write the save system on my own, add the stats panel, and lay the page out so it also works on a phone. | 6, 7 |
| 2 Sept | Put it online on the Raspberry Pi, test the link from another device, and write this report. | 8 |
| 3 Sept | Get three people to play it, write down what they say, and finish the reflection. | 8 |
| 4 Sept | Project due when class begins. | |
Objective B: Applying skills
I used three ATL skills the most: research, critical thinking and organization.
Research
For my learning goal. Nearly all the JavaScript I learned came from reading documentation and then testing whether I had actually understood it. The clearest example is saving. I knew I wanted progress to survive closing the tab, but not how. Reading about browser storage told me two things I did not expect: it only stores text, and it is tied to one website. That meant I could not just hand it my game, because my game is stored as an object, not text. So I had to learn how to turn an object into text and back again. One question I looked up taught me three things, and I only found the other two because I read properly instead of copying a snippet.
For my product goal. Research decided what went into the game, and it changed the whole structure. My first timeline was a list of inventions, which is what most sources give you. But inventions do not explain each other, and a list of them quietly argues that America is its gadgets. So I switched to eras, which forced a harder question: when does an era end? The honest answer is that they overlap. The Space Race runs 1957 to 1975 while the Postwar Boom runs 1946 to 1968, so they share twelve years. I left that overlap in instead of tidying it up, because pretending history splits cleanly would have been the less accurate answer. Every one of the 86 buildings also carries a fact I checked first, like Ford's 1913 assembly line cutting Model T build time from twelve hours to about ninety minutes.
Critical thinking
For my learning goal. Balancing the money was the hardest thinking in the project, and it turned out to be maths rather than code. Each copy of a building costs 1.15 times the last one, so the tenth costs about four times the first. That one number decides whether the game is boring or impossible. I only understood why it works after testing it: the cost multiplies but the income only adds, so buying more of one thing always stops being worth it eventually, which is what pushes the player onward. Getting the pacing from a rule I could reason about, instead of numbers I kept guessing at, is the point where I stopped copying patterns and started designing one.
For my product goal. Critical thinking is also where the game's argument came from. In class we looked at America through poetry, and a poem answers "what is America" by choosing what to name. What it puts on the list is the argument. My game is also a list, so I could do the same thing, except I could make it a rule instead of a statement. Unlocking an era needs two things: enough money earned, and a minimum number of every single building in your current era. My first version used money alone, which let a player grind one cheap building and skip a whole period without seeing it. Adding the second rule means the uncomfortable entries cannot be avoided. To leave the frontier era you have to buy Homesteads on land "taken from Native nations by treaty and by force". To leave the postwar era you have to buy the Suburban Developments that redlining kept Black families out of, and the Interstates that went "straight through Black neighbourhoods". So the game never tells the player that being American means inheriting the costs as well as the achievements. It makes them buy the costs to carry on.
Organization
For my learning goal. I worked in one order and stuck to it: research, then data, then rules, then appearance. That stopped me learning three things at once. When I built the shop I was only thinking about the shop, because the history it needed was already written and sitting in a list. Almost every time I got badly stuck, it was because I had broken my own order and started something before the part underneath it was finished.
For my product goal. Keeping the history separate from the code is what made a 1,379-line file possible. I learned that by getting it wrong first: my early version wrote the history straight into the display code, so adding an era risked breaking the last one. Once the history was a plain list, I could use the same trick on a task I could never have done by hand. I wanted three upgrade levels for each of 86 buildings, which is 258 upgrades. Instead of typing them, I wrote the pattern once and looped over it. There are 290 upgrades in the finished game and I only typed fifteen.
Objective C: Reflecting
The impact on me and my learning
The clearest change is that I can now write JavaScript instead of only recognising it. In August I would not have known how to make a button change something on a page. The finished game is 1,379 lines that I wrote, and more importantly 1,379 lines I can still read. I can open it now and follow what any part does, which tells me I understood it as I went rather than gluing together pieces I did not follow.
The most useful thing I learned was not the one I expected. I thought I would remember specific JavaScript. What I actually kept is a way of organising a problem: write the thing down as plain data first, then write code that reads the data. I did not know that idea existed when I started and I now use it without thinking. It is also the reason I finished. Built the way I first tried, the seventeenth era would have been much harder to add than the first, and I would probably have given up somewhere in the 1800s.
It also changed my answer to the class question. I started out thinking the answer would be a list of achievements, which is basically what my first invention timeline was. Building the era unlock rules is what changed my mind, because the rule made the argument before I had really thought of it: if you have to own every building to move on, then the country you end up with is the sum of all of them, not just the good ones. I did not set out to argue that being American means inheriting the cost as well as the achievement. I ended up there because the game I had built would not let me argue anything else honestly. That is the part that surprised me most, that the product changed my mind instead of just showing it.
Evaluating the product against my success criteria
Six of the eight are fully met, one is met but has a fault I found while testing, and one is not finished yet.
| # | Result | Evidence |
|---|---|---|
| 1 | Met | 17 eras, 1492 to 2026. There is exactly one gap in the whole timeline: the year 1940, between the Great Depression ending in 1939 and World War II starting in 1941. Every other era runs straight on from the last, and three pairs overlap on purpose. |
| 2 | Met | 90 dated events across 17 eras, an average of 5.3 each, and no era has fewer than four. Every era has a written summary, and each of the 86 buildings has its own checked fact that appears once you own one. |
| 3 | Met | Nine building entries name a specific cost, plus several era summaries. Examples: Mission Outpost ("converting and often conscripting Native communities"), Cotton Gin Works ("sharecroppers held in place by debt"), Coal Mine ("crews that included children"), Interstate Highway ("straight through Black neighbourhoods"). |
| 4 | Met | Two rules guard every era: money earned, and a minimum of every building in the one before. Colonial America needs 4,600 earned and five each of all four exploration buildings. I tested it by leaving one building at zero and confirming the era stayed locked no matter how much money I had. |
| 5 | Met, one fault | Money is added every second and every purchase raises that building's price by 15%. Testing for this report found a real bug: on the Riverboat Landing I typed base6Cost instead of baseCost, so that building has no starting price and its cost shows as NaN. It is one mistyped character out of 86 buildings and a one-word fix, but it was in the version I tested, so I am recording it rather than quietly fixing it. It is the kind of mistake no error message catches: the code runs fine, it is just wrong. |
| 6 | Met | It saves every 15 seconds, when you press save, and when you close the tab. When you come back it works out how long you were gone, pays the money you would have earned (capped at 8 hours) and tells you how much. I tested this by closing the tab and reopening it the next day. |
| 7 | Met | The save system was the test, and it was the last thing I built. It needed three things I had never used before: storing the game as text, reading it back, and working out offline earnings from a timestamp. I wrote it without being given the code, and it works. |
| 8 | Met | Three people played the game and each said it taught them something about the history of the United States. One made a comment about the economic impact of certain buildings, while another highlighted the social implications of the era summaries. |
What I would do differently
- Test the data, not just the game. The
base6Costbug survived because I played the game and it felt fine. A quick check that every building has the right fields would have caught it in a second. Playing something is not the same as testing it. - Build for a phone first. I made three columns and then made them survive a small screen. Starting small and expanding would have been better on both.
- Save my work more often. Most of this project went in as one huge commit, so for several days my only way back was the very first version.
The product
The game is at the root of the same site as this report, and is running below.
Parts of the code
const eras = [
{
id: "revolution",
name: "Revolutionary War",
years: "1764-1783",
currency: "continentals",
unlockAt: 310000,
requireEach: 7,
history: [ ... ],
events: [
"1775 - Fighting begins at Lexington and Concord.",
"1776 - The Declaration of Independence is adopted.",
"1781 - Cornwallis surrenders at Yorktown.",
...
]
},
...
];
function meetsRequirements(era) {
const index = eras.indexOf(era);
if (index === 0) {
return true;
}
if (state.totalClicks < era.unlockAt) {
return false;
}
return minOwnedInEra(eras[index - 1].id) >= era.requireEach;
}
for (const building of buildings) {
for (const tier of tiers) {
upgrades.push({
id: building.id + tier.need,
name: tier.word + " " + building.name,
cost: Math.round(building.baseCost * tier.costFactor),
detail: "Doubles " + building.name,
type: "building",
target: building.id,
need: tier.need
});
}
}
Planning: the seventeen eras
This is the timeline I settled on before building anything. Every later decision was made to fit it.
- Age of Exploration, 1492-1606
- Colonial America, 1607-1763
- Revolutionary War, 1764-1783
- The New Republic, 1784-1802
- Westward Expansion, 1803-1860
- Civil War, 1861-1865
- Reconstruction, 1865-1877
- Gilded Age, 1878-1899
- Progressive Era and WWI, 1900-1918
- Roaring Twenties, 1919-1929
- Great Depression, 1929-1939
- World War II, 1941-1945
- Postwar Boom and Civil Rights, 1946-1968
- Space Race, 1957-1975
- Late Cold War, 1976-1991
- Digital Age, 1992-2007
- Modern America, 2008-2026
Bibliography
Uploaded separately, so it does not count towards the page limit. All web sources accessed 3 September 2026.
Primary documents
“Declaration of Independence (1776).” Milestone Documents, National Archives and Records Administration, www.archives.gov/milestone-documents/declaration-of-independence.
“Homestead Act (1862).” Milestone Documents, National Archives and Records Administration, www.archives.gov/milestone-documents/homestead-act.
“Treaty of Paris (1783).” Milestone Documents, National Archives and Records Administration, www.archives.gov/milestone-documents/treaty-of-paris.
“Civil Rights Act (1964).” Milestone Documents, National Archives and Records Administration, www.archives.gov/milestone-documents/civil-rights-act.
“The Paris Peace Treaty of September 30, 1783.” The Avalon Project, Lillian Goldman Law Library, Yale Law School, avalon.law.yale.edu/18th_century/paris.asp.
Archives, museums and research collections
Nelson, Robert K., et al. Mapping Inequality: Redlining in New Deal America. Digital Scholarship Lab, University of Richmond, dsl.richmond.edu/panorama/redlining.
“Virginia’s First Africans.” Encyclopedia Virginia, Virginia Humanities, encyclopediavirginia.org/entries/africans-virginias-first.
“Arrival of the First Africans in 1619.” National Park Service, www.nps.gov/articles/000/arrival-of-the-first-africans-in-1619.htm.
“The Model T & The Assembly Line.” Digital Collections, The Henry Ford, www.thehenryford.org/collections-and-research/digital-collections/expert-sets/978.
Arnold, Horace Lucian, and Fay Leone Faurote. “Ford Methods and the Ford Shops.” The Henry Ford, www.thehenryford.org/collections/explore/articles/ford-methods-and-the-ford-shops.
“History and Culture: Jamestown.” Colonial National Historical Park, National Park Service, www.nps.gov/jame/learn/historyculture/index.htm.
“History and Culture: Castillo de San Marcos.” National Park Service, www.nps.gov/casa/learn/historyculture/index.htm.
“NASA History.” National Aeronautics and Space Administration, www.nasa.gov/history.
“Our History.” United States Census Bureau, www.census.gov/history.
Technical documentation
“Window: localStorage property.” MDN Web Docs, Mozilla, developer.mozilla.org/en-US/docs/Web/API/Window/localStorage.
“Window: beforeunload event.” MDN Web Docs, Mozilla, developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event.
“JSON.stringify().” MDN Web Docs, Mozilla, developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify.
“JSON.parse().” MDN Web Docs, Mozilla, developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse.
“Date.now().” MDN Web Docs, Mozilla, developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now.
“Window: setInterval() method.” MDN Web Docs, Mozilla, developer.mozilla.org/en-US/docs/Web/API/Window/setInterval.
“EventTarget: addEventListener() method.” MDN Web Docs, Mozilla, developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener.
“Web storage.” HTML Living Standard, WHATWG, html.spec.whatwg.org/multipage/webstorage.html.
ECMA-262: ECMAScript Language Specification. Ecma International, ecma-international.org/publications-and-standards/standards/ecma-262.