Jump to content
IGNORED

Another Adventure? Yep...


Recommended Posts

I like the reviving dragons, too, but I'm wondering if it could be an optional thing. Maybe it could be activated by switching TV Type to B&W?

 

Edited to add: No, I take that back. TV Type would be best used for Pause. ;) Still, it'd be nice to have the reviving dragons as an option so those who would prefer the fundamental rules of the original game not change could enjoy this as well.

Hrm. I was wandering the red castle, when I went south and ended up in a room where I couldn't see anything at all. I went back north, and I ended up embedded in the wall. :( Is that what is supposed to happen?

Hrm. I was wandering the red castle, when I went south and ended up in a room where I couldn't see anything at all. I went back north, and I ended up embedded in the wall. :( Is that what is supposed to happen?

 

Hmm, no...but would love a screen shot of that to see what/where that happened.

I like the reviving dragons, too, but I'm wondering if it could be an optional thing. Maybe it could be activated by switching TV Type to B&W?

 

Edited to add: No, I take that back. TV Type would be best used for Pause. ;) Still, it'd be nice to have the reviving dragons as an option so those who would prefer the fundamental rules of the original game not change could enjoy this as well.

 

Revived dragons could be changed to be in additional game# selections. The program allows for 8 (although it only uses 3). The tables would just need to be increased in size and number tokens added. Then in the MoveBat routine, check the game selection first to see if a dragon should be revived.

 

 

BTW the program keeps track of the TV type switch (7800-compatable). All you need to do is check if bit2 of CurrentStick is clear (AND #$04 = 0)...so you can have it control anything you'd want.

 

Here's how the game can be paused using it:

 

;existing lines...
MainGameLoop:
      jsr    MakeSound           ;6 Make noise if necessary
      jsr    CheckInput          ;6 Check for controller input

;added lines...
      lda    CurrentStick        ;3 Check pause status
      and    #$04                ;2 Check B&W switch
      beq    NonActiveLoop       ;2 Branch if clear (pause)
;Main loop continues if not paused...

 

 

When toggled, nothing will move (just like the end of the game).

Hrm. I was wandering the red castle, when I went south and ended up in a room where I couldn't see anything at all. I went back north, and I ended up embedded in the wall. :( Is that what is supposed to happen?

 

Hmm, no...but would love a screen shot of that to see what/where that happened.

 

I just tried it again, and I see that it's an unfinished room. When I went down there the first time, a dragon was moving across it. I couldn't see my square character, so I assumed he was in a maze and unable to see around himself. Turns out it's not a room at all, or at least I can't traverse it. But if you go down there, move to the left (or, presumably, to the right), then go back north, you'll end up in a wall.

 

Here are shots I took of just before entering the room, and after moving left and coming out (you can see the edge of my square peeking out of the wall to the left of the opening in the bottom of the screen):

 

post-8500-129842141806_thumb.png

post-8500-129842141892_thumb.png

I like the reviving dragons, too, but I'm wondering if it could be an optional thing. Maybe it could be activated by switching TV Type to B&W?

 

Edited to add: No, I take that back. TV Type would be best used for Pause. ;) Still, it'd be nice to have the reviving dragons as an option so those who would prefer the fundamental rules of the original game not change could enjoy this as well.

 

Revived dragons could be changed to be in additional game# selections. The program allows for 8 (although it only uses 3). The tables would just need to be increased in size and number tokens added. Then in the MoveBat routine, check the game selection first to see if a dragon should be revived.

 

 

