From: Mischa Poslawsky Date: Thu, 29 Jun 2000 17:19:44 +0000 (+0200) Subject: version 0.98 pre2: minor fixes and updates X-Git-Url: http://git.shiar.net/nemesis.git/commitdiff_plain/68c5a64ac96152091939da019e24abc26e199388 version 0.98 pre2: minor fixes and updates * at status bar left below ships are displayed for lives left * armor bar is two pixels high (better visible) # bullet overflow fixed again (>63 bullets fired) # correct weapon loaded when continuing a saved game # game froze when generating a random value <=1 * you explode in a different way than the enemies + screen inverts for a brief time when you are hit! # stats-bar was messed up when ya got 0 lives left * new (big) boss modeled after a common MSX Nemesis2-boss * score increased once every 32 frames (instead of every 256) # ground fixed for new random routine (smaller routine; incs -2 to 2) --- diff --git a/nemesis.txt b/nemesis.txt index 16ec69c..b2ec955 100644 --- a/nemesis.txt +++ b/nemesis.txt @@ -1,36 +1,27 @@ ------------------------------------------------------------------------------ Title : Nemesis - Version : 0.96.A31 Beta - Release Date : 31.X.99 - Filename : nemesis.86p (size 4842) + Version : 0.97.629 Beta + Release Date : 29.VI.00 + Filename : nemesis.86p (size 6kb) Author(s) : Shiar - Email Address : shiar@mailroom.com + Email Address : shiar0@hotmail.com ICQ : #43840958 - Web Page : http://come.to/shiar + Web Page : http://www.shiar.org Description : cool arcade-shoot-em-up-game - Where to get this game : www.ticalc.org - Other games by author : N/Y - Additional credits to : See bottom + Where to get this game : www.shiar.org | www.ticalc.org + Other games by author : Worm ->>>>>>> NOTE ON V.96 --------------------------------------------------------- +>>>>>>> NOTE ON V.97 --------------------------------------------------------- - YES! NEMESIS was on the NEWS in TICALC.ORG! With a nice screenshot so you -just couldn't ignore it!! And my, I received a lot of messages. Thanks to -everybody, I'm very happy! - - More happiness: a new update featuring alot of bug fixes (Nemesis has now -got some good beta-testers!), bosses, weapon-upgrades, LEFT+DOWN-bug fixed -(THANKS2 BRIAN KOROPOFF!), teacher key, armor-bar, hiscorenames, external -levels, and much more. Again thank you all and keep sending me stuff! -I really appreciate it! + Still under construction. Don't distribute. >>>>>>> INTRO TO NEMESIS ----------------------------------------------------- Nemesis is an old arcade-game for many platforms, originally for arcades. I first played Nemesis III for the MSX (1988), but Konami made at least -> 41 < Nemesis-games (mostly named Nemesis, Gradius, Salamander, Parodius) +* 41 * Nemesis-games (mostly named Nemesis, Gradius, Salamander, Parodius) for systems including the Game Boy, (S)NES and Play Station. @@ -43,9 +34,9 @@ Arrow keys : move ALPHA : select powerup MORE : pause EXIT : exit -GRAPH : teacher! (press graph again to resume) +GRAPH : teacher/boss! (press graph again to resume) - In main menu you can press F1 to toggle b<>w (will not be saved... yet). + In main menu you can press F1 to toggle b<>w. A game can be saved by pressing F1 at the level-screen. @@ -53,10 +44,12 @@ GRAPH : teacher! (press graph again to resume) Collect the pickups enemies leave after they're destroyed to upgrade your ship. The highlighted icon in the score bar (bottom) can be activated by -pressing ALPHA. The number in the first icon shows your shield-points left. -This icon can be chosen more than once, to increase your shield-points. +pressing ALPHA. + + Upgrades: ARMOR | TORPEDO | WEAPON-UPG | LASER | MULTIPLES - Other upgrades: ARMOR/SHIELD | TORPEDO | WEAPON-UPG | LASER | MULTIPLES + The upper bar on the left shows your hitpoints left (armor). The bar below +that shows the current power of your weapon. >>>>>>> BETA STUFF ----------------------------------------------------------- @@ -64,10 +57,7 @@ This icon can be chosen more than once, to increase your shield-points. There are just seven levels for now, don't try to get to level eight. Things to come: -* compressed level-files -* different enemies in one level * save options (like b<>w) -* boss key (saves game and quits) * more LEVELS!! more enemies more upgrades more story * maybe obstacles? * source code release @@ -77,8 +67,9 @@ Things to come: program, or even send me something if you don't. Again: shiar@mailroom.com, or ICQ #43840958! PLEASE! - Tested on TI86es (and emulators) with ROM 1.4 and 1.6 using YAS, Rascall and -Asm(. Nemesis will NOT run correctly under RASCALL with the memory LOCKED! + Tested on TI86es (and emulators) with ROM 1.2, 1.4 and 1.6 using YAS, +Rascall and Asm(. Nemesis will NOT run correctly under RASCALL with the +memory LOCKED! >>>>>>> CREDITS -------------------------------------------------------------- @@ -100,77 +91,10 @@ Asm(. Nemesis will NOT run correctly under RASCALL with the memory LOCKED! * Damage to you, your calc, or anything else was not caused by Nemesis and I am certainly not responsible -* One shall NOT release an altered version of Nemesis -* This documentation must be included with distribution (except calc2calc) -* No money shall be asked for this program -* Eat plenty of vegetables every day - - ->>>>>>> HISTORY -------------------------------------------------------------- - -Most significant version changes since version 0.61. - - Version 0.7 Beta Size:2303 02.IX - -* contrast is increased at startup -* invulerable when entering the game (your ship looks different too) -* hitpoints/shield. some enemies leave pickups which increase your shield -* fixed the fake bullets-bug - - Version 0.8 Beta Size:2433 03.IX - -* enemies move individually, not all at the same time -* enemies fire once every x time instead of randomized -* changed: enemies removed correctly, screen cleared at quit, enemies don't - move off screen (above or below edge), levels rebuild - - Version 0.9 Beta Size:2693 04.IX (first major release) - -* multiple pickups can be collected, and activated by pressing F2 -* two pickups select torpedo, one selects shield increase -* you have 4 lives. Dieing will decrease lives and restart in the same level -* fixes: pickups no longer fire bullets, randomizer fixed, game over quits - - Version 0.91Beta Size:2797 05.IX - -* fourth icon selects laser -* fifth icon selects multiples (like the shadow multiples in Nemesis) -* most data no longer stored in program, saving a lot of bytes - - Version 0.92Beta Size:2831 08.IX - -* Laserbeam lasts for five turns, making it more powerfull -* Bullets and enemies are removed at the beginning of a level -* Pickups don't appear random anymore, but after destroying x enemies -* Bugs fixed: fifth icon select, firing bullets, invulerability - - Version 0.93Beta Size:3098 11.IX (second major release) - -* Counts score and saves highest score -* Pickups move slower, keys changed to 2nd and Alpha -* Multiples move only when you move (like in MSX-Nemesis) -* A lot of small fixes and changes (really a lot of them) - - Version 0.94Beta Size:4456 08.X (yet another release; ticalc news) - -* Two-layer starfield scrolling in the background -* Enemies can move at different speeds or move patterns and can aim bullets -* Ground scrolling at bottom and ceiling scrolling @ top (also tunnel-effect) -* Main menu, levels changed, bugs fixed, enemy firing rate differs, and more - - Version 0.95Beta Size:5285 21.X - -* Boss at the end of a level -* Bullet-upgrades (speed/multiple bullets) and 3-bullet limit -* Graph cleared, unintended pixels removed, prog reload, major bugfixes -* When you got a hiscore, you can enter your name - - Version 0.96Beta Size:4842 31.X - -* Armor-bar and enemy-bullets doing 1/4 damage (can vary per level) -* External levels (in nemesis0.86p) storing level/enemy-data and story -* You move faster, ground at boss, more bugs fixed, code optimized -* Game can be saved at start of a level (continue game does work now) +* Thou shallt NOT release an altered version of Nemesis +* Thou shallt include this documentation with distribution (except calc2calc) +* Thou shallt not ask money for this program +* Thou shallt eat plenty of vegetables every day ----------------------------------------------------------------------- <<<<<<< +---------------------------------------------------------------------- <<<<<<< \ No newline at end of file diff --git a/nemesis.z80 b/nemesis.z80 index 6d958b2..9b62f3a 100644 --- a/nemesis.z80 +++ b/nemesis.z80 @@ -57,6 +57,7 @@ nextevent = eventleft+1 ; +6 ;time to next event level_enemy = nextevent+1 ; +7 ;enemy type level_info = level_enemy+1 ; +8 ;info (see below) level_move = level_info+1 ; +9 ;= +time2invert = level_move+1 ;+10 ;time until b<>w switch ; ;--------OBJECTS spacespace = storepos+19 ;+19 groundinfo = spacespace+1 ;+20 @@ -229,18 +230,15 @@ menuloop: jr z,menuchange cp K_EXIT jr z,menuexit - ld hl,_invert cp K_F1 - cal z,undo_invert - cp K_F2 cal z,do_invert cp K_ENTER jr nz,menuloop ld a,(menuitem) dec a - cal nz,New_game - jp samelevel ;game_main_loop + cal nz,New_game ;NEW GAME + jp samelevel ;CONTINUE: game_main_loop menuexit: ld hl,0 @@ -253,11 +251,15 @@ menuchange: ld (menuitem),a jr menuloop -do_invert: - ld (hl),$2F ;cpl - ret -undo_invert - ld (hl),$B7 ;or a +do_invert: ;invert screen (b<>w); destr:b + psh hl + ld b,a ;psh a + ld hl,_invert + ld a,$98 + xor (hl) ;$2F (cpl) <-> $B7 (or a) + ld (hl),a + ld a,b ;pop a + pop hl ret ;---------------------------------------------------------------------------- @@ -267,9 +269,10 @@ undo_invert game_main_loop: ;REPEATS FROM HERE EVERY FRAME ld hl,timer ;update time inc (hl) ;increase by 1 - jr nz,Clear_screen ;continue when new time <> 0 - ld hl,1 ;once every 256 frames, increase score by 1 - cal scoreInc ;do it + ld a,(hl) + and %11111 + ld hl,1 ;once every 32 frames, increase score by 1 + cal z,scoreInc ;do it Clear_screen: ld hl,GRAPH_MEM ;move from (hl) = top left @@ -354,7 +357,10 @@ _gamestuff1: cal Level_event ;insert enemies cal Display_Screen ;display all + ld b,1 +___: halt ;delay + dnz ___ jp game_main_loop ;LOOP ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ inc_weapdamage: @@ -399,31 +405,30 @@ Handle_ground: jr z,ground_tunnel ;tunnel effect ground_boring: ld a,(groundpos) ;type 0 + jr newground+1 ground_tunnel: ld a,(groundpos+14) ld d,a ld hl,spacespace - - ld bc,$201 ;range=1..3 - cal Random ;a=1-3 - dec a - jr z,newground ;same if a=1 - dec a - jr z,gtunneldown ;down if a=2 -gtunnelup: ;up if a=3 - ld a,(hl) + ld bc,$500 ;range=0..4 + cal Random ;a=0..4 + dec a ;a=-1..3 + dec a ;a=-2..2 + ld b,a + add a,(hl) ;add to spacesize (so +2..-2) + cp 10 + jr c,newground ;>=0 then don't change + ld c,a + ld a,d + add a,b ;new position or a - jr z,newground ;a>=0 (a=0 actually) - inc (hl) - inc d - jr newground -gtunneldown: - ld a,1 - cp d - jr z,newground - dec d - dec (hl) + jr z,newground ;may not be 0 (=256) + cp -10 + jr nc,newground ;and not be <0 (>246) +diffground: + ld d,a + ld (hl),c newground: ld a,d ld (groundpos+15),a ;save new byte on the right @@ -678,13 +683,22 @@ displayloop: ld b,16 ;display width = 16 bytes (16*8bits=256pixels) displaytloop: ld a,(hl) ;copy byte from (hl) -_invert: - cpl ;xor $ff: invert byte (white<=>black) +_invert: ;SMC: cpl <-> or a + cpl ;xor $ff: invert byte (white<=>black) ld (de),a ;to (de) inc hl \ inc de ;next byte dnz displaytloop ;16x hl >> de dec c ;next line - jr nz,displayloop ;loop 64x + jr nz,displayloop ;loop 56x + + ld hl,time2invert + ld a,(hl) + or a ;(time2invert)=0: + jr z,noinvert ; do nothing + dec a ;otherwise decrease + cal z,do_invert ;if it became 0 then invert + ld (hl),a ;save new value +noinvert: ld hl,$396b ;Display Score ld (_penCol),hl ;bottom right of screen @@ -715,9 +729,9 @@ Handle_Ship: inc a ;no! next (explosion)frame ld (your_occ),a ;save - cp 34 ;last explosion frame? + cp 64+1 ;last explosion frame? (1-16=1st;49-64=4th) jp c,exploding_you ;not yet: display explosion - cp 40 ;delay finished? + cp 64+16 ;delay finished? jp z,You_die ;yes = game over ret ;don't display anything @@ -781,6 +795,7 @@ no_right: no_up: ld e,(hl) ;e=y ld ix,spr_ship01 ;normal ship sprite +your_shipspr =$-2 ld hl,your_inv ;invulnerable? ld a,(hl) ;load time in a or a ;is it 0? @@ -794,7 +809,8 @@ not_time: and %00000100 ;a switches 0<->1 every 2 frames jr z,disp_ship ;show normal ship inv_flicker: - ld ix,spr_ship01i ;display invulnerable ship + ld bc,spr_ship01i-spr_ship01 + add ix,bc ;display invulnerable ship disp_ship: cal safeputsprite ;display your ship; save de @@ -841,16 +857,17 @@ mult_adv: exploding_you: srl a ;half the framerate - dec a ;first frame is 1>inc>srl>dec = 0 + srl a ;half that framerate + srl a ;and half again that framerate ld hl,x-1 + ld ix,spr_yexplosion ;base sprite -explosion_stuff: ;in:a=frame*2+(0 to 1); (hl)=xpos-- +explosion_stuff: ;in:a=frame*2+(0 to 1); (hl)=xpos-- ix=sprite and %11111110 add a,a add a,a ;frame*8 ld c,a ld b,0 ;bc=a - ld ix,spr_explosion ;base sprite add ix,bc ;go to correct sprite (each spr. is 8 bytes) inc hl ld d,(hl) ;load xpos @@ -861,9 +878,18 @@ explosion_stuff: ;in:a=frame*2+(0 to 1); (hl)=xpos-- ;----hit---- damage_you: ;damages you B points - ld a,(your_inv) ;invulnerability left? + ld a,(your_inv) ;shield left? or a - ret nz ;return if inv>0 + jr z,dothadamage ;no shield + srl b ;shield: half the damage +dothadamage: + ld hl,time2invert + xor a ;a=0 + cp (hl) ;no already inverted? + cal z,do_invert ;then invert screen + ld a,2 + ld (hl),a ;change back 2 frames from now + ld hl,your_armor ;armor left ld a,(hl) ;load hp in A sub b ;decrease hp by B @@ -1098,8 +1124,7 @@ find_ybullet: jr z,found_ybullet ;0 = no bullet here add hl,de dnz find_ybullet ;look next bullet - pop hl ;don't try to fire any other bullets - ret ;so ret twice + ret ;none found, return don't fire found_ybullet: ld (hl),c ;use the bullet and set correct bullet-type @@ -1196,7 +1221,7 @@ display_bullet: dec hl ;@x dec hl ;@damage ld a,(hl) ;bullet damage=size - ld hl,XLbullettable ;pointer to first bullet + ld hl,bullettable ;pointer to first bullet srl a srl a ;per 4 ld d,0 @@ -1361,8 +1386,9 @@ Level_event: or a ;has it reached zero? ret nz ;nope: get outta here! - ld a,0 ;enemy frequency (lvl) -eventtime =$-1 + ld bc,0 ;enemy frequency (lvl) +eventtime =$-2 + cal Random ld (nextevent),a ;set time to next event ld hl,eventleft dec (hl) ;update enemy-counter @@ -1707,6 +1733,8 @@ exploding_enemy: jr z,remove_enemy ;remove when at last frame inc a ld (hl),a ;next frame + dec a ;1-16 -> 0-15 + ld ix,spr_explosion ;base sprite cal explosion_stuff ;display explosion jr next_enemy @@ -2047,7 +2075,22 @@ disp_icons: xor a ;blank line mask cal drawline ;clear scorebar - cal disp_lives +disp_lives: + ld de,5 ;(0,5) + ld a,(your_lives) ;nr of lives + or a + jr z,displivesdone ;no lives + ld b,a +displivesloop: + psh bc + ld ix,spr_lship + cal safeputsprite ;put li'l ship + ld a,lshipsize+1 + add a,d + ld d,a ;x=x+5 + pop bc + dnz displivesloop ;one ship per life +displivesdone: ld ix,spr_icon01 ;armorIcon ld de,$1901 ;icon #1 @@ -2120,11 +2163,15 @@ iconsdone: ret disp_armor: + ld de,16 ;line size ld hl,(57*16)+VIDEO_MEM+3 ld b,3 armorbarclr: dec hl ld (hl),0 + add hl,de + ld (hl),0 + sbc hl,de dnz armorbarclr ld a,(your_armor) ;load your armor @@ -2136,6 +2183,9 @@ armorbarclr: ld b,a ;loop b=a times armorbar: ;starting at ($39*16)+VIDEO_MEM ld (hl),%11111111 ;draw a piece of the bar + add hl,de ;one down (resets carry) + ld (hl),%11111111 ;same piece + sbc hl,de ;up again inc hl ;next position dnz armorbar ;loop it b times @@ -2151,15 +2201,18 @@ armorbarbit: dnz armorbarbit ;repeat B times (so if B=6 then a=%11111100) armorbarready: ; (an if B=3 then a=%11100000) ld (hl),a ;draw this last byte + add hl,de + ld (hl),a ;and just below ret disp_charge: - ld hl,(58*16)+VIDEO_MEM+3 + ld hl,(59*16)+VIDEO_MEM+3 ld b,3 chargebarclr: dec hl ld (hl),0 dnz chargebarclr + ld a,(weapincs) ;load bar size (0-80) srl a ;half the size (0-40) srl a ;again half that size (0-20 pixels) @@ -2172,7 +2225,7 @@ chargebarclr: chargebar: ;starting at ($39*16)+VIDEO_MEM ld (hl),%11111111 ;draw a piece of the bar inc hl ;next position - dnz armorbar ;loop it b times + dnz chargebar ;loop it b times nochargebar: ld a,c ;pop a and %111 ;display last bits of chargebar @@ -2187,36 +2240,30 @@ chargebarready: ; (an if B=3 then a=%11100000) ld (hl),a ;draw this last byte ret -disp_lives: - ld hl,$3A00 ;display Lives - ld (_penCol),hl ;bottom left - ld hl,savestr+2 - ld (hl),'L' - inc hl - ld (hl),'x' - inc hl - - ld a,(your_lives) ;nr of lives in a - add a,'0' ;make digit - ld (hl),a - dec hl \ dec hl - jp _vputs ;display on screen +ret - ;--------------------------- proc ------------------------------------------- Random: ;a=c=b - jr nc,Random ;then add again + psh hl + ld hl,rancount ;amount to increase with (0-255) +randomloop: + inc (hl) ;change for next time + ld a,r ;value $0-7F (can be _anything_ so watch out!) + add a,0 ;add to last random value +ranseed =$-1 ;SMC :P + add a,(hl) ;add the changing increase value + ;(this is because R can be anything; + ; ie always be even so freeze when a must be 1<=a<=1) + ld (ranseed),a ;save for next time + cp b ;a>=b + jr nc,randomloop ;then add again add a,c ;a63 bullets fired) +; # correct weapon loaded when continuing a saved game +; # game doesn't freeze when generating a random value <=1 +; * you explode in a different way than the enemies +; + screen inverts for a brief time when you are hit! +; # stats-bar was messed up when ya got 0 lives left +; * new (big) boss; "asteroids" level #1 +; * score increased once every 32 frames (instead of 256) +; # ground fixed for new random routine (smaller routine; incs -2 to 2) ; ; ; + added - removed * changed # bug fixed \ No newline at end of file