--- title: "3D Box Message Demo" id: 72255 type: "computer_media" slug: "3d-box-message-demo" url: "http://localhost/computer_media/3d-box-message-demo/" markdown_url: "http://localhost/computer_media/3d-box-message-demo.md" published_at: "2026-10-23T07:47:25+00:00" modified_at: "2026-10-23T07:47:25+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/10/box-2.png" excerpt: "A wire-frame cube grows from a point, gets shaded faces, then lets the letters of a message out one by one before packing them back and shrinking away." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" genre: - name: "Demo" slug: "demo" taxonomy: "genre" url: "http://localhost/type/demo/" media_contents: - id: 72439 title: "SINCUS Exchange Tape 104" type: "computer_media" url: "http://localhost/computer_media/sincus-exchange-tape-104/" media_type: "Program" download_url: "https://archive.org/download/timex-sinclair-software-archive/3D%20Box%20Message%20Demo%20%28198x%29%28-%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "3D Box Message Demo (198x)(-)(TS2068)(US)(Program)/3D Box Message Demo (198x)(-)(TS2068)(US)(Program).tap" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2026/10/box-2.png" - url: "http://localhost/wp-content/uploads/2026/10/box-1.png" media_type_tags: "Demo" license: false --- # 3D Box Message Demo A wire-frame cube grows out of a point in the middle of the screen, five pixels at a time, until it fills the right half. The top and bottom faces are then filled solid and the two side faces shaded with diagonal hatching. A hatched flap lifts up out of the left side of the box, ticking as it goes, and the letters of a message come out one at a time: each slides left along a row near the bottom of the screen, climbs up a column and stops, flashing, under the letter before it. After a short four-note fanfare the letters go back into the box in reverse order, the flap closes, and the cube shrinks back to a point. The message is the placeholder “Put message here!”, meant to be replaced with your own text by editing the program. There is no credit in the listing. ## Program Analysis ### Structure - Lines 10–30 grow the cube, redrawing it with `e` from 0 to 80 in steps of 5. Lines 40–90 are the cube-drawing subroutine: a front square, a back square offset by `e/2`, and three connecting edges. - Lines 100–130 shade the faces. The two side faces get diagonal lines drawn with `OVER 1`, and the top and bottom faces are filled with rows of horizontal `DRAW`s. - Line 140 opens the flap. It redraws the left-face hatching with `OVER 1`, which erases it line by line, and draws the same lines 80 pixels higher, with a short `BEEP` on each step. - Lines 150–230 animate the message in. Each character of `a$` moves along row 17 from column 15 to column 8, rises to row `a` (its position in the message), and is printed there with `FLASH 1`. - Lines 240–350 play the fanfare and run the whole sequence backwards: the letters return last-first, line 330 closes the flap, and lines 340–350 shrink the cube. Line 9997 stops the program. ## Notable Techniques - `OVER 1` is used both to draw and to erase. Drawing the same diagonal twice in `OVER` mode removes it, which is how the flap seems to lift out of the side face. - The cube animation clears the screen and redraws the whole wireframe for each size, which gives a simple zoom effect without any machine code. - Text movement uses the usual print, `PAUSE 1`, print-a-space loop, with the destination row taken from the character’s position in the string so the message builds up as a vertical column. ## Potential Issues - The message is set twice, at lines 150 and 250. Both lines have to be edited, or the letters that go back into the box will not match the ones that came out. - Each letter stops on the row equal to its position in the message, so a message longer than 21 characters stops with an out-of-screen error at line 220. This program came from the PubDom#5 Oliger (JLO SAFE) disk and was converted to load from tape: the JLO slash was removed from its `SAVE` line and it now autostarts at line 10. It was tested in ZEsarUX. ## Source Code ``` 10 INK 7: PAPER 0: BORDER 0: CLS 20 FOR e=0 TO 80 STEP 5 30 CLS : GO SUB 40: NEXT E: GO TO 100 40 PLOT 128,88: DRAW e,0: DRAW 0,-e: DRAW -e,0: DRAW 0,e 50 DRAW e/2,e/2: DRAW e,0: DRAW 0,-e: DRAW -e,0: DRAW 0,e 60 PLOT 128+e,88: DRAW e/2,e/2 70 PLOT 128,88-e: DRAW e/2,e/2 80 PLOT 128+e,88-e: DRAW e/2,e/2 90 RETURN 100 FOR d=8 TO 88 STEP 2: PLOT OVER 1;128,d: DRAW OVER 1;40,40: NEXT d 110 LET b=89: FOR a=128 TO 168: PLOT a,b: DRAW 80,0: LET b=b+1: NEXT a 120 LET b=8: FOR a=128 TO 168: PLOT a,b: DRAW 80,0: LET b=b+1: NEXT a 130 FOR d=8 TO 88 STEP 2: PLOT OVER 1;208,d: DRAW OVER 1;40,40: NEXT d 140 FOR d=8 TO 50 STEP 2: PLOT OVER 1;128,d: BEEP .01,10: DRAW OVER 1;40,40: PLOT 128,d+80: DRAW 40,40: NEXT d 150 LET a$="Put message here!" 160 FOR a=1 TO LEN a$ 170 FOR d=15 TO 8 STEP -1 180 PRINT AT 17,d;a$(a) 190 PAUSE 1 200 PRINT AT 17,d;" ": NEXT d 210 FOR g=17 TO a STEP -1: PRINT AT g,8;a$(a): PAUSE 1: PRINT AT g,8;" ": NEXT g 220 PRINT FLASH 1;AT a,8;a$(a) 230 NEXT a 240 BEEP .2,20: BEEP .2,40: BEEP .3,-5: BEEP .2,30 250 LET a$="Put message here!" 260 FOR a=LEN a$ TO 1 STEP -1 270 FOR g=a TO 17: PRINT AT g,8;a$(a): PAUSE 1: PRINT AT g,8;" ": NEXT g 280 FOR d=8 TO 15 290 PRINT AT 17,d;a$(a) 300 PAUSE 1 310 PRINT AT 17,d;" ": NEXT d 320 NEXT a 330 FOR d=50 TO 8 STEP -2: PLOT OVER 1;128,d: BEEP .01,10: DRAW OVER 1;40,40: PLOT OVER 1;128,d+80: DRAW OVER 1;40,40: NEXT d 340 FOR e=80 TO 0 STEP -5 350 CLS : GO SUB 40: NEXT E 9997 STOP 9998 SAVE /"box" ```