Skip to content

Simulator: sharp from the first frame on a capable machine; the demo watches CodeBot's front - #125

Merged
david-firia merged 5 commits into
mainfrom
demo-sim
Nov 24, 2026
Merged

david-firia merged 5 commits into
mainfrom
demo-sim

Conversation

@david-firia

Copy link
Copy Markdown
Contributor

From David's review of the demo mission (Nov 24), points 3 and 4.

  • Graphics quality at once (3). Auto realism started at Medium (no antialiasing, one pixel per CSS pixel) the first time, climbed only after eight seconds of continuous drawing (rare: the view rests when nothing moves), and counted the first slow seconds (room loading, shader compiling), which could drop it to Low (0.6 pixels per CSS pixel) for good: the pixelated CodeBot. Now its first level comes from the graphics chip WebGL names (guessLevel in src/sim/view/realism.js), applied before the renderer is made so antialiasing is right from the first frame; the first three seconds are not counted; a level kept by the older Auto is ignored once.
  • Chase camera on CodeBot's front (4). A mission's sim (room, course, which nothing read) is now applied as a guided mission begins, with a new camera: { "mode": "chase", "turn": 150 }. The demo starts in chase, looking obliquely at CodeBot's front, and follows it as it drives. Back to start keeps that view; choosing another camera from the menu does not.

Worth knowing: at Low (now where a software renderer starts), a click on a small part can name its neighbour; this was so on main at Low too. sim-ui pins Medium as before (OCB_REALISM picks another level).

Tests: sim (realism, the chip guess), sim-ui, sim-browser, learn-demo, learn-guided, learn-pack pass locally.

🤖 Generated with Claude Code

david-firia and others added 3 commits November 24, 2026 08:45
…s snapped in, demo.py is not saved over and over

- The `orbit` event is the camera turned 45 degrees in all, by drag or arrow
  key, not the first touch of a drag.
- A guide's step checks, in blocks, only the blocks snapped into the program
  (hanging from its start, a function or an event): the LED block met the
  step while still being dragged from the palette, or dropped loose.
- demo/demo.py is replaced without asking when it holds only what the demo
  left there; changed by the student since, they are asked as before. Other
  missions' files are unchanged: always theirs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e demo asks, a folder's name in its key; turning counts from each step

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e on a capable machine, and the demo watches CodeBot's front

- Auto realism starts, the first time, from the graphics chip WebGL names
  (Low in software, Medium for a phone's or Chromebook's chip or one it does
  not know, High for a recent laptop's, Ultra for a graphics card), and does
  not count its first three seconds (the room loading, shaders compiling),
  which could leave it at Low for good. A level kept by the older Auto is
  not trusted.
- A mission's `sim` is read at last, as a guided mission begins: its room,
  course and now camera, `{ "mode": "chase", "turn": 150 }`, degrees round
  from behind the robot. The demo starts in chase, looking obliquely at
  CodeBot's front, and follows it as it drives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit c4a23fd):

https://firialabs-open-editor--pr125-demo-sim-h5mw0ane.web.app

(expires Tue, 01 Dec 2026 16:11:30 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 81259a1fec315ca1af3747d225d9c7424890be3e

# Conflicts:
#	docs/mission-packs.md
#	tests/learn-demo.mjs
# Conflicts:
#	public/learn/demo/DEMO.json
#	src/learn/learn.js
#	src/sim/sim-device.js
@david-firia
david-firia merged commit 5c3490b into main Nov 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant