CPCWiki forum

General Category => Games => Topic started by: enteka on 09:52, 31 May 21

Title: The XIII Emperor Gamebook - Updates (edited title)
Post by: enteka on 09:52, 31 May 21
Two weeks ago, I re-discovered the Amstrad of my early teens, via the RVM emulator and the Profesor Retroman youtube channel.
Anyway, I've began developing on Locomotive Basic, a small gamebook cyoa/ Fighting Fiction style (more like something in between) sort-of engine.
And I'm in a bit of crossroads. Should I make it into a "real" game? That's tons of work, mostly writing and organizing, as the main code is pretty much done. I would love to, however, it will only make sense if there are people who would play it.
So, what do you think about my wee project?
Title: Re: Gamebook
Post by: manossg on 10:25, 31 May 21
Quote from: enteka on 09:52, 31 May 21
Two weeks ago, I re-discovered the Amstrad of my early teens, via the RVM emulator and the Profesor Retroman youtube channel.
Anyway, I've began developing on Locomotive Basic, a small gamebook cyoa/ Fighting Fiction style (more like something in between) sort-of engine.
And I'm in a bit of crossroads. Should I make it into a "real" game? That's tons of work, mostly writing and organizing, as the main code is pretty much done. I would love to, however, it will only make sense if there are people who would play it.
So, what do you think about my wee project?


Hello, mate, and welcome again to the beautiful world of the Amstrad.


I am interested in such games and, for one, would definitely like to play your game. Also, if you require any kind of help, feel free to ask, lots of helpful individuals here.


PS. enteka=from greek?
Title: Re: Gamebook
Post by: Gryzor on 10:36, 31 May 21
Ah just as I thought another g(r)eek joined us... :)

Welcome mate!

Not sure how a computerised CYOA game would work? I thought CYOA books were the printed equivalent of adventure games? Not sure what "Fighting Fiction" is though...


PS talking about formats, early to mid nineties I played a X-Files CYOA on CD, that was fun!
Title: Re: Gamebook
Post by: enteka on 11:10, 31 May 21
Quote from: manossg on 10:25, 31 May 21

Hello, mate, and welcome again to the beautiful world of the Amstrad.


I am interested in such games and, for one, would definitely like to play your game. Also, if you require any kind of help, feel free to ask, lots of helpful individuals here.


PS. enteka=from greek?
Thank you very much. I will need help with my English which tends to fumble when I'm tired, and in a later version I'll probably be adding graphics and or music. And I'm a total loss at music, just I ken nothing about it.

enteka, yes, from Greek.  :) I needed a short url so it was my 11th attempt and thus -> enteka.xyz it's also my Gopher and Gemini pages
Title: Re: Gamebook
Post by: enteka on 11:13, 31 May 21
Quote from: Gryzor on 10:36, 31 May 21
Ah just as I thought another g(r)eek joined us... :)

Welcome mate!

Not sure how a computerised CYOA game would work? I thought CYOA books were the printed equivalent of adventure games? Not sure what "Fighting Fiction" is though...


PS talking about formats, early to mid nineties I played a X-Files CYOA on CD, that was fun!
I think CYOA , Adventure Games and Roleplaying games all more or less developed at roughly the same era.
A FF gamebook is ... think CYOA with dice. Whenever it's not in the clear what would happen, you roll and test for some of your character abilities, then if you fail the roll go to section 12 and if you succeed you go to section such and such, or lose hit points, or whateverSome can get way more complex than that, but that's the TLDR version
Title: Re: Gamebook
Post by: Gryzor on 11:37, 31 May 21
Ah dice, I played a few such games back in the day - didn't realise they were a different category! Nice!!

Damn, I wish it was summer '89 for a little while.
Title: Re: Gamebook
Post by: andycadley on 11:45, 31 May 21
I remember playing the Spectrum version of one of those FF games back in the day (Forest of Doom IIRC) and it was pretty cool. At lot harder to cheat than it was with the book version though.  :laugh:
Title: Re: Gamebook
Post by: manossg on 13:41, 31 May 21
Quote from: enteka on 11:10, 31 May 21
Thank you very much. I will need help with my English which tends to fumble when I'm tired, and in a later version I'll probably be adding graphics and or music. And I'm a total loss at music, just I ken nothing about it.