BTW the program keeps track of the TV type switch (7800-compatable). All you need to do is check if bit2 of CurrentStick is clear (AND #$04 = 0)...so you can have it control anything you'd want.

 

Here's how the game can be paused using it:

 

;existing lines...
MainGameLoop:
      jsr    MakeSound           ;6 Make noise if necessary
      jsr    CheckInput          ;6 Check for controller input

;added lines...
      lda    CurrentStick        ;3 Check pause status
      and    #$04                ;2 Check B&W switch
      beq    NonActiveLoop       ;2 Branch if clear (pause)
;Main loop continues if not paused...

 

 

When toggled, nothing will move (just like the end of the game).

 

That would be awesome! Thank you for figuring that out, Nukey.

Here are shots I took of just before entering the room, and after moving left and coming out (you can see the edge of my square peeking out of the wall to the left of the opening in the bottom of the screen)

 

Could be that the hole size isn't matching in the next screen. If the upper hole in the dark room is wider, exiting on either side of it may trap you in the bottom wall of the red maze. Just edit the room gfx of the dark room if this is the case.

Hrm. I was wandering the red castle, when I went south and ended up in a room where I couldn't see anything at all. I went back north, and I ended up embedded in the wall. :( Is that what is supposed to happen?

 

Hmm, no...but would love a screen shot of that to see what/where that happened.

 

I just tried it again, and I see that it's an unfinished room. When I went down there the first time, a dragon was moving across it. I couldn't see my square character, so I assumed he was in a maze and unable to see around himself. Turns out it's not a room at all, or at least I can't traverse it. But if you go down there, move to the left (or, presumably, to the right), then go back north, you'll end up in a wall.

 

Here are shots I took of just before entering the room, and after moving left and coming out (you can see the edge of my square peeking out of the wall to the left of the opening in the bottom of the screen):

 

post-8500-129842141806_thumb.png

post-8500-129842141892_thumb.png

 

You are actually in the Ice Castle (accessible through the dark passage within the Volcano), but the Ice Castle gate is unopened. When you moved down, the gate was closed so it did not let you exit the Ice Castle, thus you move back up. However, because you moved at an angle, it put you into a wall.

 

Basically, I can remove the dark passageways between the Ice Castle interior and the Volcano interior, then that would not happen (you would have to unlock each to enter), but that would be the only way to keep this from ever happening.

 

I think I figured out another workaround...will take care of it.

Edited by keithbk

Okay, I uploaded a revised version of the game. Now the room will loop up to a shallow entry in the Dark Passage if the gate is not open in the Ice Castle. Also redid another room and added the Pause function. See first post for this updated version.

 

---------------------------

 

Nukey, I did the graphics for games 4 & 5, but have not worked out the internals of those two options... Game 4 should be just like Game 2, only resurrecting bat. Game 5 should be just like Game 3, but with the res bat. You want to add that functionality?

 

Also, what do you think about making a dragon similar to Dragonfire and putting it in the game? What should I watch out for? Any sprite issues? I'd need about 18 bits in width and about 10 vertical to do this.

 

Text file for Nukey follows:

anotheradventure.txt

D'oh! I didn't realise that this was the same issue as post #22 :lol:

 

What is the progression for games 4 and 5?

 

From what I gather, the GfxNum follows this progression:

 

GfxNum1 - $01

GfxNum2 - $03

GfxNum3 - $FF

GfxNum4 - ??

GfxNum5 - ??

 

Do these correspond to the actual game number progressions as well, or would they be different?

Edited by keithbk

D'oh! I didn't realise that this was the same issue as post #22 :lol:

 

I didn't realize that either. And I read those posts, but didn't know what the "ice castle" was. Double d'oh.

Okay, I uploaded a revised version of the game. Now the room will loop up to a shallow entry in the Dark Passage if the gate is not open in the Ice Castle. Also redid another room and added the Pause function. See first post for this updated version.

 

Thank you for adding all that functionality. :)

What is the progression for games 4 and 5?

 

From what I gather, the GfxNum follows this progression:

 

GfxNum1 - $01

GfxNum2 - $03

GfxNum3 - $FF

GfxNum4 - ??

GfxNum5 - ??

 

Do these correspond to the actual game number progressions as well, or would they be different?

 

The value would be the maximum value that the variable can contain for the state in question. The number "1" symbol is displayed if the variable "Level" is zero or one (because the game select switch bumps the value by 2 in the CheckReset routine). So the way to add levels 4 and 5 is to alter the table like this:

 

NumberStates: ;9 bytes, ;Object #5 States
      .byte $01 ;State 1
      .word GfxNum1
      .byte $03 ;State 2
      .word GfxNum2
      .byte $05 ;State 3
      .word GfxNum3
      .byte $07 ;State 4
      .word GfxNum4
      .byte $FF ;State 5
      .word GfxNum5

 

You'll need to add some other stuff too. First, alter the game select routine to allow 5 games (below the CheckReset label):

;remove this line...
;       cmp    #$06                ;2 Have we reached the maximum? (3 games)
;and replace it with this...
      cmp    #$0A                ;2 Have we reached the maximum? (5 games)

 

And here:

Object_Map_Tbl:
      .word Game1Objects           ;object template for first game
      .word Game2Objects           ;object template for second
      .word Game2Objects           ;(reuse second for third before randomization)
;added lines:
      .word Game2Objects           ;object template for fourth
      .word Game2Objects           ;object template for fifth

You could use different setups if you wanted...but the number of bytes must be equal in all tables.

 

Then you can add what effect games 4 and 5 have apart from the regular games...by checking the Level variable. You'd need to strip off the upper nybble and low bit first with AND #$0E, because the upper nybble holds the current sound being played (if any), and the low bit contains the console type (2600 or 7800)...and then check if the value is 6 (game 4) or 8 (game 5).

 

SetupRoomObjects_2 will also need a bit of adjusting if you want levels 3 and 5 to be random but 2 and 4 not to be...

 

SetupRoomObjects_2:
      lda    (CurrentObject),y   ;5 (the rooms and positions) into
      sta.wy DotR,y              ;4            ...the working area
      dey                        ;2
      bpl    SetupRoomObjects_2  ;2
      lda    Level               ;3 Get the level number
