Text Adventure Creator Program - was there one?

Looking for a Dragon or CoCo game not already in the archive - Then request it here and hopefully it will either be uploaded to the archive or another member can upload it to this forum.
Commodore
Posts: 125
Joined: Thu Nov 20, 2014 1:37 am
Location: UK

Re: Text Adventure Creator Program - was there one?

Post by Commodore »

Loving the idea of that Lantern program Bosco, thank you. I shall certainly make soem time to look at that properly soon.

So in a nutshell, I can write an adventure on my Laptop and then save it to an SD card, and then load it onto my 8 Bit computers?
johnha
Posts: 20
Joined: Sun Feb 17, 2013 8:20 pm

Re: Text Adventure Creator Program - was there one?

Post by johnha »

I've skimmed this thread and found it really interesting and useful - thanks especially to snarkhunter's description of how to use arrays. Back in the day I had an adventure from the CoCo that (memory fades...) I had problems loading in on a Dragon 32.

During my attic find I also found a BASIC printout of Flipper (Othello/Reversi clone). I've always been intrigued with the AI needed for a game like that - when I get a chance I might try to analyse it. The computer AI was pretty good - it beat my handheld Othello computer back in the day.

Thanks for such an interesting thread.

John.
User avatar
Bosco
Posts: 304
Joined: Tue Mar 04, 2014 11:49 pm
Location: Nottingham, UK

Re: Text Adventure Creator Program - was there one?

Post by Bosco »

@Commodore I've not used Lantern myself but, yes, my understanding is you can create your own adventure games on a Windows, Mac or Linux machine and kick out binaries for a variety of targets including 8-bit computers.

I'm guessing the CoCo output should run on the Dragon but obviously the keyboard matrix is a little different so depending on how he's reading the keyboard, there may be a few issues. Given the number of supported platforms, Evan may even be prepared to add Dragon support (if needed) if there's sufficient interest.

Evan's CoCoFEST Lantern demonstration provides a good overview of the authoring process but sadly I can't find it on YouTube.
User avatar
robcfg
Posts: 1350
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden

Re: Text Adventure Creator Program - was there one?

Post by robcfg »

I tried to use Lantern but it doesn’t work on a 64 bit machine nor in XP under VirtualBox.

On top of that it’s closed source so there’s no way to help.

That’s it for me.
Commodore
Posts: 125
Joined: Thu Nov 20, 2014 1:37 am
Location: UK

Re: Text Adventure Creator Program - was there one?

Post by Commodore »

That's a shame. I do have a Windows XP laptop still in my loft, but the virus protection would well out of date, so I'd be reluctant to go online with it.
Shame.
Maybe my son's Raspberry Pi.
Commodore
Posts: 125
Joined: Thu Nov 20, 2014 1:37 am
Location: UK

Re: Text Adventure Creator Program - was there one?

Post by Commodore »

johnha wrote: Fri Dec 04, 2020 12:58 pm I've skimmed this thread and found it really interesting and useful - thanks especially to snarkhunter's description of how to use arrays. Back in the day I had an adventure from the CoCo that (memory fades...) I had problems loading in on a Dragon 32.

During my attic find I also found a BASIC printout of Flipper (Othello/Reversi clone). I've always been intrigued with the AI needed for a game like that - when I get a chance I might try to analyse it. The computer AI was pretty good - it beat my handheld Othello computer back in the day.

Thanks for such an interesting thread.

John.
Glad you liked it. It has been interesting, you're right. It will be good if I can get the Lantern working on a Raspberry Pi.
Commodore
Posts: 125
Joined: Thu Nov 20, 2014 1:37 am
Location: UK

Re: Text Adventure Creator Program - was there one?

Post by Commodore »

Bosco wrote: Fri Dec 04, 2020 2:55 pm @Commodore I've not used Lantern myself but, yes, my understanding is you can create your own adventure games on a Windows, Mac or Linux machine and kick out binaries for a variety of targets including 8-bit computers.

I'm guessing the CoCo output should run on the Dragon but obviously the keyboard matrix is a little different so depending on how he's reading the keyboard, there may be a few issues. Given the number of supported platforms, Evan may even be prepared to add Dragon support (if needed) if there's sufficient interest.

Evan's CoCoFEST Lantern demonstration provides a good overview of the authoring process but sadly I can't find it on YouTube.
I'll probably try it, even though robcfg says it doesn't work on a 64 bit machine, or even on XP. If it can work on a windows PC it would be preferable than using a Raspberry Pi.
User avatar
snarkhunter
Posts: 239
Joined: Fri Apr 03, 2009 7:16 pm
Location: France