enteka, yes, from Greek.  :) I needed a short url so it was my 11th attempt and thus -> enteka.xyz it's also my Gopher and Gemini pages


Cool, καλώς όρισες, συναμστραντόπληκτε!


I can help with proofreading (although I'd recommend finding a native English speaker) and I can certainly help with music! :D


We released with my mate @skylas (https://www.cpcwiki.eu/forum/index.php?action=profile;u=2543) a text adventure a few days back, also made in Basic, so you can check it out.


https://www.cpcwiki.eu/forum/games/budrumi!-new-text-adventure-game!/msg202553/#msg202553 (https://www.cpcwiki.eu/forum/games/budrumi!-new-text-adventure-game!/msg202553/#msg202553)
Title: Re: Gamebook
Post by: skylas on 15:00, 31 May 21
Quote from: enteka on 09:52, 31 May 21
Two weeks ago, I re-discovered the Amstrad of my early teens, via the RVM emulator and the Profesor Retroman youtube channel.
Anyway, I've began developing on Locomotive Basic, a small gamebook cyoa/ Fighting Fiction style (more like something in between) sort-of engine.
And I'm in a bit of crossroads. Should I make it into a "real" game? That's tons of work, mostly writing and organizing, as the main code is pretty much done. I would love to, however, it will only make sense if there are people who would play it.
So, what do you think about my wee project?
Welcome! Feel free to ask anything you want, and good luck with the project!

As I had the same thoughts when I started dealing with Amstrad again, I can assure you that there many that would try your game.
Just needs a bit more time for posting in appropriate groups, forums etc, so that many people get aware of it.

I can also recommend @manossg (https://www.cpcwiki.eu/forum/index.php?action=profile;u=3713)  for music, as he makes an excellent work in my opinion. You just have to learn to load AKG files from Arkos Tracker.
Title: Re: Gamebook
Post by: eto on 15:45, 31 May 21
So, the same happened to me in early 2020. I followed the CPC scene again for some time again and one post on Facebook inspired me to try something in Locomotive Basic. And this caused a whole lot of events to happen, buying a CPC6128, later a 6128 Plus, modifying a broken GT65 with a TFT display and a GBS8200, trying to find "the perfect gamepad/joystick", etc etc. But I think the most important thing was to write my first ever CPC game - fully in Basic.

Crucial (imho) was, that I did it for me. Of course it was great to release it then, but I wanted to do it for myself. It had to be in a way that I want to play it. And I finally even added everything to have my own physical release of it, including a booklet with instructions and a (very very) short story that introduces the game.

And just recently I started to learn Assembler and right now I am replacing the "slow" parts of my game with machine code routines and will eventually release the "plus" or "2.0" edition. Maybe including an online Highscore table if I manage to do that with the M4 or Usifac II... let's see... just an idea, no fixed plan yet...

I don't know if anyone plays it currently or not. Or will play the "plus" edition. I am doing it for myself and then let's see if anyone else also enjoys it.

tl;dr: if you enjoy making this, then just do it.
Title: Re: Gamebook
Post by: Animalgril987 on 17:24, 31 May 21
Hi @eto (https://www.cpcwiki.eu/forum/index.php?action=profile;u=3625).
What's your game? I will try it out. ;D


@enteka (https://www.cpcwiki.eu/forum/index.php?action=profile;u=4285). Welcome to the forums. We will all look forward to your game, if yo release it  :D
Title: Re: Gamebook
Post by: eto on 17:43, 31 May 21
Quote from: Animalgril987 on 17:24, 31 May 21What's your game? I will try it out.

https://www.cpcwiki.eu/forum/games/new-game-cameronne/
Title: Re: Gamebook
Post by: MiguelSky on 17:59, 31 May 21
Quote from: andycadley on 11:45, 31 May 21
I remember playing the Spectrum version of one of those FF games back in the day (Forest of Doom IIRC) and it was pretty cool. At lot harder to cheat than it was with the book version though.  :laugh:
I loved this on paper. Some years ago, a version for nowaday devices was also released,
Title: Re: Gamebook
Post by: enteka on 22:22, 31 May 21
Wow, that was some input. Sorry not to answer, I've been busy kayaking and programing
Title: Re: Gamebook
Post by: enteka on 22:23, 31 May 21
Quote from: MiguelSky on 17:59, 31 May 21
I loved this on paper. Some years ago, a version for nowaday devices was also released,
If you are still interested, you might want to check a Spanish YT channel called "librojuegos" revieweng new and classic gamebooks
Title: Re: Gamebook
Post by: enteka on 22:25, 31 May 21
Quote from: Animalgril987 on 17:24, 31 May 21
@enteka (https://www.cpcwiki.eu/forum/index.php?action=profile;u=4285). Welcome to the forums. We will all look forward to your game, if yo release it  :D
I intend to :), it will take time, and a lot of it, as it's still writing a book in a foreing language and then programming.Still, my idea is to realease it in small chunks
Title: Re: Gamebook
Post by: enteka on 22:38, 31 May 21
Quote from: eto on 15:45, 31 May 21
tl;dr: if you enjoy making this, then just do it.
Oh yes, it's that I'm also a paddler, a surfski paddler, and I need waves! and wind! and a paddle! So I have to balance things out
https://www.youtube.com/watch?v=iWQIBY8ilc0
Title: Re: Gamebook
Post by: enteka on 22:41, 31 May 21
Quote from: skylas on 15:00, 31 May 21
Welcome! Feel free to ask anything you want, and good luck with the project!

As I had the same thoughts when I started dealing with Amstrad again, I can assure you that there many that would try your game.
Just needs a bit more time for posting in appropriate groups, forums etc, so that many people get aware of it.

I can also recommend @manossg (https://www.cpcwiki.eu/forum/index.php?action=profile;u=3713)  for music, as he makes an excellent work in my opinion. You just have to learn to load AKG files from Arkos Tracker.
Thanks for the advice. and the encouragement
Title: Re: Gamebook
Post by: enteka on 22:45, 31 May 21
Quote from: manossg on 13:41, 31 May 21

https://www.cpcwiki.eu/forum/games/budrumi!-new-text-adventure-game!/msg202553/#msg202553 (https://www.cpcwiki.eu/forum/games/budrumi!-new-text-adventure-game!/msg202553/#msg202553)
Exciting!
Title: Re: Gamebook
Post by: enteka on 22:48, 31 May 21
Quote from: Gryzor on 11:37, 31 May 21
Ah dice, I played a few such games back in the day - didn't realise they were a different category! Nice!!

Damn, I wish it was summer '89 for a little while.
Ah, well, sometimes I think there are mone categories than gamebooks :)
Title: Re: Gamebook
Post by: Animalgril987 on 23:37, 01 June 21
Quote from: enteka on 22:22, 31 May 21I've been busy kayaking and programing
At the same time?! :D
Title: Re: Gamebook
Post by: enteka on 09:33, 02 June 21
Quote from: Animalgril987 on 23:37, 01 June 21
At the same time?! :D
Yes  8)
Title: Re: Gamebook
Post by: enteka on 23:25, 03 June 21
Progress report
OK, so I have setted it up for a very simple Engine.
It first creates the character. It asks for your character name and age, with age working as a dificulty level, the younger the harder... usually
Then it generates the STATS, aka the attributes These are
KNWOLEDGE, PERCEPTION, GRACE, SKILL, STRENGTH, HIT POINTS

Each to be used to test the character ability to accomplish a given task

Once the game starts, the basic loop would go as follows

1. Check for ENDGAME
2. if ENDGAME load "you are dead" text and so on ELSE go on
3. load next "paragraph" aka section
4. Each "paragraph" file has the following structure
i) a one line code for any "special consequences" or "effect" (like, let's say your character loses this many hit points)
ii) the text of the paragraph, divided into lines
iii) the choices available for the player, one per line, using a very simple comma separated values structure
stat to be tested , target number or difficulty , new paragraph if successful, new paragraph if fail

5. The computer will process any special effects (maybe check for endgame here)
6. Display the text
7. Wait for player commands
8. process that command



10 ' The XIII Emperor a gamebook for the Amstrad CPC
20 ' By Miguel de Luis Espinosa
30 ' See README.TXT for license and notes
40 DEF FNdice(x) = ROUND(RND(1)*(x-1))+1
50 DEF FNustr$(x%) = MID$(STR$(x%),2) 'unsigned str$
60 DIM scores%(6,2) : DIM flags%(20)
70 DIM p$(20)
80 filename$ = "1.txt"  ' starting paragraph filename
90 FOR i = 1 TO 6 : scores%(i,1) = FNdice(3) + FNdice(3) : NEXT
100 DIM scoreNames$(6)
110 FOR i=1 TO 6 : READ scoreNames$(i) : NEXT : DATA KNWOLEDGE, PERCEPTION, GRACE, SKILL, STRENGTH, HIT POINTS
120 GOSUB 240
130 scores%(1,1) = scores%(1,1) + (age%-12)\3 ' KNW
140 scores%(2,1) = scores%(2,1) + FNdice(3) ' PER
150 scores%(3,1) = scores%(3,1) + (21-age%)\2 'GRACE
160 scores%(4,1) = scores%(4,1) + FNdice(3) 'SKL
170 scores%(5,1) = scores%(5,1) + (age%-18)\3 'STR
180 scores%(6,1) = scores%(6,1) + scores%(5,1) + (age%\2) ' HP = dice + str + age\2
190 FOR i% = 1 TO 6 : IF scores%(i%,1) < 4 THEN scores%(i%,1) = 4 : NEXT i%
200 FOR i% = 1 TO 6 : scores%(i%,2) = scores%(i%,1) : NEXT ' Current score=Initial
210 GOSUB 320
220 END
230 ' SUBRUTINES ---------------------------------------------
240 ' START GAME
250 CLS : MODE 2
260 PRINT "Choose your name"
270 INPUT "> ", name$
280 PRINT "Your age, 13 to 21"
290 INPUT "> ", age%
300 IF age% < 13 OR age% > 21 THEN LOCATE 1, VPOS(#0) : GOTO 290
310 RETURN
320 ' DISPLAY CHARACTER SHEET ------------------------------------
330 CLS: PRINT name$
340 PRINT FNustr$(age%) " years old." : PRINT
350 FOR ik=1 TO 6
360 PRINT scoreNames$(ik);
370 PRINT , FNustr$(scores%(ik,1)) "/" FNustr$(scores%(ik,2))
380 NEXT ik
390 PRINT : PRINT ">>> Any key to continue <<<
400 akey$ = INKEY$ : IF akey$ = "" GOTO 400
410 RETURN
420 ' read file
430 CLS
440 DIM p$(20)
450 FOR i%=1 TO 20 : p$(i%) = "" : NEXT ' resets paragraph
460 OPENIN "1.txt" 'filename$
470 INPUT #9, effect%
480 REM call effect process subrutine
490 wi% = 1 : WHILE a$ <> "---" AND NOT EOF
500 INPUT #9, a$
510 IF a$ = "---" THEN p$(wi%) = "" ELSE p$(wi%) = a$
520 wi% = wi% + 1
530 WEND
540 ' read choices
550 CLOSEIN  'filename$
560 Return

And this a "paragraph aka section" file, just a stab really

1
"The XIII Emperor"
""
"The children of Samar have this story: it wasn't the XIII Emperor who"
"saved the city from the Red Horde, but one of their own, a slave boy."
"Yet, who could believe such a thing?"
"---"
0,0,2,2
"---"

Code 0,0,2,2 means 0 test nothing, 0 difficuty 0, 2 go to section 2 if succesful go  to section 2 if fail
Title: Re: Gamebook
Post by: Animalgril987 on 16:50, 04 June 21
Quote from: enteka on 23:25, 03 June 21level, the younger the harder... usually
Should be on super-easy for me, then :D :D
Title: Re: Gamebook
Post by: enteka on 09:16, 06 June 21
Quote from: Animalgril987 on 16:50, 04 June 21
Should be on super-easy for me, then :D :D
We shall see, we shall see :)
Title: Re: The XIII Emperor Gamebook - Updates (edited title)
Post by: enteka on 11:56, 06 June 21
Just added the hypertext feature (no, it's not point and click with a mouse on a link, but inputting the number associated to the link), as it's done in Gopher and Gemini (I mean the protocols)
Title: Re: The XIII Emperor Gamebook - Updates (edited title)
Post by: enteka on 16:38, 13 June 21
New update. Well, it's being a bumpy ride, mostly with the limitations that 64kb and AMSDOS imposes, namely two of them
1) It only allows for 64 or so files per disk2) The program practial limit of 30-40kb
Text is heavy, bytewise,so after consulting with the friendly people at the Programming sub-forum (fora?) this is what I have come up with
a) The gamebook will be released in parts. That has also the adventage of having feedback and knowning when to stop.
b) Texts that are to be displayed less often will be stored on files, while text that is most likely to be displayed will be hard coded on the program. While not being very systematic that helps with having the whole game in a single disk/tape and still keep the main program in small bits.c) The flags array is now a stringd) Comments, remarks and so on have been mostly taken to an auxiliary readme file
Title: I think I have it now
Post by: enteka on 17:18, 19 June 21
Just tested a partial implementaion of the game and it's all working, well enough. Errors seem know to arise from  badly formated files and other data, the logic is not yet robust but it works
Main program file size is about 11K now, but 25% of the game is done and the new sections of the gamebook take less and less space (as most of the text is on seperate files)
Also, I'm probably not doing a version for tape as I cannot see how I could make that not to freaking slow
Title: Re: The XIII Emperor Gamebook - Updates (edited title)
Post by: Animalgril987 on 09:32, 20 June 21
Looking forward to the finished article :D
Title: Re: The XIII Emperor Gamebook - Updates (edited title)
Post by: enteka on 23:21, 27 June 21
Something funny happened here. Please, disregard :)
Title: Re: The XIII Emperor Gamebook - Updates (edited title)
Post by: enteka on 23:25, 27 June 21
I have re-worked the whole thing from the ground up.

