[Type_ins] The Valley of adventure: Poster Programs 1

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
David G
Posts: 387
Joined: Thu Jul 17, 2014 7:58 am
Location: 21 North, 156 West

Re: A 15.999K Adventure game: The Valley of adventure.

Post by David G »

XavSnap wrote: Mon Jan 09, 2023 3:34 am Later release:
...
- Off screen D_file destruction avoid at the right and the left sides.
...
You have a great fix, which I was struggling to implement -- i only had IF G$="4" THEN GOTO 2050. Your change also fix the diagonal movements (1 and 7 keys)

Code: Select all

2065 IF (G$="1" OR G$="4" OR G$="7") AND PEEK (W+V-1)=118 THEN GOTO 2050
This solves the "bug" of when at Safe Castle, you can move beyond the border wall, eventually crashing the display file.

But I think you also need this line for the east border Safe Castle:

Code: Select all

IF (G$="3" OR G$="6" OR G$="9") AND PEEK (M+V+1)=118 THEN GOTO 2050
That 118 is the NEWLINE at the end of a display line. In other words, don't move left or right if there is a NEWLINE there
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: A 15.999K Adventure game: The Valley of adventure.

Post by Fruitcake »

XavSnap wrote: Mon Jan 09, 2023 3:34 am Later release:
- Fight loop debuged.
- Off screen D_file destruction avoid at the right and the left sides.
- Exits from towers woods and swamps.
Have fun.
Not sure if these observations are helpful or not but spotted these differences to the listing in the poster which might or might not be relevant:
  • Line 168 - String should contain "THEE" not "THREE".
  • Line 885 - Poster listing has this as line 882.
  • Line 1570 - Poster listing does not end with a semicolon.
  • Lines 2180-2200 - Poster listing has these as lines 2170-2190 and then line:
    2200 IF Q=R THEN GOTO 1500
  • Line 3770 - Poster listing ends with semicolon, so probably no need for AT R,O in lines 3792 and 3800.
  • Line 2 - Poster listing shows two bytes of $23 (i.e. 6th and 7th bytes):
    REMDifference.PNG
So glad I never purchased this poster at the time as it seems horrendously buggy...
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: A 15.999K Adventure game: The Valley of adventure.

Post by XavSnap »

Laters release:
VALLEY.P
(14.57 KiB) Downloaded 71 times
David, Greg and Paul suggestions.
(FAST mode not implemented, because of screen clipping and D_File rolling issue...)

Thanks a lot for help.

Have Fun !
Attachments
The_valley.bas
(23.09 KiB) Downloaded 58 times
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: [Type_ins] The Valley of adventure: Poster Programs 1

Post by Fruitcake »

Great, thanks.

A few observations:
  • Line 120 has a typo: HWO instead of WHO.
  • Line 5307 is in the original poster listing but variable PD is never used anywhere, so could be deleted.
  • Might need to initialise HF to 0. When playing a version of game that is exactly as listed in the poster, I find line 3720 can generate error 2 when fighting for the first time. I don't see HF initialise at the end of your listing, but maybe you initialise it elsewhere?
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: [Type_ins] The Valley of adventure: Poster Programs 1

Post by XavSnap »

Ok Paul, HF setup line 80... (TM value was unused too!)
VALLEY.P
(14.59 KiB) Downloaded 59 times
Attachments
The_valley.txt
(23.13 KiB) Downloaded 61 times
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: [Type_ins] The Valley of adventure: Poster Programs 1

Post by XavSnap »

The splash screen:
Cap0002.jpg
screen.jpg
screen.jpg (42.68 KiB) Viewed 1439 times
Attachments
SCREEN.P
(1.72 KiB) Downloaded 48 times
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: [Type_ins] The Valley of adventure: Poster Programs 1

Post by Fruitcake »

For the sake of completeness, here is the program exactly as listed in the poster (hence with all the bugs) so that there is an archive of it in its purest form.


The minimal changes I found required to the attached program to get it to run without an error report 2 (variable not found) or error report 3 (subscript out of range) being produced were:

LET XP=0
LET HF=0

Change line 5575 to:
5575 IF P(FL)>32 OR P(FL)=O THEN LET P(FL)=H

But there might be more I did not encounter while playing.

XavSnap's enhanced version addresses many other flaws in the game logic and would be best to use when actually playing the game.
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: [Type_ins] The Valley of adventure: Poster Programs 1

Post by XavSnap »

New release from the "The Valley Of Adventure" rescue team:
-Add a tile filler in the donjons.
-Add the Splash screen.
Cap0004.jpg
Cap0005.jpg
Cap0006.jpg
VALLEY.P
(14.74 KiB) Downloaded 55 times
Attachments
The_valley.txt
(23.52 KiB) Downloaded 56 times
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: [Type_ins] The Valley of adventure: Poster Programs 1

Post by Fruitcake »

Here is a version of the published poster listing (with published bug fix) that has the REM comments from the original PET program included. This greatly helps in understanding the structure of the program.

TheValleyOfAdventure[PosterPrograms1]_Commented.txt
(22.03 KiB) Downloaded 81 times
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: [Type_ins] The Valley of adventure: Poster Programs 1

Post by XavSnap »

Cap0008.jpg

Cap0009.jpg
:shock:

Any suggestions to sell in my tavern ? -or translate in old english-

Code: Select all

  7000 REM
  7005 POKE 17086,8
  7010 LET PZ=USR VAL"17062"
  7020 PRINT AT O,H1;"x";AT O,R;"x";AT CODE"$",H1;"x";AT CODE"$",R;"x";\
  AT H1,K;"1³eAT³³³50";\
  AT K,K;"2³sLEEP³100";\
  AT K+H1,K;"3³aMULET STONE³500";\
  AT K+K,K;"4³sAVE GAME";\
  AT CODE"¿",K;"5³eXIT";
  7025 LET G$=INKEY$
  7030 IF G$<"1" OR G$>"5" THEN GOTO 7025
  7040 IF G$>"0" AND G$<"4" THEN GOSUB 7200
  7050 IF G$="4" THEN GOTO 9000
  7060 IF G$="5" THEN GOTO 4600
  7070 GOSUB 380
  7100 GOTO 7025
  7200 LET TR=500 AND G$="3"+H2 AND G$="2"+50 AND G$="1"
  7210 IF TS-TR<O THEN RETURN
  7220 LET TS=TS-TR
  7231 IF G$="1" THEN LET C=C+10
  7232 IF G$="2" THEN LET PS=PS+H
  7233 IF G$="3" THEN LET T(H1)=T(H1)+H
  7240 GOTO 7030
Attachments
VALLEY.P
(15.35 KiB) Downloaded 52 times
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply