Hacked barebones string support into Palo Alto TinyBasic.

It is now possible to input a string with IN$, then access its characters as $(0), $(1), ...

As in the original language, there is no way to convert a numeric character code back to a character and display it on the screen. (Yet!)

#basic #retrocomputing

Okay, now I have EMIT(n) to turn an ascii code back to a printed character. #MailStation #basic

It is nice when a program's author leaves a source comment with well-wishes for future readers, and they are received almost 50 years later.

https://archive.org/details/dr_dobbs_journal_vol_01/page/n143/mode/1up

#retrocomputing #basic

Looking at Line 5-10 of this #Basic Star Trek listing confused the heck out of me. This listing was written by Li-Chen Wang for use in his own #TinyBasic.

https://archive.org/details/1976-07-peoples-computer-company/page/22/mode/2up?view=theater

Here is the confusing part, expanded out to multiple lines and modern syntax for the benefit of today's readers.

Y=2999
INPUT "DO YOU WANT A DIFFICULT GAME? (Y OR N)",A
IF A=Y THEN Y=999

Without support for string input, how the heck can the program accept "Y or N" from the user?

Answer: In this dialect, INPUT accepts not just numbers, but expressions. Single characters (A-Z) are valid expressions and evaluate to the value in that variable. So in this program, typing "Y" sets A=2999 and typing "N" sets A=N (some uninitialized value). Then the next line checks A=Y (true if user entered "Y") and, if so, sets Y to 999 ("difficult game" value). Else, Y is left at 2999 ("easy game" value).

Li-Chen is absolutely some kind of genius.

#retrocomputing

1976-07 People's Computer Company : People's Computer Company : Free Download, Borrow, and Streaming : Internet Archive

The 22nd issue (Vol. 5, No. 1) of the People's Computer Company Newsletter from July 1976.Featured type-in programs:Random Melody Generator with...

Internet Archive
The funniest part here is that the magazine editors also got confused by this in 1976. "Hey, for this program to work, this #BASIC must have a 1-character mini string type!" No, no strings, the author just knows his language and is squeezing every ounce of expressiveness out of it.
psf (@psf@oldbytes.space)

Attached: 1 image In this later line of #TinyBasic Star Trek, what looks like a character input is actually a jump table managed by the same expression-evaluation trick. The "S" command starts on line 220, "G" on line 180, and so on. I actually think this is a tighter way of writing this kind of handler code than a more conventional if-else tree mapping an input$'s first character to possible commands.

OldBytes Space - Mastodon

#MailStation #TinyBasic program of the day: Hangman!

I wanted something that would exercise my hacked-in "strings" support. Seems to work well enough for a word game!

Source listing (21 lines): https://gitlab.cs.washington.edu/fidelp/mailstation_apps/-/blob/master/basic/hangman.bas

#basic #retrocomputing

Am I suddenly working on a procedurally generated game? Maybe!
Anyway, here are some names. For people, planets, or whatever.
#MailStation #TinyBasic
update: It's difficult to remain focused on gamedev when you have to type the entire program back in from scratch every time you want to pick things back up >.>
@psf this is why I couldn’t get anything productive done on a computer before I got a floppy drive

Procedurally generated space game is picking back up on the #TI92 because, unlike the #MailStation, it's possible to save my work on here.

TI-BASIC is, ehm, slow. Eventually I'll snap and port a TinyBasic or Forth over here.

#ticalc

Progress on TI-92+ procedurally generated space game.

There is now an ~800x800 galaxy to explore. Short range scanners reveal a 3x5 region, and the player can jump around by giving warp factors and bearings. There's also an occasional stable wormhole... but you won't know where it leads unless you jump through!

Habitable worlds offer a randomly selected 1 of 26 commodities to trade. This is probably too many choices. After you buy something it's rather difficult to find a planet that sells it. In fact, I haven't been able to turn on fuel consumption yet, because generally you'd lose before finding a viable trade route.

There is no win condition yet. It's purely a grind of mapping and capitalism.

#ticalc #ti92

I'm riiiiich! You definitely have to write stuff down outside the game to figure out good trade routes. I think that's more fun than putting better mapping into the game itself. Makes the universe seem bigger.

I think it's probably ok to turn fuel consumption back on. Might be a little challenging but shouldn't be unwinnable.

Not pictured: Save/load is working, and I've optimized everything to be about 2x-3x faster. So now it's actually playable as a game. A rather grindy game, but a game.

#ti92 #ticalc

@psf i had lots of fun playing Oolite with a pen and paper form for tracking trades/routes. fwiw, the advent of all-digital tools to do the same thing in Elite Dangerous ruined part of the experience, i felt.
@pesco Thanks for that: I'm in the weird situation of writing a Elite-like game without ever having played the originals, so I don't know what design decisions I'm rehashing. Your perspective helps.

@psf happy to help!

fwiw, looking at your photo of the TI-92, it would make a cool external adjunct to a game running on the big rig - as in function like a physical cockpit PDA.

@pesco The props department of the Stargate TV show agrees with you on that one: https://www.youtube.com/watch?v=i8i70NSJfKI
#ti92 #ticalc
A TI-92 lost in space (Stargate)

YouTube
@psf 
@psf looks like he's playing your game on it!
@psf Wow, I don't blame you for being confused. I had to read it five times to get it even with the benefit of your explanation.

@psf

When hex coding for the Atari XL 6502 processor I did exactly the same. Especially when the program needed to be loaded in segments (paging) to prevent running out of space and do a re-code. However with the Macro Assembler that problem loosely, not entirely, got resolved. It was common to fill it with NOP's but I recall using instructions for other coders too. The beautiful time where the ratio Coder/User was about 10:1...

@psf the "GOOD LUCK AND GOOD BYE" feels very genuine
@psf Yeahbut ... patch space IN AN EPROM should be all ones, so that you can apply the patches by blowing the relevant bits to zero WITHOUT having to wait hours for the UV to erase the chip (nobody ever had enough of them).
@psf this is very nice for being a random pixel font
@aqua That may be because it's proportionally spaced! The MailStation doesn't even have a fixed-width font in ROM. Good for readability, bad for ascii art or even lining things up in columns.