The TLDR

Refresher:

a gamebook is an interactive book that you play by choosing links of some sort (like turn to page... ) and (sometimes) rolling dice and checking your character sheet.

Limitations of the Amstrad 464 means I can't simply load a beast of a text and hope for our electronic hero to cope with all that just with 64K

Also, as reading from files, even from disks, takes noticeable time on an Amstrad, I cannot turn each section (or page/paragraph) into a single file.

Instead, I'm bundling them into "chapters".

Once the player has cleared a full chapter, the computer will load a full chapter into a buffer (an array string, with each item containing a line)To make things simpler each chapter has but one entry point (i.e, you begin at "page 1" of each chapter)So that limits the number of files used and reading operations, while still avoiding to overflow the memory.

Now the project has these files:

1. X.BAS  with the code 6.4K at this point

2. CH1.TXT, CH2.TXT etc about 7K each

3. README.TXTThe CH1.TXT are the "chapter" files, bundling together, in simple plain text, the , well, text of several sections

The README is now serving me as a replacement for REM statements, to keep the file size small. So I have the definition of variables, where the subroutines are and what they do, same for functions, and the bit of logic for each section. Kinda useful, really.The algorythmAfter the initial stuff is done (getting input from the player like age and name of the character)...

1. "Cros" (that was the nickname I gave my Amstrad back in the day) read a whole "chapter" from disk, each line going to the bfr$() array 
It goes like: (it's patronizing, I know, but I used to be a newbie and there's the odd chance somebody could benefit, so bear with me )


