Skip to content

halkuwaiti/EC-441-FinalProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Packet Quest

๐ŸŽฎ Packet Quest

A Mario-style platformer for the network stack

Run through the 5 layers of the network stack as Packy the data packet. Answer real EC 441 midterm questions mid-jump, correct answers earn networking-themed power-ups, wrong ones trigger penalties.

License: CC BY-NC 4.0 macOS Apple Silicon Built with

Title screen

๐ŸŽฎ Just want to play?

1. โฌ‡๏ธ  Download the DMG from the latest release
2. ๐Ÿ“‚  Open it, drag Packet Quest to your Desktop or Applications
3. ๐Ÿ–ฑ๏ธ  Right-click the app โ†’ Open the first time (Gatekeeper bypass)
4. ๐Ÿš€  Done, runs fully offline

โฌ‡๏ธ Download the latest DMG โš ๏ธ Apple Silicon (M-series) Macs only, not Apple-signed because this is a class project.


๐ŸŒ What it is

You play Packy, a tiny data packet running across 5 hand-designed levels, one per layer of the network stack. Each level has its own visual identity tied to the layer:

# Layer ๐ŸŽจ Theme ๐ŸŒŸ Visual concept ๐Ÿ“š Topics
1๏ธโƒฃ Physical ๐ŸŸ  Amber Sine cables with bits flowing along them CSMA/CD ยท backoff ยท Manchester
2๏ธโƒฃ Link ๐ŸŸข Green PCB circuit board with MAC bus traces MAC ยท CRC ยท Ethernet ยท switches
3๏ธโƒฃ Network ๐Ÿ”ต Cyan 5-router mesh with TTL-labeled packets IP ยท CIDR ยท routing ยท NAT
4๏ธโƒฃ Transport ๐ŸŸฃ Magenta TCP segment pills with field text TCP ยท UDP ยท ports ยท congestion
5๏ธโƒฃ Application ๐ŸŸก Gold Cityscape + HTTP/DNS/TLS request cards HTTP ยท DNS ยท TLS ยท DHCP
Level 1 โ€” Physical layer

Level 1 - Physical layer. Bits flow on amber sine cables. The Network Stack sidebar tracks your position. The Wireshark ticker shows real tshark-style packet captures.


โ“ Question Blocks

Mid-level you'll run into glowing ? blocks that trigger real EC 441 questions, the Intermediate tier is pulled from Midterms 1 and 2.

Question modal

Hit a glowing ? block, gameplay freezes, and a question pops up. Answer with the mouse or 1 / 2 / 3 / 4.

โœ… Right answer โ†’ ๐ŸŽ Power-up

โšก
Bandwidth Boost
+55% run speed ยท 8s
๐Ÿ›ก๏ธ
Firewall
Absorbs one hit ยท 12s
๐Ÿฆ˜
Multipath Routing
Three air jumps ยท 10s

โŒ Wrong answer โ†’ ๐Ÿ’ฅ Penalty

๐Ÿข
Lagging
โˆ’50% run speed ยท 6s
๐Ÿ›
Malware
7 enemies appear nearby
๐Ÿ”„
Buffer Overflow
Controls inverted ยท 2s
Correct Wrong
โœ… Right answer โ†’ networking power-up โŒ Wrong answer โ†’ penalty + correct answer + explanation

๐ŸŽฏ Three difficulty tiers

Same 15 question slots โ€” three pools depending on tier:

๐ŸŸขBeginnerFundamentals โ€” "What does this layer do?"
๐ŸŸกIntermediateMidterm-level โ€” pulled verbatim from EC 441 MT1 + MT2
๐Ÿ”ดAdvancedExpert-level โ€” Shannon, BGP, AIMD, CUBIC, TLS 1.3, HTTP/3

๐Ÿ End-of-run Grade Report

Grade Report

Letter grade A+ down to F, topic-mastery bars per layer, and you sign the report card to save your run to the leaderboard.


๐Ÿ† Leaderboard

Leaderboard

Per-difficulty rankings, filtered tabs, and gold/silver/bronze styling for the top 3. Persisted to disk between sessions.


๐Ÿ‘จโ€๐Ÿซ Professor Mode

A button on the title screen reveals the entire question bank, all 45 questions with correct answers highlighted and one-sentence explanations.

Professor Mode

All 45 questions, grouped by tier and layer, correct answers highlighted in green.


โŒจ๏ธ Controls