Re: Text Adventure Creator Program - was there one?

Post by snarkhunter »

johnha wrote: Fri Dec 04, 2020 12:58 pm During my attic find I also found a BASIC printout of Flipper (Othello/Reversi clone). I've always been intrigued with the AI needed for a game like that - when I get a chance I might try to analyse it. The computer AI was pretty good - it beat my handheld Othello computer back in the day.
Hello John,

The AI behind most board games was quite "straightforward" and basically consisted in calculating a rating for each available move or position, then selecting the one with the highest mark or discarding the ones with the weakest ratings.

This was especially true for such games as Othello/Reversi, Tic-Tac-Toe, etc. Of course, more complex games such as Chess or Checkers (not to mention Go) involved much more advanced strategy and programming.
Last edited by snarkhunter on Mon Dec 07, 2020 12:22 pm, edited 1 time in total.
User avatar
snarkhunter
Posts: 239
Joined: Fri Apr 03, 2009 7:16 pm
Location: France

Re: Text Adventure Creator Program - was there one?

Post by snarkhunter »

"How to manage objects in an adventure game written in BASIC?"

Once again, this is achieved through arrays.

Say your game has:
. 99 locations (variable LO=99)
. 50 objects (variable IT=50)

You would need 3 arrays to store the needed information for all your objects:
. array IL for the location item: DIM IL(52) ; I'll explain why it's not 50 later on
. array ID$ for the description of each item: DIM ID$(50); "ID" for "item Description"
. array LD$ for the description of each Location: DIM LD$(99); "LD" for "Location Description"
. another array for the "map" of the game, which needs as many dimensions as there are standard directions (might be 4, 6, 10 or whatever is required by the context)
Say we'll use 6 directions: DIM MA(99,99,99,99,99,99); "MA" for "Map", and 99 because LO=99!

Whenever the player enters any Location, a simple loop may be used to display the available Objects.

Say variable CL holds the current Location (ie. a figure in the 1-99 range):
PRINT "YOU ARE";LD$(CL)
PRINT"YOU CAN SEE:"
FOR I=1 TO IT
IF IL(I)=CL THEN PRINT ID$(I)
NEXT

Now, there's a special and very important in-game command which is "INVENTORY" (or "TAKE INVENTORY"): It lists the items the player is carrying.
PRINT "YOU HAVE:"
FOR I=1 TO LO
IF IL(I)=51 THEN PRINT ID$(I)
NEXT

… Thus, we have defined that the "Location" for an inventory item (something you are carrying) will be 51. The Player is the pseudo-Location for any possible objects.

And when TAKEing objects in the game (those that may actually be picked up), you'll have to make sure (another variable needed here) you're not already carrying the maximum number of objects allowed. If so, then you will be sending an error message such as "YOU ARE ALREADY CARRYING TOO MUCH. DROP SOMETHING FIRST.".

And if it is possible to TAKE that Object, then the Location (in the IL array) will change from that of the Current Location (CL) to that for the Player (=51).

But we have 50 Locations + the Player's Location, and yet our IL array was set up to 52. How come?!
… This is because Not all Objects are visible at a given time, or some may disappear (after being used or combined, for instance).
Well, such Objects will just have to be sent to Location 52. Since there is no such thing as a physical Location 52 in the game, anything that is set to that Location will just become "invisible".

[Edit]
… Just thought the hidden Objects could also be stored in fake Location 0: There is no such entry in an array, so it could be used as much as fake Location 52. This would only require an array with dimension 51 instead of 52 - a few more bytes saved!

It's as easy as A-B-C!

[Edit]
… And I would like to express a sincere apology for kind of hijacking this thread with programming stuff that might be a bit out of place here.
Last edited by snarkhunter on Thu Jan 14, 2021 2:04 pm, edited 2 times in total.
johnha
Posts: 20
Joined: Sun Feb 17, 2013 8:20 pm

Re: Text Adventure Creator Program - was there one?

Post by johnha »

snarkhunter wrote: Mon Dec 07, 2020 11:29 am . another array for the "map" of the game, which needs as many dimensions as there are standard directions (might be 4, 6, 10 or whatever is required by the context)
Say we'll use 6 directions: DIM MA(99,99,99,99,99,99); "MA" for "Map", and 99 because LO=99!
This is presumably how the 'hex' based strategy games work (e.g. Kriegspiel) for movement across various terrain - something that I'd wondered about recently.
snarkhunter wrote: Mon Dec 07, 2020 11:29 am[Edit]
… And I would like to express a sincere apology for kind of hijacking this thread with programming stuff that might be a bit out of place here.
Fascinating insight (and so obvious one you've thought about it).
Post Reply