Files
akbasic/examples/breakout/sprites/art/paddleRed.png

4 lines
578 B
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>
2026-08-01 22:54:42 -04:00
<EFBFBD>PNG

IHDRh!<21>HRgAMA<00><> <0B>a<00>PLTE<54><08> <0A> <0A> <0A> <0C> <0C> <0B> <0C> <0C> <0C> <0B> <00>%%<25><14> <0A><1E> <0A><0F> <20>**<2A><14><16>!!<21> <20><1C><19>//<2F>22<32><0F><12><17><0E> <0A><0F><0E>44<34><0E><0F><0E>##<23>44<34><0E>--<2D> <0A><0F>@@<40>__<5F> <0A><><EFBFBD><EFBFBD>77<37><10><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>l.<2E> tRNSO<>﯏/?<>_<EFBFBD><00><04>2IDATHǽ<48><C7BD>V<EFBFBD>0<05>P<EFBFBD><01><>m <0B>-P<><50>1<EFBFBD><31><EFBFBD>k<EFBFBD>j<>o0=/y<><79>2kV&"<22>"<22><><EFBFBD><18><>>"<22>UEQ<45> @w8<>D<EFBFBD>>3<>yMU<4D><><D6B5><EFBFBD>9"} ]<5D>ޜy; s<> <0A> <0A>dP<64><50>D]a<07>h<EFBFBD><68><EFBFBD><EFBFBD><1C><><EFBFBD>T<EFBFBD>%{6JJ<0F> !=O(<28>- <14><>d<EFBFBD><64> ]]<5D><><EFBFBD><EFBFBD>F<EFBFBD>N<EFBFBD>A<EFBFBD><41><EFBFBD>O<><4F>B<EFBFBD><42><EFBFBD>d<><64><EFBFBD>kz֜<7A>N<EFBFBD>@$:<3A><><EFBFBD><EFBFBD>)<29>Ў<><D08E><EFBFBD><EFBFBD><EFBFBD>1"<22><>;Զ<>vhm<68><6D>5<EFBFBD>;T<><54><EFBFBD><EFBFBD><EFBFBD>C<EFBFBD><43>/b<>7TA<54><41><EFBFBD><07><><EFBFBD>y<EFBFBD><79>vMh
Nh<04><><EFBFBD><EFBFBD>o<EFBFBD>&<26>Tn<54><6E><EFBFBD><EFBFBD>C +<07>VY<56>`<60>ω%<25>>'<27><><EFBFBD> <0B>C<EFBFBD><05><1D><07>P Տ<>d IEND<4E>B`<60>