1065 chSize%=138:cfile$="CH1":GOSUB 100


That is to mean. Cross, my  new "chapter" is 138 lines long, its filename starts with CH1. Now, be a nice friend and gosub 100, where the instructions to read and process the chapter are.


100'Load buffer
105 ERASE bfr$:DIM bfr$(chSize%)
110 OPENIN cfile$+".TXT"
115 FOR li%=1 TO chSize%
120    LINE INPUT #9, bfr$(li%)
125 NEXT
130 CLOSEIN
135 RETURN


Which is to mean, Cross, erase the bfr$() we had earlier, please. I don't want that text any longer for we are going to use a new one.And this new bfr$() will be as long as the lenght of the chapter I told you beforeThen, Cross open the file for me, read each line into an element of bfr$()Once you are done, close the file so no garbage enters it and return to the line you came from


1070'S1.1
1075 bop%=1:eop%=14:GOSUB 400
1080 GOSUB 440


Now that's Cross my section (aka paragraph) begins at line 1 and ends at line 14. (These are numbers I have to double check, and I'd rather do it like this than with some DATA statement, though this might change in the final version).

Then gosub 400 telling you to process each line, like making substitutions in the text. A * is substitued with the name the player chose for the character, a line containing nothing but ))) becomes "Your options" and so forthFinally a GOSUB 440 it's a simple "Any key to continue", This is used when the player is just asked to "turn the page", making no choices.

