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

10 lines
1.5 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><45><00><><03><><03><><03><><02><><02><><02><><00><><00><><00><><02><><00><><02><><00><><18><>L<EFBFBD><4C><1B><>W<EFBFBD><57><16><><14><>*<2A><>:<3A><>)<29><> ҬҰ(<28><>O<EFBFBD><4F>.<2E><>%<25><><1F><>><3E><>@<40><>D<EFBFBD><44><08><>F<EFBFBD><46><15><> <0C><>-ͬ,<2C><>0<EFBFBD><30>K߹$<24><><11><><08><>N<EFBFBD><4E>Ÿ˧<1A><><1F><><10><>0Ұ)ױ<1D><>N׵/׷6<D7B7><36><12><><12><>D<EFBFBD><44><ͫ&<26><>M <1E><>V<EFBFBD><56><05><>6<EFBFBD><36><0E><><18><> <0C><><19><>&<26><><10><>2<EFBFBD><32>J<EFBFBD><4A>+׳%<25><><15><>ұ.Ϭ <20><> <0C><><14><>ҭ<1F><>1<EFBFBD><31>
<EFBFBD><EFBFBD> <0B><>:<3A><><02><><02><><02><>*<2A><>S<EFBFBD><53>Z<EFBFBD><5A>h<EFBFBD><68>K<EFBFBD><4B>)<29><>0<EFBFBD><30>4<EFBFBD><34>-<2D><>@<40><>L<EFBFBD><4C>;<3B><>J<EFBFBD><4A><00><>$<24><>F<EFBFBD><46>+<2B><>I<EFBFBD><49>%<25><>1<EFBFBD><31>8<EFBFBD><38>0<EFBFBD><30><01><>)<29><>*<2A><>8<EFBFBD><38><1F><>"<22><><01><>=<3D><><1C><><1E><>%<25><>5<EFBFBD><35>J<EFBFBD><4A>:<3A><>-<2D><><00><><02><><01><><00><><00><><0E><>0<EFBFBD><30>P<EFBFBD><50><07><>2<EFBFBD><32>/<2F><>Ц<02><> <20><>ԪȠ<02><><02><><02><>-<2D><>(<28><>+<2B><><1B><>
<EFBFBD><EFBFBD>;<3B><>ٮ<02><>ө<02><><00><><01><><08><>ۯ׬ˣΥ<02><><00><><00><><01><>%<25><>2<EFBFBD><32>R<EFBFBD><52>̣߲<02><><02><><18><>T<EFBFBD><54>4<EFBFBD><34>g<EFBFBD><67>J<EFBFBD><4A><1A><>6<EFBFBD><36>'<27><>e<EFBFBD><65>0<EFBFBD><30>W<EFBFBD><57>I<EFBFBD><49>7<EFBFBD><37>U<EFBFBD><55>X<EFBFBD><58>9<EFBFBD><39><1C><>d<EFBFBD><64>b<EFBFBD><62>G<EFBFBD><47>Y<EFBFBD><59>[<5B><>E<EFBFBD><45>\<5C><>^<5E><>;<3B><><<3C><>><3E><>@<40><>)<29><>a<EFBFBD><61>`<60><>D<EFBFBD><44>B<EFBFBD><42><1E><>,<2C><>.<2E><> <20><>"<22><><01><>$<24><>&<26><>+<2B><>-<2D><><02><><03><><02><><00>'<27>)tRNS?_<><5F>ϟoO/<2F><0F><>2<>m<EFBFBD><02>IDATHǍ<48>UwAF;<3B><><EFBFBD>wwwwwwwwww<77>!,<04>{p<>,<2C><><EFBFBD>3h<33>학I<ED9599>cu<63>s<EFBFBD>S<EFBFBD>Ӄ<15><><EFBFBD>f<EFBFBD><13>X5J`(<28>`<03>V<1D><>Z2<5A><32><EFBFBD><06><6A>$cI? Z6  i<><16>V<EFBFBD>` <0A>].b.a<><61><EFBFBD>Τ-<2D>-0d<30>u<EFBFBD>5B<35><42> <20>i <06>a<EFBFBD><19><>>V5<56><35><11>r<>sz<73><7A>Ŭ,<2C><><EFBFBD><18><><EFBFBD>#'}{<7B><04><>[<5B> <0B><04><> 1<><31><EFBFBD><EFBFBD> 6mx)5H<35><04><>?v<>{<7B><><EFBFBD><EFBFBD>ͯ<05><><EFBFBD>V<EFBFBD><56><EFBFBD>#<23>|$<24><><EFBFBD>٘<EFBFBD>F<EFBFBD>=<3D><><04><> ,<1C>{<7B><><EFBFBD>`<60><>k<1B>D<><44><EFBFBD><EFBFBD><1B><><EFBFBD>8<EFBFBD>ɍ<EFBFBD>t%<25><><0F><>^ <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>g<EFBFBD><67>x%<08><43>;v}<7D>`<60>꧂re<01>P<EFBFBD>r<EFBFBD><07>u[~<7E><><EFBFBD><EFBFBD>.<2E>|<7C>RX<52>A<05><>Ӭ<EFBFBD><D3AC><EFBFBD><EFBFBD>?X<><58><06>um<75><6D>4<EFBFBD><34><19><><EFBFBD>,Y<>be<62>//Z0w4<77>

<EFBFBD><EFBFBD><EFBFBD>GJ<EFBFBD>_U<EFBFBD>XG
<EFBFBD>C<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*<2A><><EFBFBD>:<3A><>{0B<30>o<EFBFBD><6F>?*<2A><><EFBFBD>F<EFBFBD><46><EFBFBD><EFBFBD>I0<49>fyB<79>?<><E6938E><EFBFBD>D=L <0B><><EFBFBD>ey<65>r<EFBFBD>9|4#*<<3C>3X<33><58><30>Sd<53>Ve<56><=<3D><>{<7B><1B>+<2B>Vڭ,<2C>a<EFBFBD>r.<2E><>m <0A>˼tD-!<21>$<24><><1F><><EFBFBD><05>Dr<06><><EFBFBD> 2<15><>}q"<22>Y<EFBFBD>DY4 Z<><5A><EFBFBD>N<EFBFBD><4E><EFBFBD>
&<26>LǸ0<C7B8>&⯆N=<3D>q<EFBFBD>D\<5C><>t<EFBFBD>3D<><44>"/Ҹp<D2B8>%r>dg<>T<EFBFBD>9Gi=<3D>'r
<EFBFBD><14><0F><><EFBFBD><EFBFBD><EFBFBD>ˇ<EFBFBD>2<EFBFBD>%<25><79>#<23>%2z><3E><16><><EFBFBD><1C>~G<>l<EFBFBD>H<EFBFBD>z<EFBFBD>i<EFBFBD><18>"9$<24><>K@8S<38>C<EFBFBD>9<0F><>? <09>g<EFBFBD> <09>,W"!<21>A<13><>`<60><><EFBFBD>%<25>/<2F>?<0F>֏<EFBFBD>`<60><>IEND<4E>B`<60>