drogon wrote:
Or even Hunt the Wumpus if she can visualise a dodecahedron (although the classic version of that requires an array to manage the room data)
What about "snake" ? that may require some extras adding into your dialect - inkey (to see if a key is pressed) and text-mode character positioning...
Good suggestions, thank you. I like your wumpus game, but it does take visualization. The snake game is *currently* not possible because, as you said, inkey and text-positioning needs to be a thing. I had planned on putting those in, but stopped because of a few reasons.
CountChocula wrote:
Hangman
Tic-tac-toe
Snake (always a classic)
Arithmetic trainer
ASCII charset explorer (useful for learning how text display works!)
Good ideas, thank you. I already have a 'scratchpad' program, where you can freely type any keyboard characters on the screen, wherever you wish. Is that like the charset explorer?
teamtempest wrote:
Just out of curiosity, I see "GOTO 100" in the listing, but not a line 100. That not finding that line seems to be a termination condition, as there is no error message. Is that the default behavior when not finding a line, or does it have to be greater than any existing line?
It's your version of BASIC, of course, but wouldn't it be more intuitive to have an explicit "END" statement? I think it would be pretty easy to implement and, for what it's worth, subjectively more satisfying.
Part of learning is making mistakes, and it's nice if a beginning programming language can respond to them more or less gracefully. A message along the lines of "I can't find line (#)" (instead of "LINE NOT FOUND ERROR"), might be something to think about.
Post
All very good points. Yes, the GOTO 100 basically goes to an empty line, which is ok because it will check for all 255 lines possible in it's designated code area. This makes it super slow without an END, so typically I've been using GOTO 255 to indicate the end.
I don't want to put in "END" because it uses a "D" which is a variable name. This program is very picky about letters!
And... it has no error detection at all.
barrym95838 wrote:
VTL02 is incapable of producing an error message. If your program commands it do something it can't do, it quietly and politely does something else it can do.
Just as Mike talks about, my program does whatever it *thinks* is right. No errors at all.
drogon wrote:
I suspect it all stems from the days of "4K BASIC"
Yep. Mine is nearly at the 4K mark right now. And I'm happy with that
So, another 'feature' I haven't told y'all is that keywords do not need to use all letters, so a re-coding of the previous primes example could look like:
Code:
1P"INPUT NUM ":INX
2A=2
3PA:P"\"
4A=A+1:IFA>XTG10
5C=A-1
6IFA%C=0TG3
7C=C-1
8IFC=1TG3
9G6
L
R
This allows for compressed data, so you can fit more program into the little RAM available (I think I have 10K set aside for as program/variable RAM).
Thank you for the suggestions. I'll be working on this throughout the days.
Chad