duke: engage shooting sprite

This commit is contained in:
Vince Weaver 2020-12-14 23:37:12 -05:00
parent 5345f809a0
commit 3235ac7d66
6 changed files with 43 additions and 8 deletions

View File

@ -7,9 +7,23 @@ fancier PC-style sounds
movement:
~~~~~~~~~
collision detection up (hit head on jump)
only jump if feet on ground
when land from jump, stop walking
jump slightly higher?
* when land from jump, stop walking
walking right into objects, stand back one more
can keep walking in collision, just don't move
shooting animation
update clear screen to be black not stripes
enemies
exit door, blue pillar, red key (all in basement?)
tiles
~~~~~
animated tiles? alternate frame?
laser
~~~~~
hit enemies
hit tiles
levels:
~~~~~~~
@ -17,11 +31,10 @@ mystery level 2
status:
~~~~~~~
keep score, proper laser count
keep score, inventory
sprites:
~~~~~~~~
Different sprites for left, right, shooting
When land, kicks up dust
enemies:

View File

@ -39,6 +39,7 @@ check_shooting_right:
draw_shooting_right:
ldx #<duke_sprite_shooting_right
lda #>duke_sprite_shooting_right
dec DUKE_SHOOTING
jmp actually_draw_duke
check_walking_right:
@ -85,6 +86,7 @@ check_shooting_left:
draw_shooting_left:
ldx #<duke_sprite_shooting_left
lda #>duke_sprite_shooting_left
dec DUKE_SHOOTING
jmp actually_draw_duke
check_walking_left:
@ -174,14 +176,14 @@ duke_sprite_falling_left:
duke_sprite_shooting_right:
.byte 4,4
.byte $AA,$dd,$bd,$AA
.byte $AA,$d3,$Ab,$AA
.byte $AA,$3d,$Ab,$AA
.byte $AA,$b7,$A7,$AA
.byte $AA,$56,$56,$AA
duke_sprite_shooting_left:
.byte 4,4
.byte $AA,$bd,$dd,$AA
.byte $AA,$Ab,$d3,$AA
.byte $AA,$Ab,$3d,$AA
.byte $AA,$A7,$b7,$AA
.byte $AA,$56,$56,$AA

View File

@ -43,6 +43,7 @@ duke_start:
sta INVENTORY
sta DUKE_FALLING
sta DUKE_SHOOTING
sta KICK_UP_DUST
lda #$10
sta SCORE0

View File

@ -1,4 +1,4 @@
JUMP_HEIGHT = 9
JUMP_HEIGHT = 8
;==============================
; Handle Keypress
@ -216,6 +216,9 @@ return_pressed:
lda DUKE_DIRECTION
sta LASER_DIRECTION
lda #2
sta DUKE_SHOOTING
cmp #1
beq laser_right
laser_left:

View File

@ -273,10 +273,25 @@ scroll_fall:
feet_on_ground:
;===========================
; if had been falling
; kick up dust, make noise
; stop walking?
lda DUKE_FALLING
beq was_not_falling
; clear falling
lda #0
sta DUKE_FALLING
lda #2
sta KICK_UP_DUST
lda #0
sta DUKE_WALKING
was_not_falling:
; check to see if Y still hi, if so scroll back down
lda DUKE_Y

View File

@ -109,6 +109,7 @@ UPDATE_STATUS = $94
DUKE_FALLING = $95
DUKE_SHOOTING = $96
KICK_UP_DUST = $97
; done game puzzle state