;       and    #$0F                ;2 Strip off any sound
;       cmp    #$04                ;2 Branch if level one
;       bcc    SignalGameStart     ;2  ...Or two (Where all objects are in defined areas)
;altered...
      and    #$0E                ;2 Strip off any sound AND console type
      beq    SignalGameStart     ;2 Branch if game 1
      and    #$02                ;2 Check every other level
      bne    SignalGameStart     ;2 Branch if set (even-numbered levels 2 and 4)

 

 

You really ought to look at the earlier threads...all of this is covered there ;)

I JUST got it finished, lol...apparently just before you posted yours!

 

Just took me 4 hours ;)

 

I did everything just like you did in the first few code segments, but my SetupRoomObjects_2 is different:

 

SetupRoomObjects_2:
      lda    (CurrentObject),y   ;5 (the rooms and positions) into
      sta.wy DotR,y              ;4            ...the working area
      dey                        ;2
      bpl    SetupRoomObjects_2  ;2
      lda    Level               ;3 Get the level number
      and    #$0F                ;2 Strip off any sound
      cmp    #$06                ;2 
      bcc    SignalGameStart     ;2 Branch if level 1-3
      ldy    #RndNum             ;2 Randomize game objects...

 

Then I put this in the get object:

 

;Get Object
      stx    BatR+5              ;3 Store Object as Being Carried
 IF BAT_REVIVES_DRAGONS
      cpx    #GDragonR+1         ;2 compare to whatever the last dragon is
      bcs    MoveOn              ;2 object not a dragon
      lda    Level
      and    #$0F                ;2 Strip off any sound
      cmp    $02
      beq    MoveOn
      lda    Level
      and    #$0F                ;2 Strip off any sound
      cmp    $06
      beq    MoveOn
      sta    $04,x               ;5 revive applicable dragon

 

See, I'm not completely useless ;) Just incredibly slow!

 

I updated the game file.

 

Game 1 - Normal "updated" game

Game 2 - Expanded kingdom, items in set locations.

Game 3 - Expanded kingdom, items in set locations, bat resurrects dragons.

Game 4 - Expanded kingdom, randomly placed items

Game 5 - Expanded kingdom, randomly placed items, bat resurrects dragons.

Edited by keithbk

SetupRoomObjects_2:
      lda    (CurrentObject),y   ;5 (the rooms and positions) into
      sta.wy DotR,y              ;4            ...the working area
      dey                        ;2
      bpl    SetupRoomObjects_2  ;2
      lda    Level               ;3 Get the level number
;       and    #$0F                ;2 Strip off any sound
;       cmp    #$04                ;2 Branch if level one
;       bcc    SignalGameStart     ;2  ...Or two (Where all objects are in defined areas)
;altered...
      and    #$0E                ;2 Strip off any sound AND console type
      beq    SignalGameStart     ;2 Branch if game 1
      and    #$02                ;2 Check every other level
      bne    SignalGameStart     ;2 Branch if set (even-numbered levels 2 and 4)

 

 

Just curious, I notice the stripping of sound and console type here (#$0E), but should it also be done elsewhere, like the "CheckReset" routine?

Edited by keithbk
Just curious, I notice the stripping of sound and console type here, but should it also be done elsewhere, like the "CheckReset" routine?

 

Oops...I missed that one. Do not strip the console type there, tho...because it needs to be preserved for the bottom of the routine where the AND #$01 is done.

 

 

CheckReset:
      lsr                        ;2 And check only the select switch
      bcc    StoreSwitches       ;2 Branch if select not being used
      lda    PlayerRoom          ;3 Get the Current Room
      bne    SetupRoomObjects    ;2 Branch if not the number room (game in progress)
      lda    Level               ;3 Get current game level
      and    #$0F                ;2 Strip off any sound (only the sound)
      clc                        ;2
      adc    #$02                ;2 Increment the level number (by two)
;;       cmp    #$06                ;2 Have we reached the maximum?
      cmp    #$0A                ;2 Have we reached the maximum?

      bcc    ResetSetup          ;2  ...branch if not
      and    #$01                ;2  Otherwise, set back to zero (console type preserved)
ResetSetup:
      sta    Level               ;3 Store the new level number

 

 

The random routine is only checking the level number, so preserving the console type bit is not important. This one is rewriting to ram at the bottom line, so the console type would be lost if you strip it off here.

Edited by Nukey Shay

BTW your revive code is broken...because it's comparing ram locations $02 and $06 against the Level value instead of the values #$02 and #$06 (#$=value, $=ram location).

 

You can make it a bit shorter too...

  IF BAT_REVIVES_DRAGONS
      cpx    #GDragonR+1         ;2 Compare to whatever the last dragon is
      bcs    MoveOn              ;2 Object not a dragon
      lda    Level               ;3 Check game selection...
      and    #$0E                ;2 Strip off sound and console type
      beq    MoveOn              ;2 Branch if game #1
      and    #$02                ;2 Check for even-numbered games
      bne    MoveOn              ;2 Branch if game #2 or #4
      sta    $04,x               ;5 Revive applicable dragon

Not really, because a single 8-bit sprite kind of limits how much you can do with them. You could cheat and set it's width value to use double or quad...but the result would probably be ugly. Anything like combining multiple sprites to make a larger image, or resetting HM values to slide bits around as it's being drawn (ala Duck Attack) really require a different kernel.

Not really, because a single 8-bit sprite kind of limits how much you can do with them. You could cheat and set it's width value to use double or quad...but the result would probably be ugly. Anything like combining multiple sprites to make a larger image, or resetting HM values to slide bits around as it's being drawn (ala Duck Attack) really require a different kernel.

 

The other option, which might be relatively simple, would be to give the "normal" dragon state two sprites to work with, similar to the bat, only with a longer delay between switching sprites so the dragon does not appear to "flicker." This could represent movement, perhaps of feet or wings, and give a more realistic look to the creature.

Easy if you want only 2 frames of roaming animation...the bat is already doing that. Just merge it in by rolling the bat's state value down 2 bits and ORing with the dragon's state.

 

You'd also need to adjust the unmoving states to use value 2 for dead (instead of 1), 3 for eaten ball (instead of 2), and the roaring dragon takes the rest. In the dragon's state table, add an additional frame there.

;existing lines...
MoveDragon:
      sta    ObjLst              ;3 Set low address of object store
      sty    Delta2              ;3 Set the dragon's delta
      lda    #>RedDragMatrix     ;2 NOTE: all dragon matrixes must be on the same page!
      sta    ObjLst+1            ;3 Set high address of object store
      stx    ObjectNumber        ;3 Save Object were dealing with
      lda    Object_Data_LSB,x   ;4 Get the Object's dynamic data
      tax                        ;2
      lda    $04,x               ;4 Get the Object's state

;added...
      lsr                        ;2 Ignore any animation frame

;existing
      bne    MoveDragon_6        ;2 Branch if not roaming

;added...
      lda    BatR+4              ;3 Get bat's animation state (3 bits)
      lsr                        ;2 Use only 1 bit...roll bit2 down to bit0
      lsr                        ;2 .
      eor    $04,x               ;4 Merge with dragon's state
      sta    $04,x               ;5 ...And update
      lda    #$00                ;2 Reload zero value needed ahead
;existing lines continue...

 

 

;existing lines...
MoveDragon_4:
      stx    ObjAddress          ;3 Store object's dynamic data address
      ldx    ObjectNumber        ;3 Get the object number
      jsr    FindObjHit          ;6 See if another object has hit the dragon
      ldx    ObjAddress          ;3 Get the object's address
      cmp    #SwordNumber        ;2 Has the sword hit the dragon?
      bne    MoveDragon_5        ;2 If not, branch
;       lda    #$01                ;2 Set the state to 01 (dead)
;altered...
      lda    #$02                ;2 Set the state to 02 (dead)

 

 

;existing lines...
MoveDragon_6:
;these values still work...since the state was LSR'ed before going here
      cmp    #$01                ;2 Is it in state 02 (dead)?
      beq    MoveDragon_9        ;2 Branch if so (return)
      cmp    #$02                ;2 Is it in state 04 (ball already swallowed)?

 

 

MoveDragon_7: ;Dragon Roaring
;added line...get back original state
      lda    $04,x               ;4 Get the Object's state

;existing lines...
      tay                        ;2 Transfer state to Y
      iny                        ;2 Bump state
      sty    $04,x               ;4 Save it's state
      cpy    #$FC                ;2 Is it near the end?
      bcc    MoveDragon_9        ;2 If not, branch
      lda    ObjectNumber        ;3 Get the dragon's number
      jsr    PBCollision         ;6 Check if the ball is colliding
      bpl    MoveDragon_9        ;2 If not, branch
;       lda    #$02                ;2 Set the state to state 02 : eaten
;altered...
      lda    #$04                ;2 Set the state to state 04 : eaten

 

 

DragonStates: ;12 bytes, list of states for all dragons
      .byte $00 ;State 00 (roaming)
      .word GfxDrag0
      .byte $01 ;State 01 (second frame)
      .word GfxDrag0alternate
      .byte $03 ;State 02 (dead)
      .word GfxDrag2
      .byte $04 ;State 04 (swallowed player)
      .word GfxDrag0
      .byte $FF ;State FF (biting player)
      .word GfxDrag1

 

 

And add a bitmap for GfxDrag0alternate. Should work, I think.

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