# ๐ŸŽฎ PokรฉSQL โ€” Learn T-SQL A Pokรฉmon-style Game Boy Advance browser game for learning **Microsoft T-SQL**! Play it on your phone, tablet, or PC โ€” progress is saved automatically to your browser. ## ๐Ÿš€ Play It Live **`https://justinoros.github.io/pokesql`** --- ## ๐Ÿ—‚๏ธ Files ``` pokesql/ โ”œโ”€โ”€ index.html โ† Game screens & structure โ”œโ”€โ”€ style.css โ† GBA Pokรฉmon aesthetic, fully responsive โ”œโ”€โ”€ game.js โ† Game engine + localStorage save system โ”œโ”€โ”€ questions.json โ† 100 T-SQL questions & answers โ””โ”€โ”€ README.md ``` --- ## ๐Ÿ•น๏ธ Host on GitHub Pages (free) 1. Create a GitHub repo named **`pokesql`** 2. Upload all **4 files**: `index.html`, `style.css`, `game.js`, `questions.json` 3. Go to **Settings โ†’ Pages โ†’ Source: `main` branch, `/ (root)` folder** 4. Hit **Save** โ€” live in ~60 seconds at `https://justinoros.github.io/pokesql` No server, no database, no cost. --- ## ๐Ÿ’พ Save System Progress is stored in the player's browser (`localStorage`) automatically: - **Auto-saves** after every answered question and on map return - **Continue screen** appears on next visit if an in-progress save exists - Displays trainer name, question progress, and score on the continue screen - **New Game** option is always available (prompts confirmation to prevent accidents) - Save is cleared on game completion โ€” ready for a fresh run --- ## ๐ŸŽฏ Features | Feature | Detail | |---|---| | GBA Pokรฉmon aesthetic | Press Start 2P font, pixel dialog boxes, scanline overlay | | Mobile-first design | Full-screen on phones, framed device on desktop | | 100 T-SQL questions | Progressive difficulty, multiple choice | | Name entry | On-screen pixel keyboard, just like the real game | | Typewriter text | Authentic dialog effect with tap-to-skip | | 22 NPC characters | Professor Oak, Misty, Brock, Giovanni, Lanceโ€ฆ | | Streak bonuses | 3ร— = +150 pts ๐Ÿ”ฅ, 5ร—+ = +200 pts ๐Ÿ”ฅ | | Milestone badges | Earned at Q25, Q50, Q75, Q100 | | Correct answer reveal | Wrong answers show the right answer + explanation | | Keyboard shortcuts | 1โ€“4 / Aโ€“D to answer, Enter to continue | --- ## ๐Ÿ“š Topics Covered | Questions | Topics | |---|---| | 1โ€“15 | SELECT, FROM, WHERE, ORDER BY, TOP, BETWEEN, LIKE, IN, NULL | | 16โ€“25 | COUNT, SUM, AVG, MIN, MAX, GROUP BY, HAVING, DISTINCT | | 26โ€“35 | Aliases, JOINs (INNER, LEFT, RIGHT, FULL OUTER), Keys | | 36โ€“50 | Data types, GETDATE(), INSERT, UPDATE, DELETE, TRUNCATE, Views, Stored Procedures | | 51โ€“65 | Transactions, Variables, @@ROWCOUNT, ISNULL, COALESCE, CAST, String functions, Date functions | | 66โ€“80 | CTEs, Subqueries, ROUND, CASE WHEN, Indexes, UNION, INTERSECT, EXCEPT, Triggers, Schemas | | 81โ€“100 | Temp tables, Table variables, TRYโ€ฆCATCH, @@ERROR, SSMS, Execution plans, NOLOCK, Deadlocks, Window functions, PIVOT, IDENTITY, Normalization | --- ## โž• Adding Questions Edit `questions.json`, add to the `questions` array inside `levels[0]`: ```json { "id": 101, "npc": "Professor Oak", "text": "Your question here?", "options": ["Option A", "Option B", "Option C", "Option D"], "answer": 0, "explanation": "Why Option A is correct." } ``` `answer` is the **0-based index** of the correct option (0 = A, 1 = B, 2 = C, 3 = D). --- ## ๐Ÿง‘ Adding NPCs In `game.js`, add to the `NPC` object at the top: ```js const NPC = { 'Your NPC Name': '๐Ÿง‘', ... }; ``` Then reference `"npc": "Your NPC Name"` in `questions.json`. --- ## ๐Ÿ“ฑ Mobile Tips - Add to Home Screen on iOS/Android for a full-screen app experience - The game uses `100dvh` and `safe-area-inset` for notched phones - Tap anywhere on the dialog during intro to skip typewriter / advance - Tap the NPC sprite on the map to start the question (same as the button)