Work in progress: REALMS OF QUEST V

Discussion, Reviews & High-scores

Moderator: Moderators

User avatar
Ghislain
Realms of Quest
Posts: 1031
Joined: Sun Aug 08, 2004 12:54 am

Re: Work in progress: REALMS OF QUEST V

Postby Ghislain » Wed Jul 12, 2017 1:51 pm

I'm programming combat spells now. I just finished the programming for the magic missile. The following screenshots depict the player select which monster to attack and then the damage is inflicted on the selected monster.

realms5.jpg

realms6.jpg


A lot of the code will be reused for spells that can be cast against monsters as well as for missile weapons that allow the player to select which row of monsters to attack.
"A slave is one who waits for someone to come and free him." -- Ezra Pound

User avatar
Ghislain
Realms of Quest
Posts: 1031
Joined: Sun Aug 08, 2004 12:54 am

Re: Work in progress: REALMS OF QUEST V

Postby Ghislain » Sat Jul 15, 2017 5:03 pm

I added a feature that lets you examine the monster characteristics during combat. This makes it more convenient for the player without having to look up the information in the manual.

realms5.jpg
"A slave is one who waits for someone to come and free him." -- Ezra Pound

hasseapa
Vic 20 Hobbyist
Posts: 133
Joined: Thu Oct 12, 2006 4:09 am

Re: Work in progress: REALMS OF QUEST V

Postby hasseapa » Sat Jul 15, 2017 7:20 pm

realms6.jpg
realms6.jpg (45.75 KiB) Viewed 115 times


That golden warrior is such a treat... Makes me think of the Tutankhamun mask of Deluxe Paint and Amiga fame. I remember adoring a C64-version - squinting my eyes and telling myself that it was just as good. I surely would have been blown away by a VIC-version then.

Especially one that looks as great as the one done by Mike and Minipaint. I did not know of this one until now!
kircher3.jpg
kircher3.jpg (17.61 KiB) Viewed 115 times

User avatar
Ghislain
Realms of Quest
Posts: 1031
Joined: Sun Aug 08, 2004 12:54 am

Re: Work in progress: REALMS OF QUEST V

Postby Ghislain » Sun Jul 16, 2017 7:47 pm

hasseapa wrote:That golden warrior is such a treat... Makes me think of the Tutankhamun mask of Deluxe Paint and Amiga fame. I remember adoring a C64-version - squinting my eyes and telling myself that it was just as good. I surely would have been blown away by a VIC-version then.

Especially one that looks as great as the one done by Mike and Minipaint. I did not know of this one until now!
kircher3.jpg


Thank you. Mike's graphic tools and his raster routine have been instrumental in my making these graphics.

For the past few days I've been focusing on cleaning up some of the code and making it more tight and efficient. I probably shaved off about 1K of wasted space.

I've also programmed routines that will print numbers and text at specific locations on the screen which is 24*26 in size, so I had to create my own non-kernal printing routines.

Code: Select all

      ; print monster hitdice
      lda MONSTER_MLEV
      ldx #<(4097+24*22+4)
      ldy #>(4097+24*22+4)
      jsr PRINTPOSNUMBER

                   ....

      ; print health status
      jsr GETSTATUS
      ldx #<(@status)
      ldy #>(@status)
      jsr FINDSTRING   
      ldx #<(4109)
      ldy #>(4109)
      jmp POKETEXTSCREEN2


