Some of you may have noticed one of the random messages along the top has been "Stuart Smith, where are you?" I am, of course, referring to the author of the great Adventure Construction Set and Ali Baba and the Forty Thieves from Quality Software.
One of my small hobbies is locating lost greats from the dawn of the game industry with most of my focus on the Apple II authors. Stuart Smith is one of those lost authors I have yet to find.
One of the earliest and probably first-published titles Stuart worked on was Fracas, a lo-res turn-based RPG that could eat up a LOT of hours. I recently ran the game again and remembered that it was written in Applesoft Basic, a language that I'm very familar with.
While scrolling through the game listing (this is a game from 1980, mind you) I immediately noticed the line:
5 DEF FN RN(I) = INT( RND(1)* I )
and I thought "oh yeah, I never did figure out what the hell that DEF FN keyword was used for." Then I resolved to learn what it actually did so I looked up an Applesoft reference manual and found out.
Wow. I cannot believe I never learned the value of DEF FN and the countless times I could have used it in my games! It's really simple: you are defining a function that you can call without a GOSUB and it can take a parameter. Basically an inline function.....in Applesoft Basic!
Amazing. And to think that I learned this from a game written at the dawn of the PC gaming age.