Commit Graph

205 Commits

Author SHA1 Message Date
Joshua Bell
bff32795f6 Oops, previous is not ready yet 2024-10-14 23:36:40 -07:00
Joshua Bell
6ec42048ae Add Wizard's Castle sample, c/o Brendan Ghareeb 2024-10-14 23:34:10 -07:00
Jonatas de Mello
0b004f9056
bufgix for "Illegal quantity in line 7130" (#48) 2024-05-21 20:54:14 -07:00
Jonatas de Mello
240fc1e2b9
feature: add "The Horrible Rotten Dancing Dragon" game (#49)
* add The Horrible Rotten Dancing Dragon game
2024-05-21 20:52:13 -07:00
Joshua Bell
f70fe78d0a Hires: Default to color 7 2024-05-19 10:36:15 -07:00
Joshua Bell
6278f871fb Several sample fixes/improvements by Alan Ratliff
**In "Simple Pong" I eliminated the problem of the bouncing ball erasing the bottom wall of the field, created a means of scoring points (when the ball gets past a paddle and hits the "back wall", the other player scores a point -- one point each time the ball gets past the paddle, so that multiple impacts that typically occur don't count a point each), and allowed the possibility of equiangular bouncing off the paddles, instead of always just bouncing straight back along the same trajectory.

Also, this game isn't really suited for "paddle"-type control on this platform, as there is typically just one mouse for that purpose, not practical for two players. However, with key-control, the comments cited a problem of needing to be able to handle multiple keystrokes. As it was, when one player pressed a directional key, their paddle would start moving and not stop until it hit its upper/lower limit. It would stop, though, if a non-operational key were pressed, or one of the other player's keys. This latter meant that one player hitting a key to move their paddle would stop the other player's paddle from moving, which was where the real problem occurred. Underlying this was the fact all movement was controlled by the single last key pressed. I changed it by introducing variables to control the movement of each paddle which would be set by the appropriate keystrokes. I also added a specific key for each player to stop their paddle's motion, as well as duplicate directional keys so that each player's key group would be suitable for either the left or right hand: with either hand they could press "down" with the index finger, "stop" with the middle finger, and "up" with the fourth finger.

***With "Hangman", I did the usual random-seeding, avoided the initial-keystroke-termination problem, and simplified the word-choosing algorithm, and set it to go through all words in a difficulty-group, then continue by choosing among the 9 words in that group least-recently used. I also incorporated level-change options in the new-game menu, and I greatly reduced the code for the circle-drawing routine (while still utilizing principles of geometry), and re-organized the parts-drawing routines so the "smiley face" routine could be simplified.

***Next is the "Door Detector" game program. Its problems were subtle ones, principally that it would occasionally crash with an "Illegal quantity error in line 320". This concerned the value of "G" that was assigned as COLOR. This crash was quirky, as the program maintained the value of G between 0 and 15 in some places, but not others, while supposedly the value given to COLOR is not "Illegal" unless it's outside the byte-range 0-255; within that range the value merely has its lower nybble isolated to serve as the COLOR value. I put in a tweak to print the value of G to be used in line 320, and upon a crash it was shown as 50. I'm not sure why it occurred this way, but I figured that a way to be safe would be to just *always* ensure that G is kept in the range 0 to 15.

The program also had the "standard" problem that it didn't seed the random-number generator, so it always played an identical "game sequence" every time, instead of different permutaions as you'd normally expect with "random numbers".

Another "subtle" shortcoming I noticed concerned the fact that in successive "rooms" within a game, the "Death Zone" is an incrementally "thick" border region around the room, and in any given room the "exit" could be randomly placed right next to the "Death Zone's" edge, and as the player would start the next room where the previous room's exit was, a next-to-Death-Zone exit would mean the player would start the next room IN the Death Zone (its innermost layer). As it happened, in the one game-sequence that occurred, the final room's exit in the first game was along the Death Zone's edge, but as it was the FINAL room anyway, the next-room starting location was not an issue. I figured, though, that with the game properly randomized, the issue COULD come up, so I now use line 50 (commented in 40) to bump the player out of the Death Zone if they're starting a room within the Zone.

***With "Columns" there was the usual lack of random seeding, and again a rather drab color scheme for the lower number of colors. I also reduced the maximum number of colors by one, so that it would never use both of the indistinguishable grays. Also a comment on line 2840 mentioned a "Future animated splash screen", so I created one.

***The primary problem with "Chase" was lack of random seeding, so it always played the same sequence of games, which would wear out quickly. There were also a few duplicate line numbers I eliminated. The game presentation could also be improved by simply VTABbing up to display each new board layout over the old one, rather than scrolling up for new diagrams. Also, I documented in the instructions how a player should expect to encounter impossible situations frequently, and just move on when that happens; and I generally streamlined the code considerably, including cleaning up messy text displays.

***With "Gaussian distribution 2D", trying an example resulted in an "Illegal quantity in line 160". This was caused by the hires X coordinate just exceeding the maximum 279, apparently due to imprecise calculations. Reducing the designated maximum (assigned to 'w') in line 30 to a value of 278 seems to clear this up. I also reduced the maximum Y a bit so the diagram would not butt against the text on screen-line 21. In addition, there were a few (i.e. redundant) explicit expressions of the value of PI, all then multiplied by 2 to obtain 2PI; I replaced these with one derivation of PI/4 via ATN(1), multiplied by 8 to obtain 2PI, and stored it in variable 'p2' (for "PI * 2").

***With "Original Series Enterprise" I created a much more accurate depiction of said entity. To be honest, it really isn't Gil Keidar's anymore, it's mine...

***Finally, with "Prime Factors", the old version, in a number of cases, did not produce the correct results. I have fixed that problem. I also replaced its series of like multiplications (e.g. 2x2x2x2x2x2) with a base^exponent exprression (2^6).
2024-02-19 11:03:15 -08:00
Joshua Bell
7a42070bcd Add STRING$ and SPACE$ Demo (Alan Ratliff) 2024-02-19 10:35:04 -08:00
Joshua Bell
2fde77b8e8 correct attribution 2024-02-19 10:31:49 -08:00
Joshua Bell
ea61e845c7 Add Sierpinski triangle by Helen Edgar 2024-02-19 10:26:21 -08:00
Joshua Bell
d7ebf753db Thunderclock: Tweak DOS/BASIC handling of colons
This is ugly, but you should see what real BASIC/DOS do under the hood.
2024-02-11 15:16:39 -08:00
Joshua Bell
d727640ef4 Added Random Maze sample by Alan Rat 2024-02-10 18:36:39 -08:00
Joshua Bell
a23879b693 Fix for previous - don't call callback synchronously 2024-02-10 18:28:31 -08:00
Joshua Bell
555f8de2ae Simulate Thunderclock in Slot 4
See the new sample for details/example.

Note that reading 12/24-hour time formats that have colons will not
currently work, as the colons will terminate input and result in
invisible ?EXTRA IGNORED errors.

Fixes #44
2024-02-10 18:22:08 -08:00
Joshua Bell
f18ad47d1c Samples: Update platformer, c/o Brendan Ghareeb 2024-01-13 10:18:34 -08:00
Joshua Bell
229f2957de Updated Platformer sample 2023-10-06 13:10:37 -07:00
Joshua Bell
f625602942 Update platformer sample 2023-10-01 19:26:20 -07:00
Joshua Bell
ec3a771fdc Page: Use OPTGROUP in SELECT 2023-09-21 21:39:20 -07:00
Joshua Bell
aee6b4665f Build sample index from data file 2023-03-10 20:24:57 -08:00
Joshua Bell
abe614a52d Fix credits for platformer sample 2023-03-10 20:05:13 -08:00
Joshua Bell
887b3be2a6 Updated Platformer sample by Beckett Bylsma 2023-03-08 08:45:01 -08:00
Joshua Bell
5ebbde151f Add platformer sample, a work in progress by Beckett Bylsma 2023-01-22 12:55:56 -08:00
Joshua Bell
cc5806e482 Fix ESLint warnings (and one actual bug) 2023-01-04 19:34:48 -08:00
Joshua Bell
7a8c663315 Further fixes for LEFT$/MID$/RIGHT$ and tests
* MID$ allows 0 for the second (length) argument
* Add tests for error cases.
2022-12-05 18:46:44 -08:00
Colin Leroy-Mira
3d37fc357a
Fix bug in LEFT$ MID$ and RIGHT$ (#45)
"The message ?ILLEGAL QUANTITY ERROR is displayed
 if \aexpr\<1 or \aexpr\>255.

Co-authored-by: Colin Leroy-Mira <colin.leroy-mira@sigfox.com>
2022-12-05 18:46:20 -08:00
Joshua Bell
252b39dc08 Add Bite sample 2022-10-23 15:25:37 -07:00
Joshua Bell
1d8e8822db Add Artillery sample 2022-10-23 15:23:41 -07:00
Joshua Bell
734d953a3b Add Building sample 2022-10-23 15:12:48 -07:00
Joshua Bell
ea4444ae49 Add Codabar Generator sample 2022-10-23 15:04:43 -07:00
Joshua Bell
4e5fc97a61 Fix bad line numbers in sample 2022-09-06 19:32:06 -07:00
Mikael O. Bonnier
7ad4841d89
Add Aritm game (#42)
* Create sample.aritm.txt

* Update index.html

* Added "01", ",1", and ".1" as alternatives to "-1"

* Updated year to 2022

* Initialze text mode & fix possible roundoff error

* Switched subroutines to functions & improved seed
2022-01-29 10:35:21 -08:00
Mikael O. Bonnier
6ba216c726
Add Aritm game (#42)
* Create sample.aritm.txt

* Update index.html

* Added "01", ",1", and ".1" as alternatives to "-1"

* Updated year to 2022

* Initialze text mode & fix possible roundoff error

* Switched subroutines to functions & improved seed
2022-01-29 10:35:03 -08:00
Joshua Bell
94994cd90f Fix links. Fixes #43 2022-01-29 10:24:27 -08:00
Joshua Bell
452ed49081 Fix typo 2022-01-29 10:19:28 -08:00
Joshua Bell
0f77241688 Reference: Add Operator Precedence table 2022-01-12 17:32:34 -08:00
Joshua Bell
513f07de62 Rev CodeMirror 2021-06-19 17:29:30 -07:00
Joshua Bell
0fd019442e Rev CodeMirror 2021-06-19 17:28:06 -07:00
Joshua Bell
6fb8412aab Document PEEK/POKE shims using negative integers 2021-05-29 12:08:29 -07:00
Joshua Bell
b0b2299cfb Fix initialization 2021-03-31 20:45:46 -07:00
Joshua Bell
b75c1f027f Unit Tests: Fix TEXT, add failing FOR case 2021-03-31 20:28:41 -07:00
Joshua Bell
5fc7c66b55 Make TEXT set HTAB 1 : VTAB 24 2021-03-31 20:13:14 -07:00
Joshua Bell
e15655e105 Focus on the screen when keyboard register is read 2021-03-31 20:06:14 -07:00
Joshua Bell
f5651d24f9 Fix some Sample filenames 2021-03-31 20:03:30 -07:00
Joshua Bell
2495381bcb Fix parsing of unterminated strings in DATA statements
Fixes #35
2020-06-24 21:42:10 -07:00
Joshua Bell
697ccd63e9 Fix window text bottom - should not be changed if top changes.
The TTY module stores top/height but the Apple monitor stores
top/bottom. If top changes, bottom should remain unchanged.

Improve the POKE 34 shim, and add a test.
2020-06-24 21:19:49 -07:00
Joshua Bell
c64c10e5d2 Various game fixes and enhancements by Alan Ratliff 2020-06-20 15:49:59 -07:00
Joshua Bell
8d91265d3b Fix docs for 80-col check peek 2020-06-20 15:38:39 -07:00
Joshua Bell
6c7f7e9eec Update some URLs 2020-06-20 15:36:17 -07:00
Joshua Bell
dd01e4c9f1 Add sample: Space Attack by Alan Ratliff 2020-06-13 10:46:11 -07:00
Joshua Bell
45aa654f0c Improve GR/HGR colors 2020-06-13 10:38:34 -07:00
Joshua Bell
5329ae4ccc Fix TAB() documentation 2020-06-13 10:38:22 -07:00