The first one is simple enough -- pass a value that is between 0-255 from the accumulator and the lo/hi memory locations in X,Y to PRINTPOSNUMBER to print a positive byte number. (PRINTNEGNUMBER can print values from -128 to +127(

The second one (POKETEXTSCREEN2) will print text on a string whose pointer is setup with FINDSTRING (pass lo/hi with X,Y of the first string in the array and ACC has the value of which string number you want returned) and then you pass the lo/hi location of the screen in X,Y.

I programmed Realms IV in BASIC (with ML speed up routines) and while that is an appropriate language to program an RPG game (commercial titles like Question and Legacy of the Ancients were also programmed in BASIC with ML speedup routines), it would have been quite a challenge to program a game of this scope in BASIC which is why I went 100% ML this time around.
"A slave is one who waits for someone to come and free him." -- Ezra Pound

User avatar
Ghislain
Realms of Quest
Posts: 1031
Joined: Sun Aug 08, 2004 12:54 am

Re: Work in progress: REALMS OF QUEST V

Postby Ghislain » Mon Jul 17, 2017 11:13 am

I just finished programming spells that allow you to control monsters.

realms5.jpg

realms6.jpg


10 player character slots with each allowed to have 1 NPC Ally or controlled monster = up to 20 members in your party. This must be an 8 bit CRPG record, otherwise can somebody point me to such a game that allows this feature.
"A slave is one who waits for someone to come and free him." -- Ezra Pound

User avatar
Ghislain
Realms of Quest
Posts: 1031
Joined: Sun Aug 08, 2004 12:54 am

Re: Work in progress: REALMS OF QUEST V

Postby Ghislain » Tue Jul 18, 2017 1:37 pm

I just rewrote my spell damage routine so that it can be reused for other spells. That way, I just pass the lo/hi address at X/Y that the routine can use to cycle through the entire party of monsters if needed (spells have 3 areas of effect: single monster, single row of monsters and all monsters).

Code: Select all

GOTHROUGHMONSTERS:
      ; pass X/Y - lo/hi address that performs spell action
      stx @jump_point+1
      sty @jump_point+2

      jsr ATTRIBUTEADJUST
      lda SPELLAREA
      cmp #3
      bne @sd0
      jmp @sdall
      
   @sd0:
      jsr SELECTMONSTER_ROW
      lda SPELLAREA
      cmp #1
      beq @sdsingle
      jsr @sdsinglerow
      cmp #1
      beq @sdvictory
      jmp @sd2
   
   @sdsingle:
      ; single monster
      ldx #0
      jsr @jump_point
      cmp #1
      beq @sdvictory
      jmp @sd2

   @sdvictory:
      lda #1
      rts
      
   @sdall:
      ; go row by row
      ldx #0
   @sdall2:
      stx @rowreg
      stx ATTACK_ROW
      ldy MONSTER_ROWS
      sty @numbrow
      jsr DISPLAYMONSTER_ROW
      
      jsr @sdsinglerow
      cmp #1
      beq @sdvictory

      ldy MONSTER_ROWS
      cpy #0
      beq @sd2
      ldx @rowreg
      cpy @numbrow
      bne @sdall2
      ldx @rowreg
      inx
      cpx @numbrow
      bpl @sd2
      beq @sd2
      jmp @sdall2
   
   @sd2:
      rts

   @sdsinglerow:
      ; one row of monsters
      lda MONSTER_ROWS
      sta @rowcount
      ldx #0
   @sd1_1:
      ldy ATTACK_ROW
      lda MONSTER_NUM,y
      sta @numbcol
      stx @colreg
      jsr @jump_point
      cmp #1
      beq @sd1victory
      lda @rowcount
      cmp MONSTER_ROWS
      bne @sd1_2
      ldy ATTACK_ROW
      lda MONSTER_NUM,y
      cmp #0
      beq @sd1_2
      cmp @numbcol
      bne @sd1_1_2
      ldx @colreg
      inx
      stx @colreg
   @sd1_1_2:
      ldy ATTACK_ROW
      lda MONSTER_NUM,y
      sta @numbcol
      ldx @colreg
      cpx @numbcol
      bpl @sd1_2
      beq @sd1_2
      jmp @sd1_1
   @sd1_2:
      lda #0
      rts
   @sd1victory:
      lda #1
      rts
      
   @jump_point:
      jmp PAUSE
      
   @numbrow:   .byte 0
   @numbcol:   .byte 0
   @colreg:   .byte 0
   @rowreg:   .byte 0
   @rowcount:   .byte 0


Looks like spaghetti code for certain, and I probably should refactor it at some point in the future. But it works, and it's a very elegant solution that lets me avoid copy-pasting this long nested loop for each spell type. That means that I get to save on a lot of RAM memory which can be a scarce commodity even in a 32K expanded VIC-20.
"A slave is one who waits for someone to come and free him." -- Ezra Pound


Return to “Games”

Who is online

Users browsing this forum: No registered users and 2 guests