PF 102 · Event-Driven Programming · Midterm
Lab
01 / 18
edp-lab · live demo day
Live Island
Demo Day
Next week — show your customized Socorro Mini Map to the class
PF 102 · Midterm 04 ~3–5 minutes each Creativity + EDP clarity
Next week
What happens in class
01
Arrive ready
GitHub fork pushed. Map opens with no red console errors. README has My Modifications.
02
Live demo
Share screen or projector. Walk the class through your island in 3–5 minutes.
03
Explain EDP
For each feature: name the event, where you listen, which handler runs, what we see.
This is not a slide deck about your code. It is a live run of your mini map.
What we want to see
Your creativity should show
  • A map that looks like yours — not the starter screenshot with one pink click
  • A theme or story — hometown, campus, fantasy port, night market… say why
  • Events you chose — click, hover, keys, double-click, night mode, etc.
  • Color choices with a reason — mood, landmark, day/night, brand feel
  • Extras that fit the theme — buildings, trees, roads, sun/moon, paths
Pretty without a working event is incomplete. Working without personality is incomplete too.
Time box
3–5 minutes · suggested order
MinutesYou doClass hears
~30 secOpen the map · name your theme“This is my ____ island because…”
~1 minTour the sceneBuildings, roads, props, sky — what you added
~2 minTrigger your events liveClick / hover / keys — Fire → Listen → Handle
~1 minColors + one proud detailWhy those hexes · favorite addition
~30 secPoint to README / repoMy Modifications · commits exist
Demo script · Part 1
Introduce your map and the reason
Weak opening
“I changed some colors and added a tree.”
Strong opening
“This is a night-market island inspired by my hometown pier. I wanted warm lights, a road to the pier, and a key that turns the whole town into night mode.”
  • Name the theme in one sentence
  • Say why — memory, place, mood, joke, game vibe
  • Then show it on screen so we can see the theme
Demo script · Part 2
Tour what you built on the island
Buildings
New spots? Renamed landmarks? Say what each represents in your theme.
Surfaces
Paths, roads, ponds — how do people “move” through your map?
Props
Trees, birds, sun/moon — living details that make it feel finished.
Layout
Use the grid / x·z legend: “Town Hall is left; the pier sits on −z toward the camera.”
Demo script · Part 3
Show events — say the EDP pattern
For every feature you show, complete this sentence:
When the user does ____ (FIRE), main.js listens with ____ (LISTEN), events.js runs ____ (HANDLE), and we see ____ on the island.
  • Demo at least one modified event (e.g. click does more than pink)
  • Demo at least one new event if you added one (dblclick, key, night mode…)
  • Trigger it live — do not only describe it
Fill this before next week
Your event sheet (bring this)
FeatureEventListener fileHandlerVisible result
Select buildingclickmain.jsonClickGold + water/grass
Hover previewmousemove + loopmain.jsupdateHoverHighlight color
Resetkeydown Rmain.jsonKeyDownColors / HUD reset
Night modekeydown Bmain.jstoggleNightModeSky + sun/moon
Your feature________________
Demo script · Part 4
Why those colors?
Say more than the hex
Not only: “I used 0xfbbf24.”

Also: “Gold for the market stalls — warm night-market lights.”
Good reasons
· Landmark / place memory
· Day vs night mood
· Water vs grass contrast
· Hover = “preview”, select = “chosen”
· Brand / school colors
Change the color live once if you can — prove you know where it lives in the code.
Creativity boosters
Great additions graders notice
Custom buildings
Named spots with x/z that fit your story — Library, Cafe, Clinic…
Roads / paths
Connect places. An intersection makes the island feel planned.
Trees · birds · props
Same Mesh recipe — Group + primitives. Motion in animate() if birds fly.
Sun / moon
Visible day/night with B — not only a darker background.
HUD voice
Messages that sound like your island, not the default starter text.
Double-click details
Extra story on a building — still Fire → Listen → Handle.
Also required
README · My Modifications
## My Modifications - Theme: night-market pier inspired by ____ - Click: gold highlight + water/grass change (events.js onClick) - Key B: night mode + moon sprite (toggleNightMode) - Added Road + Cafe building (scene.js) - Why colors: warm gold stalls, deep water for evening mood
  • Event · file · what the user sees
  • Matches what you will demo live
  • 2+ meaningful commits already pushed
Guardrails
Do this · avoid that
DO
Show a working map
Hard refresh before your turn. Baseline click / hover / R still work. Console clean.
DON'T
Only narrate slides
No live island = no demo. Screenshots of code without running it are not enough.
DO
Own your choices
Theme, colors, events — explain like a designer and a programmer.
DON'T
Copy the EXAMPLE verbatim
The walkthrough is a template. Change colors, keys, props, and story so it is clearly yours.
Before next week
Prep checklist
  • 1Fork works offline / online — index.html opens, Three.js loads
  • 2Baseline STEP interactions still work (click, hover, R, resize)
  • 3Your customizations are visible in under 10 seconds
  • 4Event sheet filled (event · listener · handler · result)
  • 5Theme sentence + color reasons practiced out loud once
  • 6README My Modifications updated · 2+ commits pushed
  • 7GitHub repo link ready to paste / share
Model · ~90 seconds
Sample spoken script
  • “This island is a coastal school town — Cafe and Clinic sit on the left road toward the pier.”
  • “When I click Town Hall, onClick fires → highlightSurroundings → gold + water change.”
  • “I chose deep blue water because the pier should feel cool against warm buildings.”
  • “Press B: keydown → toggleNightMode → sky darkens and the moon appears.”
  • “README lists those events. Repo is pushed. Questions?”
How this counts
Demo day meets the midterm bar
RequirementWhat we look for in the live demo
Baseline worksClick / hover / R still function on stage
New or changed eventYou trigger it live and name Fire → Listen → Handle
Visible color changeWe can see it; you say why
2+ menu / creative ideasMap tour shows more than one personal touch
README + commitsYou can open or cite My Modifications
In-class demoThis presentation day
Points → % for this demo only: Open grading percentages · 50 pts = 100% of Live Demo Day
Be ready
Questions I may ask you
  • Where is the listener registered for that key?
  • Which file owns the handler?
  • What happens if I click empty ground?
  • Why this color instead of the starter pink?
  • If I press R after night mode, what should reset?
  • What would you add next if you had one more hour?
Still building?
Guides on the teaching hub
  • EXAMPLE-modification-walkthrough — click colors, R, B night mode
  • EXAMPLE-add-building — spots with x / z
  • EXAMPLE-add-props — trees, paths, birds
  • EXAMPLE-add-road — asphalt + dashes
  • EXAMPLE-add-sun — visible sun / moon
  • activity-island-modifications — full rubric + idea menu
Open them from /teaching/pf-102 · Midterm coverage.
next week · your turn
Show the island.
Own the events.
Theme · map · events · colors · README — live, in 3–5 minutes.
Practice once with a timer Push before class Fire → Listen → Handle
Notes