A downloadable game

Zombie Apocalypse Simulator - a 10 line game for 64k Atari 800xl

Written by Craig Miller aka PREPPIE aka @Retro-Homebrew

Category: PUR-80


STORY:

You play a survivor in the zombie apocalypse.  CDCs from around the world have been working on an anti-virus, and they have air dropped their parts to a safe location.  Your job is to combine the individual work of the CDCs into a final compound and disperse it into the atmosphere to end the zombie plague.  Unfortunately a number of zombies have broke into the safe zone, so you must avoid these while doing your vital work.  Hurry, people are dying every second around the world and only you can save them.


GAMEPLAY

You control the player that starts at the top of the screen.  Use the joystick to walk around and push the crates.  When you push two identical crates together they will combine into a new crate.  Once all crates have been combined into the final anti-virus, give it one more push to disperse it into the atmosphere.

Don't worry about a crate getting stuck on the wall, keeping push and you'll flip it around.  What you need to worry about are those zombies, avoid them or block their path with a crate, because a single touch means death.

If you die you will be given a score of zero, but if you succeed you will be shown how fast you saved the world (lower score is faster and better).  Either way this is just a simulator to get you ready for the actual event.  Try again (by typing RUN<enter>) and see if you can beat your time, you need the practise as the real event starts soon.


***** 10 line listing *****

0DIMZ(9),R(9),w$(99):GR.28:C.34:F.I=1TO9:R(I)=22:Z(I)=I*4:N.I:DR.39,0:DR.39,23
1w$="***CHARACTER SET DATA,THIS FILE CAN'T SHOW ATASCII CHARACTERS***":F.I=1TO64
2POKEI+24583,ASC(W$(I,I)):N.I:POKE756,96:Q=39840:X=Q+60:DR.0,23:DR.0,0:F.I=0TO31
3J=Q+INT(RND(0)*720)+80:K=PEEK(J):POKEJ,K+3*(K=0):I=I-(K>0):N.I:F.E=1TO1:B=B+1
4B=B*(B<9)+(B>8):S=STICK(0):Y=(S=7)-(S=11)+((S=13)-(S=14))*40:T=PEEK(X+Y):L=Z(B)
5J=PEEK(X+Y+Y):P=Y*((J=0ORJ=T)ANDT>2):X=X+Y*(T=0)+P:X=X+Y*(J=2ANDT>2):SO.0,0,0,0
6SO.0,33,11+(T=J)*(T>2),(T+1)*(S<15):POKEU-(U=X)*999,T*(J=2ANDT):M=R(B):H=H+1
7POKEX+P-(U=X)*999,T+(T=J):POKEX,1:O=INT((X-Q)/40):N=X-Q-O*40:A=(N>L)-(N<L)
8D=(O>M)-(O<M):LOC.L+A,M+D,V:K=V<33:C=L+A*K:G=M+D*K:POKEQ+L+M*40,(C=L)*(M=G)*129
9POKEQ+C+G*40,129:Z(B)=C:R(B)=G:E=(T>7)+(V=33):U=X:N.E:GR.2:?#6;H*(T<33)*(V<>33)


***** Expanded Listing and Documentation *****