How to play
Action Keys
๐Ÿƒ Move A / D ย orย  โ† / โ†’
๐Ÿฆ˜ Jump W ยท Space ยท โ†‘ ย (hold for higher ยท tap mid-air for double-jump)
โ“ Answer Click ยท 1 / 2 / 3 / 4 ยท A / B / C / D
โธ๏ธ Pause Esc
๐Ÿ”‡ Mute M

๐Ÿ› ๏ธ How it was built

๐Ÿš Native shell Electron 28 (Chromium 120 + Node.js 18)
๐ŸŽจ Rendering HTML5 Canvas 2D โ€” no game engine, no WebGL
๐Ÿ’ป Game logic Vanilla JavaScript โ€” no React, no TypeScript, no jQuery
๐Ÿ”Š Audio Web Audio API โ€” every SFX and music note synthesized at runtime
๐Ÿ’พ Persistence localStorage + Electron IPC โ†’ JSON file in userData
๐Ÿ“ Size ~5,500 lines of JS across 13 source files
๐ŸŒ Network None โ€” connect-src 'none' enforced via CSP

The Content-Security-Policy in index.html declares connect-src 'none', so the renderer literally can't make network requests. Combined with procedural audio and local-only persistence, the app is provably offline by construction.


๐Ÿง‘โ€๐Ÿ’ป Run from source

If you want to hack on the code rather than just play:

git clone https://github.com/halkuwaiti/EC-441-PacketQuest.git
cd EC-441-PacketQuest
npm install
npm start

To rebuild the DMG yourself:

npm run dist        # Apple Silicon (default)
npm run dist:intel  # Intel Mac
npm run dist:all    # Both architectures

๐Ÿ“ Repo layout

.
โ”œโ”€โ”€ ๐Ÿš€ main.js                  Electron main process
โ”œโ”€โ”€ ๐ŸŒ‰ preload.js               IPC bridge for leaderboard
โ”œโ”€โ”€ ๐ŸŒ index.html               Single-page DOM shell
โ”œโ”€โ”€ ๐ŸŽจ styles.css               All visual design (~1,400 lines)
โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ  build/icon.png           Custom 1024ร—1024 app icon
โ”œโ”€โ”€ ๐Ÿ“ฆ src/
โ”‚   โ”œโ”€โ”€ ๐Ÿ› ๏ธ  utils.js             rng, math, AABB, helpers
โ”‚   โ”œโ”€โ”€ โ“ questions.js         45 EC 441 questions ร— 3 difficulties
โ”‚   โ”œโ”€โ”€ ๐Ÿ”Š audio.js             Procedural Web Audio synthesis
โ”‚   โ”œโ”€โ”€ โœจ particles.js         Particle system
โ”‚   โ”œโ”€โ”€ ๐Ÿ’ฅ effects.js           Screen shake, flash, glitch
โ”‚   โ”œโ”€โ”€ โŒจ๏ธ  input.js             Keyboard state
โ”‚   โ”œโ”€โ”€ ๐Ÿฆธ player.js            Packy: physics + power-ups
โ”‚   โ”œโ”€โ”€ ๐Ÿ› enemies.js           BugWalker, Spike, Packet, etc.
โ”‚   โ”œโ”€โ”€ ๐Ÿ—๏ธ  levels.js            5 hand-crafted levels
โ”‚   โ”œโ”€โ”€ ๐ŸชŸ ui.js                All overlay logic
โ”‚   โ””โ”€โ”€ ๐ŸŽฎ game.js              Main orchestrator
โ”œโ”€โ”€ ๐Ÿ“– DEMO_GUIDE.md            Demo-day reference for the team
โ””โ”€โ”€ ๐Ÿ“„ DEMO_GUIDE.pdf           Polished printable version

๐Ÿ‘ฅ Credits

  • ๐ŸŽจ Design & Engineering - Hamad Al-Kuwaiti , Deniz Oge, Arav Tyagi
  • ๐ŸŽ“ Course - EC 441 Computer Networking, Boston University, Spring 2026

Every networking question is sourced from the actual EC 441 midterms or course material


๐Ÿ“œ License

CC BY-NC 4.0 - see LICENSE. Free to fork, study, and adapt for personal or educational use.

Made with โšก at Boston University ยท ๐ŸŽ“ Spring 2026

About

๐ŸŽฎ An educational Mario-style platformer that turns the 5-layer network stack into 5 themed levels, EC 441 Computer Networking questions integrated into the gameplay, correct answers earn networking power-ups, wrong ones trigger penalties.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors