Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Assets/Scripts.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Scripts/Game.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Assets/Scripts/Game/DerivativePopAnimator.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions First Principles/Assets/Resources/Localization/MathArticle/en.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@@SECTION=intro
<b><size=120%>Math concepts — in-game reader</size></b>
<size=90%>The game <b>First Principles</b> takes its name from public remarks by <b>Elon Musk</b> on a <b>first-principles approach</b> to <b>business</b> and to <b>solving problems in life and work</b>—then teaches <b>calculus-first</b> ideas on the graph as a matching metaphor.</size>
<size=90%>Use <b>Math concepts</b> while playing, or <b>Math tips & snippets</b> on Level select — same scrollable notes. Tap the dark backdrop or <b>Close</b> to dismiss.</size>

@@SECTION=how_graph
<b><size=115%>How this game teaches calculus (read the graph while you play)</size></b>
<size=92%>
• <b>Main curve</b> — the thick path on the Cartesian grid is \(y = f(x)\) for this stage. Your character tries to stand on platforms that follow that shape. The <b>Equation</b> label (when visible) names the rule being plotted.
Expand All @@ -17,9 +19,11 @@
Everything below is a <b>topic glossary</b> you can skim between deaths or after finishing a graph — plus a <b>First principles thinking (business)</b> section before exam prep.
</size>