[line 0]
{setup arrays, graphics, color 34 = wall gfx}
DIM Z(9),R(9),W$(99)
GRAPHICS 28
COLOR 34
{loop to setup array of zombie positions}
FOR I=1 TO 9
R(I)=22
Z(I)=I*4
NEXT I
{start drawing border wall}
DRAWTO 39,0
DRAWTO 39,23
[line 1]
{loop to insert charset data into memory}
W$="***CHARACTER SET DATA,THIS FILE CAN'T SHOW ATASCII CHARACTERS***"
FOR I=1 TO 64
[line 2]
POKEI+24583,ASC(W$(I,I))
NEXT I
POKE756,96
{Q is the absolute location of screen memory on a 64k machine, X is player start pos}
Q=39840
X=Q+60
{finish drawing border wall}
DRAWTO 0,23
DRAWTO 0,0
{loop to display boxes}
FOR I=0 TO 31
[line 3]
J=Q+INT(RND(0)*720)+80
K=PEEK(J)
POKEJ,K+3*(K=0):I=I-(K>0)
NEXT I
{Main game loop}
FOR E=1 TO 1
B=B+1 {B is array pointer to next zombie to move}
[line 4]
B=B*(B<9)+(B>8)
S=STICK(0)
Y=(S=7)-(S=11)+((S=13)-(S=14))*40 {Y is direction the player wants to move}
T=PEEK(X+Y) {T is contents of area the player wants to move}
L=Z(B) {L is Xpos of zombie}
[line 5]
J=PEEK(X+Y+Y) {J is contents of area beyond where player wants to move. ie. where a box will be pushed}
P=Y*((J=0 OR J=T) AND T>2) {These lines decide where the player will move to}
X=X+Y*(T=0)+P
X=X+Y*(J=2 AND T>2)
SOUND 0,0,0,0
[line 6]
SOUND 0,33,11+(T=J)*(T>2),(T+1)*(S<15) {play sound}
POKEU-(U=X)*999,T*(J=2 AND T) {erase player if he's moved, if no movement then poke area of memory off-screen to prevent flicker}
M=R(B) {Ypos of zombie}
H=H+1 {score/time}
[line 7]
POKE X+P-(U=X)*999,T+(T=J) {display the block that's pushed or merged, if no push then poke area of memory off-screen to prevent flicker}
POKE X,1 {display player in new pos}
O=INT((X-Q)/40) {O is Ypos of player)
N=X-Q-O*40 {N is Xpos of player}
A=(N>L)-(N<L) {Is player left (-1) or right(+1) or inline (0) with zombie}
[line 8]
D=(O>M)-(O<M) {as above for vertical}
LOCATE L+A,M+D,V {V is contents of where zombie wants to move}
K=V<33 {k=1 if zombie can move, k=0 if zombie is blocked}
C=L+A*K {C,G is x,y pos of where zombie wants to move}
G=M+D*K
POKE Q+L+M*40,(C=L)*(M=G)*129 {if zombie has moved then erase old zombie, if not then display zombie character to prevent flicker}
POKE Q+C+G*40,129 {display zombie in new position}
[line 9]
Z(B)=C {put x,y pos of zombie back into array}
R(B)=G
E=(T>7)+(V=33) {decides if game is over or not}
U=X {put old player pos into U var}
NEXT E {end of main game loop}
GRAPHICS 2
PRINT#6;H*(T<33)*(V<>33) {display score/time}


Download

Download
instructions.txt 2.3 kB
Download
README.txt 413 bytes
Download
zombies.atr 130 kB
Download
ZOMBIES.BAS 1.4 kB
Download
zombies.mp4 8.7 MB
Download
zombies.txt 3.5 kB

Install instructions

LOADING AND RUNNING INSTRUCTIONS:

1) Use the Altirra emulator (https://www.virtualdub.org/altirra.html)

2) Esure that Altirra is setup with a standard 64k Atari 800xl, the game may not work on other settings.

3) Loading ZOMBIES.BAS

a) Double click ZOMBIES.BAS, if Altirra has the BASIC cart installed the game will autorun

b) If it doesn't autorun then insert BASIC cart (file->Attach Special Cartridge->BASIC->ok)

c) Then file->Open Image->ZOMBIES.BAS

d) When the game ends you can LIST it or play again by typing RUN<enter>

4) Loading zombies.atr

a) Double click zombies.atr

b) If it goes straight to DOS you need to insert BASIC (file->Attach Special Cartridge->BASIC->ok)

c) type LOAD "D1:ZOMBIES.BAS"<enter>

d) You can now LIST or RUN the game.  to play again you need to type RUN<enter>

Leave a comment

Log in with itch.io to leave a comment.