Frozone212 Posted October 14, 2021 Share Posted October 14, 2021 (edited) So...this is crap, but I wanted to experience how it was in the early days. that means no extra ram, no help whatsoever. anyway, i've got the first two dungeons done working on slowly improving. Practice makes perfect. anyway, enjoy. There's only one enemy and no loss condition. Still, small victories load "Dungeon",8,1 and Load "d2",8,1 dungeon.d64 d2.d64 Edited October 14, 2021 by Frozone212 1 Quote Link to comment Share on other sites More sharing options...
Frozone212 Posted October 14, 2021 Author Share Posted October 14, 2021 12 hours ago, Frozone212 said: So...this is crap, but I wanted to experience how it was in the early days. that means no extra ram, no help whatsoever. anyway, i've got the first two dungeons done working on slowly improving. Practice makes perfect. anyway, enjoy. There's only one enemy and no loss condition. Still, small victories load "Dungeon",8,1 and Load "d2",8,1 any feedback for me? 12 hours ago, Frozone212 said: dungeon.d64 170.75 kB · 3 downloads d2.d64 170.75 kB · 2 downloads 1 Quote Link to comment Share on other sites More sharing options...
jrhodes Posted October 15, 2021 Share Posted October 15, 2021 VICE refuses to run these. See screenshots attached. I tried with both auto-run, and manually mounting the .D64 and doing the traditional LOAD"$",8 LIST LOAD"DUNGEON",8,1 RUN Not sure how you created those .D64 files, but something is not right with them. Quote Link to comment Share on other sites More sharing options...
carlsson Posted October 15, 2021 Share Posted October 15, 2021 DUNGEON is 3 blocks that seems to load to $0400 so intended for the PET, not C64. Some comments on the code: 10 G=PEEK(5000):IF G=0 THEN RETURN From what I can see, you never POKE any value into this address in the middle of memory. If it happens to be zero, your program will bail out with ?RETURN WITHOUT GOSUB. 21 DIM A$(1):GET A$:IF A$="" THEN GOTO 21 This will bail out with ?REDIM'D ARRAY right away. Also arrays up to the size of 10 are auto dimensioned in Commodore BASIC so you don't need to specify that unless you do it in order to save memory. In any case, DIM should be on its own row so it never is reached unless you CLR before. 23 LET E=2:REM 2 NEW ENEMIES:LET G=0:PRINT"GOLD IS DEFAULT 0" Once you put a REM statement into a line, the rest of it is ignored. I'm not sure if that is on purpose here, that you don't want rest of the code to execute, but in this one it won't. 30 GET A$:IF A$="FIGHT" THEN GOTO 40:IF A$="RUN" THEN PRINT"YOU DROP GOLD" When you use GET, you only pick up 1 character, not an entire string. You might want to use INPUT A$ here. Also once you have GOTO 40, the second IF statement will never be reached. You might want to put that on its own line in order to have any effect. 34 INPUT A$:IF A$="Y" THEN SAVE"DUNGEON",8,1 You can not save a file over itself without using the syntax SAVE"@:DUNGEON" and even that one is a bit buggy. Also since you save the program itself, any progress the player has reached and which may be stored in variables, is lost anyway. What you probably want is file handing using OPEN, PRINT#, CLOSE and on the other end OPEN, INPUT#, CLOSE to load back the data. Look up the exact details to do that if you really intend to save a game. Right now there is very little player data to save. The image D2 contains one "splat" file, i.e. not properly saved so it is not loadable. Also if you run validate on that one, it will go away completely. I'm sure there might be a block or two that you have filled with content, but I won't dig that deep right now. 2 1 Quote Link to comment Share on other sites More sharing options...
jrhodes Posted October 15, 2021 Share Posted October 15, 2021 This is a PET game? That explains the errors i was getting. I had just automatically assumed it was for C64, no mention of which Commodore machine it was for was given in the post. Quote Link to comment Share on other sites More sharing options...
carlsson Posted October 15, 2021 Share Posted October 15, 2021 He has mentioned the PET in other/previous posts. However if you loaded it with ,8 instead of ,8,1 on the C64 it would relocate and run just as well as it currently does on the PET. 1 Quote Link to comment Share on other sites More sharing options...
Frozone212 Posted October 16, 2021 Author Share Posted October 16, 2021 On 10/15/2021 at 2:14 AM, jrhodes said: VICE refuses to run these. See screenshots attached. I tried with both auto-run, and manually mounting the .D64 and doing the traditional LOAD"$",8 LIST LOAD"DUNGEON",8,1 RUN Not sure how you created those .D64 files, but something is not right with them. Run it in Xpet 3.5 it is designed for the 8n or Unknown (which i assume is the original model) versions 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted October 18, 2021 Share Posted October 18, 2021 @Frozone212 In a status update you asked about PRINT AT functionality. On the 3000 series and upwards, using BASIC V2, you can use something like this: 10 POKE 216,row-1:PRINT:POKE 198,column:PRINT"MESSAGE" The corresponding POKEs on VIC-20 and C64 are 214 and 211. However those addresses don't work on BASIC V1 as in the original PET 2001. An alternative is to define two strings: CD$="{24 cursor down}":CR$="{39 cursor right}" Then you use PRINT CHR$(19);MID$(CD$,1,row);MID$(CR$,1,col);"MESSAGE" That is a little more cumbersome but you can always turn it into a subroutine, and should work on all models with 40 column screen. Note that row and col are zero based, i.e. row 0-24, column 0-39. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.