lemm: use common exploding code

also make it so you can't re-nuke
also stop lemmings from coming out if you nuke
This commit is contained in:
Vince Weaver 2022-03-29 22:45:57 -04:00
parent 1df80cc9c4
commit 4721e60d52
3 changed files with 54 additions and 12 deletions

View File

@ -1,3 +1,27 @@
Plan for future scrolling:
+ Foreground drawn with a tilemap
Write program to pick optimal tiles
5 wide screen = ? in size
Scroll the tilemap
+ Actual collision detection happens in offscreen buffer
Each pixel equivalent is one 7-pixel chunk wide
Should be small enough
Physics engine happens entirely on that
Heights for detection:
Walking lemming = 10 high
Floating lemming = 16 high
Detect ground (walking) = y+10?
Detect in ground (need to bump up) = ?
Height we detect wall collision = ?
LEMM: 23782 (original v0.01)

View File

@ -1,17 +1,16 @@
+ draw roughly circular bg destruction when lemming explodes
+ wait a second after last lemming gone to exit
+ update the "in" %
+ dig off the map, end level
+ fill in some of the ground so we don't get stuck when digging
+ "Out" counter is only printed to page1 so gets erased by cursor
+ Falling too far and you go splat
+ See if the jerky animation is due to starting at an odd x vs
even x, maybe we should start animation 4 frames in if that's
the case. Or maybe it's the shift for odd frames, make
the shift the other way if walking left/right
+ Add floater
+ Add stopper
+ Add climber
+ Add basher
+ Add builder
+ Make particles thicker? Look fine, not show up in recordings
+ Erase particles as last step
+ when nuke, they should stop coming out of the door
+ offset the frames when nuking so not simultaneous
@ -19,6 +18,5 @@
+ nuke/exploding should not happen if lemming is splatting
or already exploding
+ green flame for ice level
+ green flame for ice level?

View File

@ -313,8 +313,7 @@ make_floater:
; make exploding
;========================
make_exploding:
lda #1
sta lemming_exploding,Y
jsr explode_lemming
jmp done_keypress
@ -518,13 +517,15 @@ done_plus_adjust:
;============================
;============================
; TODO: offset them a bit so it's not simultaneous
; FIXME: also stop more from coming out the door
nuke_button:
lda #1
; stop lemmings from exiting
lda #0
sta LEMMINGS_TO_RELEASE
ldy #0
nuke_loop:
sta lemming_exploding,Y
jsr explode_lemming
iny
cpy #MAX_LEMMINGS
bne nuke_loop
@ -555,3 +556,22 @@ pause_button:
done_menu:
rts
;=====================
;=====================
; explode lemming
;=====================
;=====================
; which is in Y
explode_lemming:
; only explode if not already exploding
lda lemming_exploding,Y
bne skip_explode
lda #1
sta lemming_exploding,Y
skip_explode:
rts