Files
akbasic/docs/images/breakout-screen.png

6 lines
5.1 KiB
Plaintext
Raw Normal View History

Add two Breakout examples and the tutorials that build them Two complete games in `examples/breakout/`, both 100% BASIC: `characters/` draws its wall in the text grid with two `DATA` sprites for the ball and paddle, and `sprites/` loads CC0 artwork and captures its whole screen with `SSHAPE`/`SPRSAV`. They take opposite shapes for reasons that are entirely this interpreter's, which is what the chapters are for. `docs/17-tutorial-breakout.md` and `docs/18-tutorial-breakout-artwork.md` build each one a step at a time, and end in a checklist of the rules a real program runs into: create every name before the loop starts, write a text row whole, loop with `GOTO` rather than `DO`, put the float on the left. Every trap is a runnable block with its own output rather than a claim -- the value pool dying at four thousand names, the skipped `BEGIN` block that breaks its caller's `RETURN`, `SSHAPE` ignoring a subscript, `READ`'s single cursor. Five figures, generated from the listings beside them by `docs_screenshots`, and a `breakout_art` setup so the ones that load artwork load the example's own. The character game's wall cannot be photographed -- the screenshot host omits the text layer on purpose -- so it is shown as compared output instead. `docs/07-sound.md` never said `SOUND`'s frequency is a SID register value rather than hertz, which both games depend on. It says so now, with the conversion from `src/audio_tables.c:84`. `TODO.md` gains the thirteen defects the two games turned up -- §6 items 30 to 33 and all of §9 -- each with a reduction that fits on a screen, the file and line of the cause, and what a fix would touch. Verified: `docs_examples` passes in both build configurations, `docs_screenshots --check` re-renders all thirteen figures and byte-compares them, the full 109-test suite passes in both builds, every quoted fragment was checked to appear verbatim in the listing it came from, and every relative link and anchor resolves. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Andrew Kesterson <andrew@aklabs.net>
2026-08-01 22:54:42 -04:00
<EFBFBD>PNG

IHDR X'DIDATx<54><78><EFBFBD>[<5B><>g}<7D><>g<0E><>ٵ<EFBFBD>v<EFBFBD>s<EFBFBD>(>(E<>8P<38><50><EFBFBD>BT B*Q<12>p<EFBFBD>H<EFBFBD><48><EFBFBD><EFBFBD>4<EFBFBD>7Q<37>zS<7A>ԫ<16><>I<EFBFBD><49><>C<>LܢR"<07>P<EFBFBD><1C><><EFBFBD>f<EFBFBD><66><EFBFBD><<3C>^l<<3C><>u<Q~<7E>3<EFBFBD>|>7y=<3D>W<EFBFBD><EFBFBD>b<EFBFBD><62><EFBFBD><EFBFBD>3[
<00>Ye<59>?<3F>fs<66>s<00><>x<><78> ,<00><>bmMU8<00><><EFBFBD><EFBFBD><08>_<EFBFBD>С<EFBFBD>G6<00>Q<EFBFBD><51><EFBFBD>?p<><70><EFBFBD><04>՞
<00>ZWۖr<DB96> L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa<><61><EFBFBD><EFBFBD>_<EFBFBD>ֻ;@П<><D09F>z<><7A>5<EFBFBD><35>k<EFBFBD>X<EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD>FX<46>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa L`l<>f<EFBFBD><66>;>t<><74>'k<>imM<6D><4D>Xa L`<00> ,<00>0<EFBFBD>&<26><00><><EFBFBD>}<7D><>}<7D><><EFBFBD><10><>?=<3D>;<3B><><EFBFBD>g]<5D>źF<C5BA>u<EFBFBD><75>7º6<C2BA>,<00>0<EFBFBD>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa `c4<63><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD>G8 <00><>X[Mkk<6B>@<40><>Xa L`<00> ,<00>0<EFBFBD>V<1F><>?<3F><>?<1D>Aw<41><77><EFBFBD>{<7B><>5<EFBFBD><35>k<EFBFBD>X<EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD>FX<46>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa L`l<>f<EFBFBD><66>;>t<><74>'k<>imM<6D><4D>Xa L`<00> ,<00>0<EFBFBD>&<26><00><><EFBFBD>}<7D><>=<3D><><EFBFBD><10><><EFBFBD><EFBFBD><EFBFBD>;<3B><><EFBFBD>g]<5D>źF<C5BA>u<EFBFBD><75>7º6<C2BA>,<00>0<EFBFBD>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa `c4<63><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD>G8 <00><>X[Mkk<6B>@<40><>Xa L`<00> ,<00>0<EFBFBD>V<1F>˿<EFBFBD>~s<> w<77>wl]<5D>ϺF<CFBA>u<EFBFBD><16>-o<>um>;Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00><00><>h6<68><36><EFBFBD>C<EFBFBD><43> p<00>Q<EFBFBD><51><EFBFBD><EFBFBD>֔,<00>0<EFBFBD>&<26><00>@<40><>Xa <20><><D897><EFBFBD>>?<3F><01><1E><>O<EFBFBD><4F><EFBFBD>k<EFBFBD>Y<EFBFBD>h<EFBFBD><68><EFBFBD>b]<5D><EFBFBD><E58DB0>g L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><><00><18>f<EFBFBD>w|<7C><><EFBFBD>N0*<2A>V<EFBFBD>ښ<EFBFBD><DA9A>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>Xa L`<00> ,<00>0<EFBFBD>&<26><00>@<40><>X