• Please review our updated Terms and Rules here

RPG in RPG

NeXT

Veteran Member
Joined
Oct 22, 2008
Messages
8,096
Location
Kamloops, BC, Canada
Someone asked this as a joke but I thought about it for a while because most text adventure games will run on anything.

Is there a text-based Role-Playing Game that that was written in the RPG programming language?
 
That's a toughie. BBC, a baseball simulator, was the first text based game back in 1961. If I'm not mistaken, it was first run on an IBM 1620 using the Symbolic Programming System.
 
Given all the games that have been written in languages hostile to that, I would be surprised if there aren't games written in RPG. I can't find a repository of RPG source code to use for confirmation.
 
RPG seems like it was almost entirely used for batch records processing; granted I know nothing about it, but from what I'm reading on it I'm not entirely clear if versions prior to RPG IV could even *do* interactive applications? The short examples I can find of older RPG programs read like recipies for batching SQL queries and applying calculations/transformations to the results. Which I guess maybe could implement an RPG if you created a suitable data structure to pound on? (Presumably you'd punch your moves onto cards and feed them into the hopper at each step; each run of the program would update the back-end data structure to reflect where you were in the maze and how much tax was owed on all the remaining monsters...)
 
Which is, after all, the raison d'être of RPG--a Report Program Generator. I suppose one might be able to code a game in GPSS, if one tried.
 
RPG seems like it was almost entirely used for batch records processing; granted I know nothing about it, but from what I'm reading on it I'm not entirely clear if versions prior to RPG IV could even *do* interactive applications?
Well, as long as there's a method for persistent storage of data across program instances, any language can be interactive. Players simply enter their next action(s) on punch cards, drop them off at the computing center, and come by the next morning to retrieve the "DM's" response. Granted, it lacks the immediacy of rolling dice, but on the bright side it obviates the need to arrange sessions around the entire group's schedule ;)
 
Well, as long as there's a method for persistent storage of data across program instances,
RPG seems like it was almost entirely used for batch records processing;
Funny thing, sorta related, back in the day my friend played Lunar Lander.

The detail was that he was playing it on the RJE (Remote Job Entry) station with a card deck.

He'd run the program, look at the printout, add a new "burn card" to the data input, and run it again.

I think after a box of paper he managed to land the thing. Ah, university!

Similarly, I remember a guy playing Adventure, I guess the 300 point version. He had the "solution", so he turned on the terminal printer, and played through the game, capturing the entire playthrough.

So, you can see a scenario where someone just keeps adding instructions and re-running the game over and over until you get to a solution. How someone could have a card deck showing how to "win" Adventure.

I'd just add a "seed" card at the top to set up the random number generator so you get the same results as you go forward.
 
So, you can see a scenario where someone just keeps adding instructions and re-running the game over and over until you get to a solution. How someone could have a card deck showing how to "win" Adventure.
It was easier if you had the source, particularly the travel tables. :)
 
There's plenty of interactive work done in RPG.

RPG has something called "The Cycle": an RPG program is, unless The Cycle is explicitly disabled, enclosed in an implicit do-until loop on a built-in boolean variable ("indicator" in RPG parlance) called LR ("Last Record"). If the program has a designated "primary file," then that file is implicitly read, and LR is raised when the program reaches the last record in that file. Thus, instead of walking through this primary file, it "rides" The Cycle.

But if you don't have a primary file, you can use The Cycle for other things. In an interactive program driven by function key events at a terminal, you can arrange for LR to be raised when the user requests an exit (traditionally by pressing F3, the CUA standard for exit).

I've written recursive-descent parsers in modern RPG, and I've written event-driven interactive programs in the language (using The Cycle as my event loop). So there's no technical reason you couldn't write a role-playing game, or any other kind of game, in RPG.
 
No; in modern ILE RPG. Ignoring the dubious but inexplicably popular "enhancements" that make RPG look like either PL/I or one of the QBASICs, instead of like RPG.
 
Not very well, actually: ILE ("Integrated Language Environment," which allows for static linkage of multiple modules, not necessarily in the same source language) RPG uses a 100-column line length. The last RPG version that I'm aware of, that used 80-column source lines, was the last OPM ("Original Program Model," which does not permit multiple modules to be statically linked) RPG version for IBM Midrange boxes.
 
Last time I played with RPG was on a 360/40. I do recall that it was pretty big for those emigrating from unit-record operations. You could produce reams of reports that nobody read.
 
I do recall that it was pretty big for those emigrating from unit-record operations.
No accident there. RPG's syntax was designed to be intuitive to anybody familiar with plugboard-programmable unit record machines. That's why, from the S/3 on, it was the primary HLL for IBM Midrange systems.

IBM Rochester was, back in the 1960s, where IBM built unit record machines, not computers. The Rochester people wanted to transition to building computers, but the IBM brass didn't want them competing with the S/360. So they ordered the Rochester people to come up with a better unit record machine. The S/3 was the result, and they chose RPG because it would be instantly understandable to "the mailroom kid who taught himself how to wire a plugboard." And through the S/32, S/34, S/38, S/36, AS/400, all the way up to whatever IBM is calling its Midrange Systems this week, RPG has been a constant, but not a static one by any means.
 
Funny story from back then. I had a friend who worked for one of the Chicago area manufacturers who was using unit-record equipment for their operation and were quite profitable. The CEO attended an event sponsored by IBM where he was talked into leasing a Model 20 complete with MFCM and 2203 to supposedly "replace" the UR operation. He bit, probably because he had his ego massaged and hired two more people to handle the transition.

The transition was made, but the people that he'd hired for that stage turned out to be needed permanently. To be fair, every morning, he was presented with a nice thick report on 14" greenbar--that he never read. The cost of the whole affair, as you well might imagine, was substantially more than the old UR setup, and, given the nature of the operations, really offered no substantial benefit, other than the vanity one.

The CEO attended an IBM sales bash, not as a current IBM customer, but as an un-automated interested prospect. The marketing engineer that he talked to said something to the effect of "it sounds like your operation is the perfect candidate for a unit record operation".

The next week, the Model 20, card mulcher and printer were gone.
 
Back
Top