The code is a bit more complex than that for when the player can make a choice.

1 'The XIII Emperor a gamebook 'By Miguel de Luis See README.TXT
10 DEF FNdice(x%)=ROUND(RND(1)*(x%-1))+1
15 DEF FNtwoD3=FNdice(3)+FNdice(3) 'Ranges 2 to 6
17 DEF FNfourD3=FNtwoD3+FNtwoD3 'Ranges from 4 to 12
20 DEF FNustr$(x%)=STRING$(MAX(0,1 -(x%\10)),"0")+MID$(STR$(x%),2)
25 DEF FNshwStats$(x%,y%)=FNustr$(x%)+"/"+FNustr$(y%)
29'
30 DIM bfr$(1) 'bufferText
40 raw$="":name$="": 'rawInputFromPlayer
45 RANDOMIZE(TIME)
90 GOTO 1000 'startGame
99'
100'Load buffer
105 ERASE bfr$:DIM bfr$(chSize%)
110 OPENIN cfile$+".TXT"
115 FOR li%=1 TO chSize%
120    LINE INPUT #9, bfr$(li%)
125 NEXT
130 CLOSEIN
135 RETURN
149'
150'Display Text
155 FOR tIndex%=bop% to eop%
160    ltp$=bfr$(tIndex%):tabs%=5
162    GOSUB 'standard headings
165    IF MID$(ltp$,1,1)="\" THEN GOSUB 200 'centerLine
170    GOSUB 280 'replaceName
175    PRINT TAB(tabs%) ltp$
180 NEXT tIndex%
185 RETURN
199'
200'CenterLine
205 ltp$=MID$(ltp$,2)+CHR$(10):tabs%=(80 - LEN(ltp$))\2
210 RETURN
219'
220'getName
225 PRINT:INPUT "     > ", raw$
230 IF LEN(raw$) > 7 OR LEN(raw$) < 2 THEN GOSUB 250 ELSE GOTO 240
235 GOTO 225
240 name$=UPPER$(LEFT$(raw$,1))+LOWER$(MID$(raw$,2)):raw$="":PRINT
245 RETURN
249 '
250 'Clean4Reinput
255 PRINT CHR$(7);
260 LOCATE 1, VPOS(#0)-1
265 PRINT TAB(80)
270 LOCATE 1, VPOS(#0)
275 RETURN
279 '
280 'Replace Name
285 sI%=INSTR(ltp$,"*")
290 WHILE sI% <> 0
295    ltp$=LEFT$(ltp$, sI%-1)+name$+MID$(ltp$, sI%+1)
300    sI%=INSTR(ltp$,"*")
305 WEND
310 RETURN
329 '
330 'getAge
335 PRINT:INPUT "     > ", raw$
340 IF VAL(raw$) > 17 OR VAL(raw$) < 13 THEN GOSUB 250 ELSE GOTO 350
345 GOTO 335
350 age%=VAL(raw$):raw$="":PRINT
355 RETURN
359'
360'Generate Scores
365 knw%=MAX(6,FNtwoD3+(age%-10)\2):cknw%=knw%
370 per%=MAX(6,FNtwoD3+FNdice(3)):cper%=per%
375 grc%=MAX(6,FNtwoD3+(19-age%)\2):cgrc%=grc%
380 skl%=MAX(7,FNtwoD3+FNdice(3)):cskl%=skl%
385 htp%=FNtwoD3+age%:chtp%=htp%
387 rptn%=10
390 RETURN
399'
400'StartNewSection
405 'GOSUB 31900' Check for death
410 CLS:LOCATE 1,25 ' Print Status Line
415 ltp$= name$+","+FNustr$(age%)+" y/o"+" KNW "+FNshwStats$(knw%,cknw%)+" PER "+FNshwStats$(per%,cper%)+" GRC "+FNshwStats$(grc%,cgrc%)+" SKL "+FNshwStats$(skl%,cskl%)+" HTP "+FNshwStats$(htp%,chtp%)
420 PRINT TAB((80 - LEN(ltp$))\2) ltp$
425 LOCATE 1,1:GOSUB 150'displayText
430 RETURN
439'
440'AnyKey2continue
445 PRINT : PRINT TAB(25) ">>> Any key to continue <<<":CALL &BB18
450 RETURN
459'
460'GetPlayerChoice
465 raw$=INKEY$ : IF raw$="" GOTO 465
470 IF INSTR("12", raw$) <> 0 GOTO 495 
475 LOCATE 1,24
480 PRINT TAB(20) "Choices Available: 1 or 2";
485 GOTO 465
495 chc$=raw$ : raw$=""
500 RETURN
509'
510'theEnd
515 END
599'
600'Standard Headings
610 IF ltp$<>")))" GOTO 620
615 ltp$=CHR$(10)+"Your choices"+CHR$(10):GOTO 630
620 IF ltp$<>"..." GOTO 630
625 ltp$="\..:: The End ::.."
630 RETURN
998'
999'
1000'Start Game
1005 CLS:MODE 2
1007'
1008'Chapter 0
1009'
1010 chSize%=10:cfile$="CH0":GOSUB 100
1019'
1020'Secction 0.1
1020 bop%=1:eop%=6:GOSUB 150'displayText
1025 GOSUB 220 'getName
1034'
1035'Secction 0.2
1040 bop%=8:eop%=10:GOSUB 150'displayText
1045 GOSUB 330 'getAge
1050 GOSUB 360 'generateScores
1058'
1059'
1060'Chapter 1
1065 chSize%=138:cfile$="CH1":GOSUB 100
1069'
1070'S1.1
1075 bop%=1:eop%=14:GOSUB 400
1080 GOSUB 440
1089'
1090'S1.2
1095 bop%=16:eop%=25:GOSUB 400
1100 GOSUB 460'gPChoice$
1105 IF chc$="1" THEN GOTO 1160
1110 IF cknw+FNtwoD3 > 8 THEN GOTO 1120 ELSE 1140
1119'
1120'S1.3
1125 bop%=27:eop%=34:GOSUB 400
1130 GOSUB 440:GOTO 1180
1139'
1140'S1.4
1145 bop%=36:eop%=42:GOSUB 400
1150 GOSUB 440:GOTO 1180
1159'
1160'S1.5
1165 chtp%=chtp%-FNtwoD3:bop%=44:eop%=48:GOSUB 400
1170 GOSUB 440:GOTO 1140
1179'
1180'S1.6
1185 bop%=50:eop%=67:GOSUB 400
1190 GOSUB 440:GOTO 1200
1199'
1200'S1.7
1205 bop%=69:eop%=81:GOSUB 400
1210 GOSUB 460:IF chc$="1" THEN GOTO 1220 ELSE GOTO 1250
1219'
1220'S1.8
1225 bop%=83:eop%=89:GOSUB 400
1230 GOSUB 460'gPChoice$
1235 IF chc$="2" THEN GOTO 1275'S1.10
1240 IF cskl+FNtwoD3>9 THEN GOTO 1320 ELSE 1330
1249'
1250'S1.9
1255 bop%=91:eop%=95:GOSUB 400
1260 GOSUB 440'AnyKey2cont...
1265 GOTO 1270
1269'
1270'S1.10
1275 bop%=97:eop%=104:GOSUB 400
1280 GOSUB 460'gPChoice$
1285 IF chc$="2" THEN GOTO 1330'S1.13
1290 IF cskl+FNtwoD3>11 THEN GOTO 1300 ELSE GOTO 1320
1299'
1300'S1.11
1305 bop%=106:eop%=124:GOSUB 400
1310 GOSUB 460:IF chc$="1" THEN GOTO 1370 ELSE 1350
1319'
1320'S1.12 no text
1325 chtp%=chtp%-FNtwoD3:GOTO 1300
1329'
1330'S1.13
1335 bop%=128:eop%=130:GOSUB 400
1340 GOSUB 510
1349'
1350'S1.14
1355 bop%=132:eop%=138:GOSUB 400
1360 GOSUB 510'theEnd
1368'
1369'
1370'CHAPTER 2
1375 chSize%=158:cfile$="CH2":GOSUB 100
1479'
1380'S2.1
1385 bop%=1:eop%=16:GOSUB 400
1390 GOSUB 440
1399'
1400'S2.2
1405 bop%=18:eop%=31:GOSUB 400
1410 GOSUB 460
1415 IF chc$="1" THEN GOTO 1420 ELSE 1440
1419'
1420'S2.3
1425 bop%=33:eop%=42:GOSUB 400
1430 rptn%=rptn%-1:GOSUB 440:GOTO 1460
1439'
1440'S2.4
1445 bop%=44:eop%=50:GOSUB 400
1450 rptn%=rptn%+FNdice(3):GOSUB 440:GOTO 1460
1459'
1460'S2.5
1465 bop%=52:eop%=66:GOSUB 400
1470 GOSUB 460:IF chc$="1" THEN GOTO 1485 ELSE GOTO 1500
1479'
1480'S2.6
1485 bop%=68:eop%=85:GOSUB 400
1490 GOSUB 440:GOTO 1620
1499'
1500'S2.7
1505 bop%=87:eop%=103:GOSUB 400
1510 GOSUB 460'gPChoice$
1515 IF chc$="1" THEN GOTO 1530
1520 IF cgrc%+FNfourD3>14 THEN GOTO 1560 ELSE 1580
1529'
1530'S2.8
1535 bop%=105:eop%=120:GOSUB 400
1540 GOSUB 460'gPChoice$
1545 IF chc$="1" THEN GOTO 1600'2.11:::
1550 IF cgrc%+FNfourD3>12 THEN GOTO 1560 ELSE 1580
1559'
1560'S2.9
1565 bop%=122:eop%=135:GOSUB 400
1570 GOSUB 440:GOTO 2000'CH4.1 provisional!!!!!
1579'
1580'S2.10
1585 bop%=137:eop%=151:GOSUB 400
1590 flags%(1)=1:GOSUB 440:GOTO 2000'CH4.1 provisional!!!!!
1599'
1600'S.11
1605 bop%=153:eop%=158:GOSUB 400
1610 GOSUB 510'theEnd
1618'
1619'
1620'CH3
1625 chSize%=50:cfile$="CH3":GOSUB 100
1629'
1630'S3.1
1635 bop%=1:eop%=18:GOSUB 400:GOSUB 440
1639'
1640'S3.2
1645 bop%=20:eop%=33:GOSUB 400
1650 GOSUB 460:IF chc$="1" THEN GOTO 1660 ELSE GOTO 1680
1659'
1660'S3.3
1665 bop%=35:eop%=44:GOSUB 400
1670 GOSUB 460:IF chc$="1" THEN GOTO 1710
1675 IF cskl%+FNfourD3>14 THEN GOTO 'S3.6 ELSE 'S3.7
1679'
1680'S3.4
1690 bop%=46:eop%=50:GOSUB 400
1700 GOSUB 460:IF chc$="1" THEN GOTO 1710
1705 IF cskl%+FNfourD3>14 THEN GOTO 'S3.8 ELSE 'S3.9
1709'
1710'S3.5
1999'
2000'Ch4 provisional!!!
4000 END
Powered by SMFPacks Menu Editor Mod