@@SECTION=s1
<b><size=110%>1. Derivatives = slope & rate</size></b>
The derivative \(f'(x)\) measures how steeply \(f(x)\) rises or falls. In physics it is often a <i>rate</i>: how fast position changes (velocity), how fast temperature changes along a bar, etc. In this game, the derivative helps decide where the ground exists.

@@SECTION=rules
<b><size=120%>──────── Differentiation rules — your skill tree ────────</size></b>
<size=92%>These are the <b>combo moves</b> for turning \(f(x)\) into \(f'(x)\) without rebuilding from the limit every time. Read them like <b>perks</b> that change how your <b>main curve</b> and <b>derivative HUD</b> stay in sync.</size>

Expand All @@ -43,6 +47,7 @@ If \(y = f(g(x))\), then \(\displaystyle \frac{dy}{dx} = f'(g(x))\cdot g'(x)\).

<size=92%>The game still draws \(f'\) with a <b>numeric sampler</b> on wild stages, but these identities explain <i>why</i> textbook curves snap into clean forms — and what AP / TMUA expects you to simplify before you sketch. Longer write-up: <b>docs/derivative-rules.md</b>.</size>

@@SECTION=int_block
<b><size=120%>──────── Integrals: definite vs indefinite — score vs loadout ────────</size></b>
<size=92%><b>Indefinite</b> \(\displaystyle \int f(x)\,dx\) asks for an <b>antiderivative</b> — a whole <i>family</i> \(F(x)+C\) whose derivative is \(f\). Think <b>loadout class</b>: many valid builds differ by +\(C\) (same gameplay up to vertical shift in \(F\)). <b>Definite</b> \(\displaystyle \int_a^b f(x)\,dx\) is a single <b>number</b> (signed area from \(a\) to \(b\)) — like a <b>run score</b> for one fixed segment. No “+\(C\)” in the answer: endpoints pin it down.</size>

Expand All @@ -54,42 +59,55 @@ Rectangles (left / right / midpoint) estimate the <b>definite</b> score before y

<size=92%>More detail: <b>docs/definite-indefinite-integrals.md</b>. (Graphing calculator / FTC proofs — see course notes; this is the game glossary.)</size>

@@SECTION=s2
<b><size=110%>2. Parabola (power / quadratic)</size></b>
A quadratic \(y = a(x-h)^2+k\) is the shape of projectile motion in ideal textbook setups and many optimization problems (min/max). One smooth hump; the slope switches sign at the vertex.

@@SECTION=s3
<b><size=110%>3. Sine & cosine = waves & rotation</size></b>
Sines and cosines describe vibrations, AC signals, sound, and anything that repeats. Cosine is sine shifted: same wave, different starting phase. Complex numbers (below) make these waves easier to solve in circuits and vibrations.

@@SECTION=s4
<b><size=110%>4. Absolute value & kinks</size></b>
\(|x|\) bends the graph so there is a corner on the axis. The derivative jumps there in ideal math — in real programs we plot smooth samples, but the idea matters: nonsmooth points need special care in analysis and simulation.

@@SECTION=s5
<b><size=110%>5. Taylor & Maclaurin series</size></b>
Smooth functions can be approximated near a point by polynomials with matching derivatives. Maclaurin means “expand around \(0\).” More terms usually improve the fit nearby; the full infinite sum is the series (where it converges).

@@SECTION=s6
<b><size=110%>6. Geometric series</size></b>
Sums \(u^0+u^1+u^2+\cdots\) appear in probability, signal processing, and digital math. When \(|u|<1\) the tail shrinks and the infinite sum has a clean closed form; that is the same mood as stability and “things settle.”

@@SECTION=s7
<b><size=110%>7. Multivariable slices</size></b>
Surfaces \(z = f(x,y)\) can be cut by fixing \(y=y_0\) — you get a 1D curve in \(x\). That is how higher-dimensional calculus is often reasoned about in engineering: fix all but one variable, take partial derivatives, gradients, directional slopes.

@@SECTION=s8
<b><size=110%>8. Integrals & area (Riemann sums)</size></b>
The definite integral \(\displaystyle \int_a^b f(x)\,dx\) is the signed area under the curve. Riemann sums chop \([a,b]\) into thin rectangles: pick sample heights (left, right, midpoint), add \(f(x^\ast)\,\Delta x\). More rectangles → closer to the true integral.

@@SECTION=s9
<b><size=110%>9. Engineering math — modeling mindset</size></b>
Engineering math picks tools that match the world: linear algebra for structures and networks, complex numbers / phasors for steady AC, differential equations for motion and heat, transforms (Laplace/Fourier) for signals and control. The goal is a <i>usable model</i>, then check it against reality.

@@SECTION=s10
<b><size=110%>10. Damped oscillation</size></b>
Many systems lose energy while oscillating: \(e^{-\alpha t}\sin(\omega t)\) style decay is the cartoon of that idea — envelope shrinks, oscillation persists briefly. Mechanical damping, resistor–capacitor–inductor circuits, and control systems all share this language.

@@SECTION=s11
<b><size=110%>11. Catenary & cosh</size></b>
A hanging cable under its own weight forms a catenary; \(\cosh\) is the hyperbolic cosine that models that ideal shape (and shows up in hyperbolic PDEs and relativity too). Different from a parabola even if both look “like arches.”

@@SECTION=s12
<b><size=110%>12. Rectified sine \(|\sin|\)</size></b>
Full-wave rectification flips negative lobes upward — a first step in turning AC into something closer to DC for power supplies. Corners at zeros mean derivatives jump — a reminder that idealized circuits still start from calculus intuitions.

@@SECTION=s13
<b><size=110%>13. Circle \((x-h)^2 + (y-k)^2 = R^2\)</size></b>
A circle is usually written implicitly. Solving for \(y\) gives two branches (\(\pm\sqrt{\cdot}\)). The game’s circle stage uses the <i>upper</i> semicircle so the path stays a function \(y(x)\) over one sweep. Implicit differentiation yields \(\frac{dy}{dx} = -\frac{x-h}{y-k}\); at the ends of the diameter the tangent is vertical (slope blows up).

@@SECTION=aero
<b><size=120%>──────── Aerospace engineering & aerodynamics ────────</size></b>
<size=92%>Levels prefixed <b>Aerospace:</b> turn textbook flight‑vehicle math into paths you run. They are <i>toy models</i> for pedagogy — not CFD, flight test, or ITAR‑grade simulations.</size>

Expand All @@ -101,6 +119,7 @@ A circle is usually written implicitly. Solving for \(y\) gives two branches (\(

<b><size=90%>See docs/engineering-math.md § Aerospace for a longer map.</size></b>

@@SECTION=biz
<b><size=120%>──────── First principles thinking (business) ────────</size></b>
<size=92%>Startup culture often cites <b>Elon Musk</b> for reviving <b>first principles</b> at places like <b>Tesla / SpaceX</b>: stop trusting “the market always prices it this way,” and instead <b>unpack assumptions</b> until you hit bedrock facts (materials, energy, physics, true unit costs), then <b>reason upward</b> into a new design. The idea is older than any one founder — but the <i>habit</i> matches this game’s visuals.</size>

Expand All @@ -112,6 +131,7 @@ A circle is usually written implicitly. Solving for \(y\) gives two branches (\(

<b><size=92%>This is <i>not</i> legal, tax, or investing advice — a thinking drill you can pair with real advisors and data. Full write-up:</size></b> <b>docs/first-principles-business.md</b> on GitHub Pages.

@@SECTION=exam
<b><size=120%>──────── Exam prep (separate tracks) ────────</size></b>

<b><size=118%>Competition mathematics (contest lens)</size></b>
Expand Down
45 changes: 25 additions & 20 deletions First Principles/Assets/Resources/Localization/ar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ ui.jump=قفز
ui.move=تحرك
ui.keyboard_hint_mobile=<size=90%><color=#5c6577>(لوحة المفاتيح: الأسهم / المسافة)</color></size>
hud.stage=المرحلة
controls.mobile=<color=#7a8399>تحرك</color> <b><color=#ffd978>◀ ▶</color></b> <color=#5c6577>·</color> <color=#7a8399>قفز</color> <b><color=#ffd978>مس</color></b> <size=90%><color=#5c6577>(لوحة المفاتيح: الأسهم / المسافة)</color></size>
controls.desktop=<color=#7a8399>تحرك</color> <b><color=#ffd978>←</color></b> <b><color=#ffd978>→</color></b> <color=#5c6577>·</color> <color=#7a8399>قفز</color> <b><color=#ffd978>مسافة</color></b>
controls.calculator=<color=#7a8399>آلة رسومية</color> <b>اكتب f(u)</b> · <b>Trans</b> · <b>Scale</b> · <b>قرصة</b> · <b>رجوع</b>
graph.label_fu=f(u) =
graph.placeholder=x^2 + sin(x) · ln(x) عندما x>0 · min(x,3)...
graph.status_enter=Enter / اضغط خارج الحقل للرسم
graph.status_graphed=<color=#8fd9b3>تم الرسم</color>
graph.line1=<b>وضع آلة الرسوم البيانية</b>
graph.line2=<size=88%><color=#c4d0e8>اكتب <b>f(u)</b> أدناه (المتغير <b>x</b> في المربع = u الداخلي). ثم:</color></size>
graph.line3=<size=92%><b>Trans</b> ← {0} · نقرتان <b>+</b> · اضغط مطولًا <b>−</b> · <b>Scale</b> تكبير باللمس / اضغط مطولًا للتصغير · <b>قرصة</b> بإصبعين</size>
graph.line4=<size=88%><color=#a8b2d1>A={0} &nbsp;k={1} &nbsp;C={2} &nbsp;D={3} &nbsp;&nbsp;x في [{4},{5}]</color></size>
graph.line4=<size=88%><color=#a8b2d1>A={0} k={1} C={2} D={3} x في [{4},{5}]</color></size>
graph.param_a=A (مقياس عمودي)
graph.param_k=k (مقياس أفقي)
graph.param_c=C (إزاحة عمودية)
Expand Down Expand Up @@ -65,20 +62,28 @@ level.30=BC: طور وحركة توافقية بسيطة (طاقة)
level.31=BC: تكعيب ونقطة انعطاف (رسم)
level.32=BC: b^x و d/dx b^x
level.33=دائرة: (x−h)² + (y−k)² = R²
level.34=طيران: رفع C_L(α) خطي + انفصال
level.35=طيران: قطب السحب (طفيلي، مُستحثّ، إجمالي)
level.36=طيران: جو متساوي الحرارة ρ(h)
level.37=طيران: حركة مجنحة / اهتزاز مُخمَّد
level.38=طيران: نيوتوني Cp ~ sin²α
level.39=طيران: Strouhal / نبرة انبعاث دوامات
level.40=طيران: غلاف دخول غلاف جوي (تسخين ρV)
level.41=اقتصاد: فقاعة الدوت كوم والانهيار (مؤشر توضيحي)
level.42=اقتصاد: أزمة 2008 والتعافي (مؤشر توضيحي)
level.43=الزعيم: شريحة هروب ماندلبروت (كسيري)
level.44=فيزياء C: الديناميكا الحرارية (P–V أديباتي، γ من N)
level.45=زعيم: لولب النسبة الذهبية (قطبي لوغاريتمي)
level.46=تحويلات: فورييه — طيف sinc
level.47=تحويلات: لابلاستضاؤل أسي
level.48=زعيم: ماندلبروت — الختام (شريحة هروب كسيرية)
level.49=زعيم: فراشة لورينزالختام (جذاب غريب)
level.34=فيزياء C: الديناميكا الحرارية (P–V أديباتي، γ من N)
level.35=طيران: رفع C_L(α) خطي + انفصال
level.36=طيران: قطب السحب (طفيلي، مُستحثّ، إجمالي)
level.37=طيران: جو متساوي الحرارة ρ(h)
level.38=طيران: حركة مجنحة / اهتزاز مُخمَّد
level.39=طيران: نيوتوني Cp ~ sin²α
level.40=طيران: Strouhal / نبرة انبعاث دوامات
level.41=طيران: غلاف دخول غلاف جوي (تسخين ρV)
level.42=اقتصاد: فقاعة الدوت كوم والانهيار (مؤشر توضيحي)
level.43=اقتصاد: أزمة 2008 والتعافي (مؤشر توضيحي)
level.44=تحويلات: فورييه — طيف sinc
level.45=تحويلات: لابلاس — تضاؤل أسي
level.46=زعيم: لولب النسبة الذهبية (قطبي لوغاريتمي)
level.47=زعيم: ماندلبروتالختام (شريحة هروب كسيرية)
level.48=زعيم: جاذب لورينز — نظرية الفوضى (جذاب غريب)
level.49=زعيم: ثقب أسودبئر جاذبية (مقطع 1/r)
level.50=فيزياء C: نابض–كتلة حركة توافقية (قانون هوك، بلا تخميد)
level.51=Big O: O(1) — constant time
level.52=Big O: O(log n) — logarithmic growth
level.53=Big O: O(√n) — sublinear root growth
level.54=Big O: O(n) — linear growth
level.55=Big O: O(n log n) — n log n growth
level.56=Big O: O(n²) — quadratic growth
level.57=Big O: O(n³) — cubic growth
level.58=Big O: O(2ⁿ) — exponential (base 2)
50 changes: 28 additions & 22 deletions First Principles/Assets/Resources/Localization/cs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ level_select.cat.integration=Mult proměnné a integrály
level_select.cat.engineering=Inženýrství
level_select.cat.ap_bc=AP Calculus BC a fyzika C
level_select.cat.aerospace=Letectví a kosmonautika
level_select.cat.finale=Pokročilé a boss
level_select.cat.economics=Ekonomie
level_select.cat.transforms=Transformace
level_select.cat.final_boss=Finální boss
level_select.cat.spring_physics=Pružina a SHM
level_select.cat.big_o=Notace Big O
ui.math_tips=Tipy k matematice
ui.back_menu=Zpět do menu
ui.graphing_calculator_mode=Grafická kalkulačka
Expand All @@ -24,17 +25,14 @@ ui.jump=Skok
ui.move=Pohyb
ui.keyboard_hint_mobile=<size=90%><color=#5c6577>(klávesnice: šipky / Mezerník)</color></size>
hud.stage=FÁZE
controls.mobile=<color=#7a8399>Pohyb</color> <b><color=#ffd978>◀ ▶</color></b> <color=#5c6577>·</color> <color=#7a8399>Skok</color> <b><color=#ffd978>klepnutí</color></b> <size=90%><color=#5c6577>(klávesnice: šipky / Mezerník)</color></size>
controls.desktop=<color=#7a8399>Pohyb</color> <b><color=#ffd978>←</color></b> <b><color=#ffd978>→</color></b> <color=#5c6577>·</color> <color=#7a8399>Skok</color> <b><color=#ffd978>Mezerník</color></b>
controls.calculator=<color=#7a8399>Grafická kalkulačka</color> <b>Zadejte f(u)</b> · <b>Trans</b> · <b>Měřítko</b> · <b>Špetka</b> · <b>Zpět</b>
graph.label_fu=f(u) =
graph.placeholder=x^2 + sin(x) · ln(x) pro x>0 · min(x,3)...
graph.status_enter=Enter / klepněte mimo pro graf
graph.status_graphed=<color=#8fd9b3>Vykresleno</color>
graph.line1=<b>Režim grafické kalkulačky</b>
graph.line2=<size=88%><color=#c4d0e8>Napište <b>f(u)</b> níže (proměnná <b>x</b> v poli = vnitřní u). Pak:</color></size>
graph.line3=<size=92%><b>Trans</b> → {0} · dvojité klepnutí <b>+</b> · podržte <b>−</b> · <b>Měřítko</b> přiblížení / podržte oddálení · <b>špetka</b> dvěma prsty</size>
graph.line4=<size=88%><color=#a8b2d1>A={0} &nbsp;k={1} &nbsp;C={2} &nbsp;D={3} &nbsp;&nbsp;x v [{4},{5}]</color></size>
graph.line4=<size=88%><color=#a8b2d1>A={0} k={1} C={2} D={3} x v [{4},{5}]</color></size>
graph.param_a=A (svislé měřítko)
graph.param_k=k (vodorovné měřítko)
graph.param_c=C (svislý posun)
Expand Down Expand Up @@ -85,20 +83,28 @@ level.30=BC: fáze a SHM (výměna energie)
level.31=BC: kubická a inflexe (náčrt)
level.32=BC: b^x a d/dx b^x
level.33=Kružnice: (x−h)² + (y−k)² = R²
level.34=Aerospace: vztlak C_L(α) lineární + vývrt
level.35=Aerospace: polára odporu (parazitní, indukovaná, celková)
level.36=Aerospace: isotermická atmosféra ρ(h)
level.37=Aerospace: fugoid / tlumený režim výška–klopení
level.38=Aerospace: Newtonovské Cp ~ sin²α
level.39=Aerospace: Strouhal / tón von Kármána
level.40=Aerospace: obal útlumu při vstupu (ρV teplo)
level.41=Ekonomika: bublina dot-com a pád (stylizovaný index)
level.42=Ekonomika: krize 2008 a oživení (stylizovaný index)
level.43=BOSS: řez úniku Mandelbrota (fraktálová nálada)
level.44=Fyzika C: termodynamika (adiabatické P–V, γ z N)
level.45=BOSS: zlatá spirála (logaritmická polární)
level.46=Transformace: Fourier — sinc (spektrum)
level.47=Transformace: Laplace — exponenciální pokles
level.48=BOSS: Mandelbrot — finále (fraktálový únikový řez)
level.49=BOSS: Lorenzův motýl — finále (podivný atraktor)
level.50=Fyzika C: pružina–hmota SHM (Hookeův zákon, bez tlumení)
level.34=Fyzika C: termodynamika (adiabatické P–V, γ z N)
level.35=Aerospace: vztlak C_L(α) lineární + vývrt
level.36=Aerospace: polára odporu (parazitní, indukovaná, celková)
level.37=Aerospace: isotermická atmosféra ρ(h)
level.38=Aerospace: fugoid / tlumený režim výška–klopení
level.39=Aerospace: Newtonovské Cp ~ sin²α
level.40=Aerospace: Strouhal / tón von Kármána
level.41=Aerospace: obal útlumu při vstupu (ρV teplo)
level.42=Ekonomika: bublina dot-com a pád (stylizovaný index)
level.43=Ekonomika: krize 2008 a oživení (stylizovaný index)
level.44=Transformace: Fourier — sinc (spektrum)
level.45=Transformace: Laplace — exponenciální pokles
level.46=BOSS: zlatá spirála (logaritmická polární)
level.47=BOSS: Mandelbrot — finále (fraktálový únikový řez)
level.48=BOSS: Lorenzův atraktor — teorie chaosu (podivný atraktor)
level.49=BOSS: černá díra — gravitační jáma (řez ∝ 1/r)
level.50=Fyzika C: pružina–hmota SHM (Hookeův zákon, bez tlumení)
level.51=Big O: O(1) — constant time
level.52=Big O: O(log n) — logarithmic growth
level.53=Big O: O(√n) — sublinear root growth
level.54=Big O: O(n) — linear growth
level.55=Big O: O(n log n) — n log n growth
level.56=Big O: O(n²) — quadratic growth
level.57=Big O: O(n³) — cubic growth
level.58=Big O: O(2ⁿ) — exponential (base 2)
Loading
Loading