Commit 67f83a66 authored by bocianu's avatar bocianu

2 levels added, dl fixes

parent 4b2cc96a
- better random dir
- sound for goal reached and fruit - sound for goal reached and fruit
- 2 hard levels to reach 30 - 2 hard levels to reach 30
......
...@@ -23,13 +23,15 @@ levels_list ...@@ -23,13 +23,15 @@ levels_list
dta a(level_23) ;20 ; snake - medium hard dta a(level_23) ;20 ; snake - medium hard
dta a(level_21) ;21 ; azteca - hard dta a(level_21) ;21 ; azteca - hard
dta a(level_6) ;22 ; SQUARES 2 - HARD !!! dta a(level_28) ;22 ; square bubbles - hard
dta a(level_9) ;23 ; - hard dta a(level_6) ;23 ; SQUARES 2 - HARD !!!
dta a(level_14) ;24 ; whatta mess - hard dta a(level_29) ;24 ; carpet clean - hard
dta a(level_27) ;25 ; curved pipes - hard! - keep running (pill is a trap) dta a(level_9) ;25 ; - hard
dta a(level_16) ;26 ; heart - hard hard hard - dta a(level_14) ;26 ; whatta mess - hard
dta a(level_18) ;27 ; serpent runner - hard tactics dta a(level_27) ;27 ; curved pipes - hard! - keep running (pill is a trap)
dta a(level_8) ;28 ; boxes - HARD !!! tactics dta a(level_16) ;28 ; heart - hard hard hard -
dta a(level_18) ;29 ; serpent runner - hard tactics
dta a(level_8) ;30 ; boxes - HARD !!! tactics
dta a(0) dta a(0)
...@@ -1993,11 +1995,122 @@ warps_end ...@@ -1993,11 +1995,122 @@ warps_end
.endl ; level size: 111 bytes .endl ; level size: 111 bytes
;; square bubbles - hard
.local level_28
dta 10,46 ; starting pos - x,y
dta 10,0 ; exit pos - x,y
dta 1,2,3,4 ; ghost AI levels (1 dumb - 9 ninja)
dta 5 ; ghost spawner delay in seconds
dta 15 ; pill mode length in seconds
dta a(0) ; how much dots can remain to open exit
dta $9c,$94,$00,COLOR_PACMAD,$92 ; colors
; dots
dta TILE_DOT,[dots_end-(* + 1)]/4
dta 10,0,1,2
dta 3,1,15,5
dta 5,3,11,7
dta 7,7,7,7
dta 1,7,5,1
dta 15,7,5,1
dta 3,15,15,7
dta 1,17,5,13
dta 15,17,5,13
dta 9,11,3,19
dta 3,23,15,5
dta 7,19,7,7
dta 7,29,7,7
dta 3,32,15,8
dta 1,34,5,4
dta 15,34,5,4
dta 7,37,7,7
dta 9,41,3,5
dta 10,46,1,1
dta 10,3,1,7
dots_end
; pills
dta TILE_PILL,[pills_end-(*+1)]/2
dta 10,45
dta 10,29
dta 10,15
dta 10,5
pills_end
; spawners
dta TILE_SPAWNER,[spawners_end-(*+1)]/2
dta 10,22
dta 10,42
dta 10,12
spawners_end
; warps
dta TILE_WARP_LEFT,warps_end-(* + 1)
dta 7
dta 17
dta 29
dta 34
dta 37
warps_end
dta $ff
.endl ; level size: 121 bytes
;; carpet clean - hard
.local level_29
dta 10,30 ; starting pos - x,y
dta 10,0 ; exit pos - x,y
dta 1,2,3,4 ; ghost AI levels (1 dumb - 9 ninja)
dta 5 ; ghost spawner delay in seconds
dta 20 ; pill mode length in seconds
dta a(0) ; how much dots can remain to open exit
dta $bc,$c4,$00,COLOR_PACMAD,$d2 ; colors
; dots
dta TILE_DOT,[dots_end-(* + 1)]/4
dta 10,0,1,2
dta 1,1,10,1
dta 12,1,8,1
dta 12,2,1,2
dta 2,3,17,3
dta 2,7,17,3
dta 2,11,17,3
dta 4,3,3,13
dta 14,3,3,13
dta 9,3,3,13
dta 2,15,17,5
dta 4,17,13,7
dta 6,21,9,5
dta 8,17,5,11
dta 10,19,1,12
dots_end
; pills
dta TILE_PILL,[pills_end-(*+1)]/2
dta 2,19
dta 18,19
pills_end
; spawners
dta TILE_SPAWNER,[spawners_end-(*+1)]/2
dta 5,4
dta 15,6
dta 5,8
dta 15,10
dta 5,12
dta 15,14
spawners_end
; warps
dta TILE_WARP_LEFT,warps_end-(* + 1)
dta 1
warps_end
dta $ff
.endl ; level size: 99 bytes
;; ************************** LEVELS END ;; ************************** LEVELS END
......
rmt_player RMTPLAY 'assets/rmt.feat' 0 rmt_player RMTPLAY 'assets/rmt.feat' 0
rmt_modul RMT 'assets/pacmad_strip_mono.rmt' rmt_modul RMT 'assets/pacmad_strip_mono2.rmt'
v 1.0
changes:
- 20 new levels !! (total 30)
- game balance - now difficulty gradually increases.
- bonus fruits - randomly appears in 3 variants
- now each ghost can have different ai level
- score presented on game ending and on hsc matrix
- level selection on title screen
- new sound FX
- cheat mode added
- some speed optimizations and improvements
- visual improvements
zmiany:
- 20 nowych poziomów, łącznie 30,
- balans i zmiana kolejności poziomów,
- bonusy w postaci losowo pojawiających się owoców (w 3 wariantach)
- każdy duszek ma teraz osobne AI,
- wynik prezentowany na zakończenie gry i na matrycy HSC,
- możliwość wyboru startowego poziomu klawiszem SELECT,
- nowe efekty dzwiękowe,
- ukryty 'cheat mode',
- oprymalizacje szybkości,
- drobne poprawki graficzne
//const dl_null : array [0..3] of byte = (0,0,0,0);
const DL_game: array [0..23] of byte = var DL_game: array [0..23] of byte =
( (
DL_BLANK8, // 8 blank lines DL_BLANK8, // 8 blank lines
DL_DLI + DL_BLANK8, // 8 blank lines DL_DLI + DL_BLANK8, // 8 blank lines
...@@ -19,11 +18,11 @@ const DL_game: array [0..23] of byte = ...@@ -19,11 +18,11 @@ const DL_game: array [0..23] of byte =
DL_DLI + DL_VSCROLL + DL_MODE_40x12T5, DL_DLI + DL_VSCROLL + DL_MODE_40x12T5,
DL_DLI + DL_VSCROLL + DL_MODE_40x12T5, DL_DLI + DL_VSCROLL + DL_MODE_40x12T5,
DL_MODE_40x12T5, DL_MODE_40x12T5,
DL_JVB, Lo(word(@DL_game)), Hi(word(@DL_game)) // jump to start DL_JVB, Lo(DLG), Hi(DLG) // jump to start
); );
const DL_LEVEL: array [0..31] of byte = var DL_LEVEL: array [0..31] of byte =
( (
DL_BLANK8, // 8 blank lines DL_BLANK8, // 8 blank lines
DL_BLANK8, // 8 blank lines DL_BLANK8, // 8 blank lines
...@@ -35,10 +34,10 @@ const DL_LEVEL: array [0..31] of byte = ...@@ -35,10 +34,10 @@ const DL_LEVEL: array [0..31] of byte =
DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4,
DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4,
DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4, DL_MODE_40x24G4,
DL_JVB, Lo(word(@DL_LEVEL)), Hi(word(@DL_LEVEL)) // jump to start DL_JVB, Lo(DL), Hi(DL) // jump to start
); );
const DL_TITLE: array [0..57] of byte = var DL_TITLE: array [0..57] of byte =
( (
DL_BLANK8, // 8 blank lines DL_BLANK8, // 8 blank lines
DL_DLI + DL_BLANK8, // 8 blank lines DL_DLI + DL_BLANK8, // 8 blank lines
...@@ -51,6 +50,6 @@ const DL_TITLE: array [0..57] of byte = ...@@ -51,6 +50,6 @@ const DL_TITLE: array [0..57] of byte =
DL_DLI + DL_BLANK8, // 8 blank lines DL_DLI + DL_BLANK8, // 8 blank lines
DL_LMS + DL_MODE_40x24T2, Lo(TXT_RAM+40), Hi(TXT_RAM+40), DL_LMS + DL_MODE_40x24T2, Lo(TXT_RAM+40), Hi(TXT_RAM+40),
2,2,2,2,2,2,2,2,2,2,2,DL_DLI + 2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,DL_DLI + 2,2,2,2,
DL_JVB, Lo(word(@DL_TITLE)), Hi(word(@DL_TITLE)) // jump to start DL_JVB, Lo(DL), Hi(DL) // jump to start
); );
...@@ -9,10 +9,13 @@ const ...@@ -9,10 +9,13 @@ const
LOGO_ADDRESS = $8000; LOGO_ADDRESS = $8000;
LEVELS_ADDRESS = LOGO_ADDRESS + 1080; LEVELS_ADDRESS = LOGO_ADDRESS + 1080;
STRINGS_ADDRESS = $B000; DL = $AE00;
DLG = $AE80;
rmt_player = $b500; STRINGS_ADDRESS = $AF00;
rmt_modul = $B900;
rmt_player = $b400;
rmt_modul = $B800;
PMGBASE = $C000; PMGBASE = $C000;
CHARSET_GAME_ADDRESS = PMGBASE + $400; CHARSET_GAME_ADDRESS = PMGBASE + $400;
...@@ -55,10 +58,10 @@ const ...@@ -55,10 +58,10 @@ const
COLOR_ESCAPE = $76; COLOR_ESCAPE = $76;
COLOR_ESCAPE_BLINK = $0F; COLOR_ESCAPE_BLINK = $0F;
// ai helper tables
joy2dir : array [0..15] of byte = (8,2,0,8,1,8,8,8,3,8,8,8,8,8,8,8); joy2dir : array [0..15] of byte = (8,2,0,8,1,8,8,8,3,8,8,8,8,8,8,8);
n2dir : array [0..15] of byte = (8,0,2,8,3,8,8,8,1,8,8,8,8,8,8,8); n2dir : array [0..15] of byte = (8,0,2,8,3,8,8,8,1,8,8,8,8,8,8,8);
dirs : array [0..3] of byte = (1,2,4,8);
// max number of board features (can be increased) // max number of board features (can be increased)
SPAWNERS_NUM = 10; SPAWNERS_NUM = 10;
......
...@@ -121,8 +121,7 @@ begin ...@@ -121,8 +121,7 @@ begin
lda vscrollstep ; set vscroll lda vscrollstep ; set vscroll
asl asl
sta _ATARI._VSCROL sta _ATARI._VSCROL
mwa dltop DLG+7 ; set DL GFX address
mwa dltop adr.DL_game+7 ; set DL GFX address
inc _ATARI._RTCLOK+2 inc _ATARI._RTCLOK+2
......
...@@ -365,7 +365,10 @@ begin ...@@ -365,7 +365,10 @@ begin
TILE_DOT: begin TILE_DOT: begin
AddScore(10); AddScore(10);
Inc(food); Inc(food);
if dotCount>0 then Dec(dotCount); if dotCount>0 then begin
Dec(dotCount);
if dotCount=0 then msx.Sfx(4, 2, 12);
end;
UpdateFood; UpdateFood;
SetBoard(pac.x, pac.y, TILE_EMPTY); SetBoard(pac.x, pac.y, TILE_EMPTY);
end; end;
...@@ -394,6 +397,7 @@ begin ...@@ -394,6 +397,7 @@ begin
AddScore(500); AddScore(500);
bonusCountdown:=100; bonusCountdown:=100;
SetBoard(bonusX,bonusY,TILE_500); SetBoard(bonusX,bonusY,TILE_500);
msx.Sfx(5, 2, 12);
end; end;
end; end;
end; end;
...@@ -608,11 +612,16 @@ begin ...@@ -608,11 +612,16 @@ begin
end; end;
function RandomDir(mask: byte): byte; function RandomDir(mask: byte): byte;
begin var a:array[0..3] of byte;
repeat ai:byte;
result := 1 shl Random(4); begin
until (result and mask) <> 0; ai:=0;
result := n2dir[result]; for result:=0 to 3 do
if dirs[result] and mask <> 0 then begin
a[ai]:=dirs[result];
inc(ai)
end;
result := n2dir[a[Random(ai)]];
end; end;
function Reverse(dir: byte): byte; function Reverse(dir: byte): byte;
...@@ -976,7 +985,8 @@ begin ...@@ -976,7 +985,8 @@ begin
Pause; Pause;
setDli(@Dli1T); setDli(@Dli1T);
_CHBASE := Hi(CHARSET_TITLE_ADDRESS); _CHBASE := Hi(CHARSET_TITLE_ADDRESS);
_SDLSTL_ := word(@DL_title); Move(DL_title,pointer(DL),64);
_SDLSTL_ := DL;
_COLOR4_ := 0; _COLOR4_ := 0;
PMG_clear; PMG_clear;
ClearTxT; ClearTxT;
...@@ -1097,7 +1107,8 @@ procedure ShowLevelScreen; ...@@ -1097,7 +1107,8 @@ procedure ShowLevelScreen;
begin begin
ClearTxT; ClearTxT;
Pause; Pause;
_SDLSTL_ := word(@DL_LEVEL); Move(DL_LEVEL,pointer(DL),Length(DL_LEVEL));
_SDLSTL_ := DL;
_COLOR4_ := 15; _COLOR4_ := 15;
PMG_clear; PMG_clear;
end; end;
...@@ -1211,7 +1222,8 @@ procedure InitGameScreen; ...@@ -1211,7 +1222,8 @@ procedure InitGameScreen;
begin begin
Pause; Pause;
setDli(@Dli1); setDli(@Dli1);
_SDLSTL_ := word(@DL_game); Move(DL_game,pointer(DLG),Length(DL_game));
_SDLSTL_ := DLG;
_VSCROL := 0; _VSCROL := 0;
PMG_clear; PMG_clear;
end; end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment