Jump to content
IGNORED

Dungeon


Frozone212

Recommended Posts

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 by Frozone212
  • Like 1
Link to comment
Share on other sites

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:

 

  • Like 1
Link to comment
Share on other sites

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.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

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.

d1.thumb.png.8018e5cb355a23ea689021ed00b4cb22.png

 

d2.thumb.png.4561e0dc4abe663bf2ed3ad10f3b1586.png

Run it in Xpet 3.5

it is designed for the 8n or Unknown (which i assume is the original model) versions

  • Like 1
Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...