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

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

IHDR0.Yj^gAMA<00><> <0B>a<02>PLTE<54><08> <0B>
<EFBFBD>
<EFBFBD>
<EFBFBD> <0B> <09>
<EFBFBD><08> <0B>
<EFBFBD><00> <0B> <00>EE<45><17>dd<64>((<28>}}<7D>ss<73>##<23>WW<57>??<3F>44<34><12>>><3E>rr<72>11<31>**<2A>LL<4C>JJ<4A>``<60>jj<6A>\\<5C>^^<5E><1C><14>11<31>MM<4D>>><3E><17>UU<55>ll<6C> <0A>ff<66>##<23><<<3C>$$<24>EE<45> <20>44<34><14>44<34>++<2B><13>FF<46>ii<69>88<38><1C>WW<57>KK<4B>aa<61><1F>::<3A>UU<55>..<2E>tt<74>kk<6B>77<37>&&<26>EE<45>//<2F> <20>VV<56><1A>MM<4D>>><3E>::<3A><11><0F><19><10>66<36>((<28>''<27>ff<66>BB<42>77<37><16>SS<53>__<5F>XX<58> <0B><11><11><1A><11>44<34>SS<53>88<38>ii<69>]]<5D>00<30><16>cc<63>""<22><><EFBFBD><EFBFBD>ll<6C>KK<4B>XX<58><7F>VV<56>ll<6C>WW<57>[[<5B>ee<65>--<2D>mm<6D>RR<52><14><1D>))<29><18><11>44<34>!!<21>ZZ<5A>ss<73><12>YY<59>??<3F><0F>%%<25><17><11><10><0E><0E> <0C><11><11>::<3A><1E>pp<70>**<2A>HH<48>RR<52><18>bb<62>GG<47><11>++<2B><11> <0A><10><11><14><11>22<32>&&<26><1F>tt<74> <0B><0F><11> <0A>II<49>33<33>vv<76>]]<5D><><EFBFBD><EFBFBD>\\<5C>oo<6F>KK<4B>55<35>==<3D><><EFBFBD><EFBFBD>__<5F>xx<78>``<60>ww<77>yy<79>nn<6E>aa<61><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>mm<6D>kk<6B>zz<7A><7F>~~<7E>||<7C>dd<64>ee<65>gg<67>ii<69>LL<4C><4C><EFBFBD><EFBFBD>{{<7B>jj<6A>77<37>cc<63>99<39>;;<3B>PP<50>NN<4E>$$<24>QQ<51>SS<53>XX<58>ZZ<5A>TT<54>VV<56><11> <0B><12>77<37><37><EFBFBD>vtRNS?_<><5F>ϿoO/<2F><0F><>Ά%<25><02>IDATHǍ<48><C78D>[A<14><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݝ<EFBFBD><DD9D><EFBFBD><EFBFBD><EFBFBD>-- i<>xU0P;AE0<45><30><EFBFBD><EFBFBD><EFBFBD>3<EFBFBD>wn<77>.<2E>Ϝ<>y~<7E>9<EFBFBD><39>(D<13>bA<62>'<27>e<EFBFBD>ֆ .<2E><>m,B<><04>zt<7A><0F><><EFBFBD>A" <0C><11>o$<24><>^A<08><><EFBFBD>E<EFBFBD>[<5B><>Y`<60> '̝w_<77><5F><EFBFBD><EFBFBD>P<10><>+<2B><>J)e@<40><>'ș<><C899><EFBFBD><EFBFBD>19 <0B>m<><7F>r<EFBFBD><72>*<2A>f<EFBFBD><66>yU5<55> g<><67>J<1F><>58E'*9+<16><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>9<EFBFBD><39>Q<EFBFBD><51>3u<33>g%H<1D><>O<EFBFBD><EFBFBD><EA9ABB><EFBFBD><EFBFBD>8"<22>J<1D><><EFBFBD><EFBFBD>9% 5eo9c<39>ҕ 2<>_<><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŋ<EFBFBD>d%<25>n<EFBFBD><6E>^<5E>9<EFBFBD><39>j<EFBFBD>8R<38><52><EFBFBD>5<12>Y<>E<EFBFBD>W<EFBFBD><57><EFBFBD>><3E><15><>4o
<EFBFBD><EFBFBD>V-<2D><>1<1F> <0A><><EFBFBD>F<>&<26><><EFBFBD><EFBFBD>0<EFBFBD>{Ⱥb<C8BA><62><07>4(<28>|<7C>0<EFBFBD><30><EFBFBD>f<><66>6<EFBFBD>0<EFBFBD><30><EFBFBD>H<EFBFBD><48>G<EFBFBD><47><EFBFBD><EFBFBD><EFBFBD>.P<><1A><15><>г<EFBFBD><D0B3><EFBFBD>W<EFBFBD>D<EFBFBD><44><1A><>BL0<4C>%<25><>i<><69><03><>l0<6C>;%<25><><0E><><EFBFBD>;<3B><>xq"L<4C><7F>JI<4A><49>CR<43><16>cP<50>+<2B> <09>E/<2F><>$<24><>N<EFBFBD><4E><EFBFBD><EFBFBD>(.<2E>= <0C><>j<EFBFBD>`I<>Lأ-ܠ<>y<EFBFBD><79><1B><01>-<2D><><16><>S<EFBFBD><1C><><06>mV:<3A><>H!FID<49> (d<><64><06><>l<EFBFBD> )ϔWo"<22><><EFBFBD>L<EFBFBD><4C>] <20><>`5ʤ&<26>D<EFBFBD>j"؍2<D88D>f<EFBFBD>z<EFBFBD><7A><EFBFBD>f<>L<EFBFBD>}1<> <20><19>DL<44><4C>N<EFBFBD><4E><EFBFBD>,.<2E>D<EFBFBD>C<EFBFBD>T3eJ~<7E><>#<23>+,<2C>*<2A> <20><><13>2<><32>E<EFBFBD><45><0F>eP<65><50>7<EFBFBD>
RMd<4D>}<7D><><10><><EFBFBD><1A>R<EFBFBD>%<25><><EFBFBD>z<EFBFBD>L<EFBFBD><4C>&<26>J"<22><><EFBFBD>p<EFBFBD><70><EFBFBD><0E>r!<21><>(",<2C><><13><><EFBFBD>D\0<>!<21>A<10><>E<EFBFBD>/<2F>?4<><34><EFBFBD><EFBFBD>4<EFBFBD>IEND<4E>B`<60>