Building Creative Cross Training
Sessions 1–5: Architecture, Mystic Shield, Hub Launch, Home Page Wiring & Cross-Linking
How a Processing sketch became TNT’s creative-coding cross-language pathway
This is the development diary for TNT Creative Cross Training — the sister area to the existing concept-centric Cross Training hub. The focus here is creative coding in the Processing ecosystem: one visual sketch, rebuilt in p5.js, Java Processing, and Python Processing.
The log follows the S.P.A.R.K. method: Set goal → Prompt thoughtfully → Analyze the response → Refine → Know what you built.
Session 1 summarizes the markdown discussion that separated Creative Cross Training from the CS Concepts Cross Training area.
Session 2 captures the Mystic Shield work: debugging Python Processing, refactoring all three language versions to HSB, and launching the p5.js showcase.
Session 3 records the code-display rules that became canonical after the Twinkling Stars and Mystic Shield copy bugs.
Session 4 documents the Creative Cross Training home page and its first live entry.
Session 5 documents ecosystem wiring: the TNT home page card, the compact Explore entry, and reciprocal links between the two Cross Training hubs.
Session 6 adds Interactive Mystic Shield: a mouse-reactive p5.js app that uses a finished AI/robot image as the base layer and overlays live shield geometry.
Session 7 creates Interactive Mystic Shield 2 as a safe duplicate with a held-mouse perspective effect that compresses the shield into a vertical ellipse.
We want a place for Processing Cross Training apps: p5.js sketches translated into Java Processing and Python Processing. The markdown notes argue this is related to Cross Training, but not the same teaching path.
Creative Cross Training gets its own hub because its audience intent, page rhythm, and project shape are different. Students arrive through visual curiosity: How does that sketch work? The answer is still cross-language learning, but the path starts with canvas, color, geometry, and motion.
The two areas remain visibly connected: CS Concepts Cross Training handles algorithmic concepts; Creative Cross Training handles Processing sketches and visual design patterns.
The p5.js version is the live browser experience. Java Processing and Python Processing are comparison targets and downloadable/source-study versions. This asymmetry is intentional: the web page can show p5.js immediately, while Java and Python Processing require local Processing tools.
SketchWave is an abstraction layer, so it should not be the first stop. The learning sequence is: raw Processing API first, cross-language visual patterns second, then higher-level SketchWave/PyWave abstractions when students understand what is being wrapped.
The first Python Processing version appeared to do nothing. Root cause: size(800, 600, P2D) was inside setup(). In Python Processing, renderer-backed sketches must declare size() in settings(); otherwise Processing may silently fail to open the canvas.
After the renderer fix, the sketch appeared frozen because print() calls were still inside functions called from draw(). In the Jython-based Python Processing runtime, console I/O is expensive enough to crush animation. Per-frame prints were removed; the one-time setup() breadcrumb stayed.
Mystic Shield was refactored to use colorMode(HSB, 360, 100, 100, 100) in all three languages. The fire palette became portable design data rather than arbitrary RGB triples: deep amber backgrounds, orange boundary rings, golden satellite sigils, and randomized spark hues.
Alpha values moved from the RGB 0–255 range to the HSB 0–100 range. That required proportional changes such as lifeRatio * 255 becoming lifeRatio * 100 and alphaOffset shrinking from random(0, 100) to random(0, 40).
The page MysticShield/mysticShield2.html became the first live showcase. It runs the p5.js sketch in-browser, displays source code in a fire/amber greenbar, and links to the Java and Python source files for the coming full comparison page.
The string highlighter wrapped code fragments in spans, then later keyword matching saw the word class inside <span class="...">. Browser error recovery made the displayed HTML unpredictable, and copying textContent preserved the mess.
All future code-display pages should use copyRaw(btn, RAW_CODE_VARIABLE). Copy buttons read from the original source string, never from the highlighted DOM.
Keyword and number highlighting helpers must avoid matches inside HTML tags by checking whether the match occurs after the most recent < and before the next >. The helper pattern now belongs to both Mystic Shield and the earlier Twinkling Stars comparison page.
The hub was created as creativeCrossTrainingHome.html with styling in creativeCrossTrainingStyles.css. The hero uses ../images/aiRobotMentoringHuman.jpg, while the first entry card points to MysticShield/mysticShield2.html.
The first card is Mystic Shield, labeled Entry #1 and tagged for p5.js, Java Processing, and Python Processing. The entry text emphasizes the reusable creative-coding patterns: HSB color mode, polar motion, layered transforms, and particle classes.
The Mystic Shield card preview now uses MysticShield/images/strangeShield-background.gif, matching the teacher-provided animated preview when saved into the project. The older static mysticShield.png remains the source image for the showcase page hero assets.
The main index.html page gained a new featured destination card for Creative Cross Training, using images/aiRobotMentoringHuman.jpg as the background. The existing Cross Training card was clarified as Cross Training: CS Concepts so visitors can distinguish the two doors immediately.
The Explore All Sections grid on index.html gained a compact Creative CT card immediately beside the CS Cross Training card. This mirrors the two-card relationship in the featured destinations section.
CrossTraining/crossTrainingHome.html now points to Creative Cross Training with an Also: Creative Cross Training link. The Creative Cross Training home page points back with Also: CS Concepts Cross Training. The goal is one-click recovery if a student enters the wrong cross-training doorway.
| CreativeCrossTraining/creativeCrossTrainingHome.html | Created hub page; later linked to this chatlog and CS Concepts Cross Training. |
| CreativeCrossTraining/creativeCrossTrainingStyles.css | Created fire/amber creative-coding hub styling. |
| CreativeCrossTraining/creativeCrossTrainingChatlog.html | Created this S.P.A.R.K. development log. |
| CreativeCrossTraining/creativeCrossTrainingChatlogStyles.css | Created standalone chatlog styling. |
| CreativeCrossTraining/MysticShield/mysticShield2.html | Built the first live p5.js showcase entry. |
| CreativeCrossTraining/MysticShield/src/MysticShield2.py | Created Python Processing HSB version. |
| CreativeCrossTraining/MysticShield/src/MysticShield2Sketch.js | Created/refined p5.js HSB version and browser canvas attachment. |
| CreativeCrossTraining/MysticShield/src/MysticShield2.pde | Created Java Processing HSB version. |
| index.html | Added Creative Cross Training feature card and compact Explore entry; clarified CS Concepts Cross Training. |
| CrossTraining/crossTrainingHome.html | Added reciprocal link to Creative Cross Training. |
- Build
MysticShield/mysticShield2CTraining.htmlas the full three-language comparison page. Completed 2026-09-25. - Build
MysticShield/interactiveMysticShield.htmlas a mouse-reactive p5.js image-augmentation app. Completed 2026-09-26. - Build
MysticShield/interactiveMysticShield2.htmlas a safe perspective-tilt experiment. Completed 2026-09-26. - Carry the colored-paper language panel pattern forward from the Twinkling Stars comparison work.
- Add a Creative Cross Training news entry when the Mystic Shield comparison page is complete.
- Continue tracking Python Processing rules: renderer-backed
size()belongs insettings(), and per-frame print calls are off limits.