Pacman1D (Oric Atmos) by RAX
A downloadable game
10 Line BASIC
=============
Category : PUR-80
TITLE : Pacman1D
PLATFORM : Oric Atmos
LANGUAGE : BASIC 1.1b
AUTHOR : Rax
VIDEO :
Paku Paku (also known as Pac-Man 1D) was created in 2024 by developer Kenta Cho from ABA Games. It is a modern, minimalist version of the classic Pac-Man.
The main idea is very simple – instead of a 2D maze, the game takes place on a single line (1D). The player can only move left and right and must eat dots while avoiding a single ghost.
Although it looks simple, the game became popular online because it is both addictive and challenging.
This minimalist concept inspired the creation of the present clone for Oric computers. The goal is to recreate the spirit of the original idea while adapting it to the limitations and charm of the 8-bit platform.
The result is a simple yet challenging game that preserves the classic feel, reimagined in the retro style of ORIC.
Code:
0---------1---------2---------3---------4---------5---------6---------7-----78 0D$="333b%%%b###//#####/AA/###APbVb5##AVDPb5##?1)1?###?aaa?###1?;?1#":DIMP(32) 1DEFFNR(X)=INT(RND(1)*X):POKE#26A,10:LORES1:P=5:FORI=1TO63:T=ASC(MID$(D$,I,1)) 2POKE#B917+I,T-35:NEXT:INK3:A=163:G=25:PD=1:GOSUB9:REPEAT:P0=P:IFT=40-RTHENM=0 3K=PEEK(#208):IFP(P)=36THENP(P)=32:L=L-1:PLAY1,1,2,99:IFL=0THENR=R+1:GOSUB9 4?@0,1;R:G0=G:P=P+PD:P=P+(P=32)*32-(P=-1)*32:IFK<>56THENPD=-(K=188)+(K=172) 5IFM=0THENG=G+(P<G)-(P>G)ELSEIFG>1ANDG<30THENG=G-((P<G)*.5)+((P>G)*.5) 6T=T+1:V=1-V:IFPW=PANDR=DTHEND=D+1:T=0:M=1ELSE:IFR=DTHENS=36+V:Q=PW:X=Q:GOSUB8 7S=40+V-(PD=1):X=P:Q=P0:GOSUB8:S=38+M:Q=G0:X=G:GOSUB8:UNTILP=INT(G):PING:END 8PLOTQ+4,9,P(Q):PLOTX+4,9,S:IFM=1ANDP=GTHENM=0:G=0-(P<15)*31ELSE:RETURN 9L=32:PW=FNR(25)+3:FORI=0TO31:P(I)=36:Z=I+4:PLOTZ,9,36:PLOTZ,10,A:NEXT:RETURN
CODE EXPLANATION:
0D$="333b%%%b###//#####/AA/###APbVb5##AVDPb5##?1)1?###?aaa?###1?;?1#":DIMP(32)
D$="..." - data string (chars/spritesncoding)
DIM P(32) - array for playfield (32 cells)
1DEFFNR(X)=INT(RND(1)*X):POKE#26A,10:LORES1:P=5:FORI=1TO63:T=ASC(MID$(D$,I,1))
DEFFNR(X)=INT(RND(1)*X) - random function (0 to X-1)
POKE #26A,10 - disable key click / cursor sound
LORES 1 - set low resolution graphics mode
P=5 - player position (index in array)
FOR I=1 TO 63 - loop through data string
T=ASC(MID$(D$,I,1)) - get ASCII code of char
2POKE#B917+I,T-35:NEXT:INK3:A=163:G=25:PD=1:GOSUB9:REPEAT:P0=P:IFT=40-RTHENM=0
POKE #B917+I,T-35 - redefine characters (custom tiles)
NEXT - end loop
INK 3 - set color
A=163 - ground tile character
G=25 - ghost/target position
PD=1 - player direction (1 right, -1 left)
GOSUB 9 - initialize playfield
REPEAT - main loop
P0=P - save previous player position
IF T=40-R THEN M=0 - reset mode when the ghost timer expires
3K=PEEK(#208):IFP(P)=36THENP(P)=32:L=L-1:PLAY1,1,2,99:IFL=0THENR=R+1:GOSUB9
K=PEEK(#208) - read keyboard
IF P(P)=36 THEN - if player steps on dot (tile=36)
P(P)=32 - clear tile
L=L-1 - decrease remaining targets
PLAY 1,1,2,99 - play sound
IF L=0 THEN - if all collected
R=R+1 - increase round
GOSUB 9 - initialize playfield
4?@0,1;R:G0=G:P=P+PD:P=P+(P=32)*32-(P=-1)*32:IFK<>56THENPD=-(K=188)+(K=172)
?@0,1;R - display round
G0=G - save previous ghost position
P=P+PD - move player
P=P+(P=32)*32-(P=-1)*32 - wrap around (screen edges)
IF K<>56 THEN - if key pressed
PD=-(K=188)+(K=172) - change direction (left/right)
5IFM=0THENG=G+(P<G)-(P>G)ELSEIFG>2ANDG<30THENG=G-((P<G).5)+((P>G).5)
IF M=0 THEN - normal mode
G=G+(P<G)-(P>G) - ghost follows player
ELSE
IF G>2 AND G<30 THEN - within bounds
G=G-((P<G)*.5)+((P>G)*.5) - ghost runs away from the player.
6T=T+1:V=1-V:IFPW=PANDR=DTHEND=D+1:T=0:M=1ELSE:IFR=DTHENS=36+V:Q=PW:X=Q:GOSUB8
T=T+1 - timer increment
V=1-V - toggle (animation)
IF PW=P AND R=D THEN - player reached power dot position
D=D+1 - increase power dot show counter
T=0 - reset timer
M=1 - switch ghost mode
ELSE
:
IF R=D THEN - condition
S=36+V - animated tile
Q=PW - position
X=Q - same position
GOSUB 8 - draw power dot
7S=40+V-(PD=1):X=P:Q=P0:GOSUB8:S=38+M:Q=G0:X=G:GOSUB8:UNTILP=INT(G):PING:END
S=40+V-(PD=1) - player sprite (animated)
X=P - new player position
Q=P0 - old player position
GOSUB 8 - draw player
S=38+M - ghost sprite
Q=G0 - old ghost position
X=G - new ghost position
GOSUB 8 - draw ghost
UNTIL P=INT(G) - loop until player pos = ghost pos
PING - sound on collision
END - end program
8PLOTQ+4,9,P(Q):PLOTX+4,9,S:IFM=1ANDP=GTHENM=0:G=0-(P<15)*31ELSE:RETURN
PLOT Q+4,9,P(Q) - erase old pos
PLOT X+4,9,S - draw new pos
IF M=1 AND P=G THEN - if player catch the ghost in persecution mode
M=0 - reset mode
G=0-(P<15)*31 - teleport ghost to edge
ELSE
RETURN - return normally
9L=32:PW=FNR(25)+3:FORI=0TO31:P(I)=36:Z=I+4:PLOTZ,9,36:PLOTZ,10,A:NEXT:RETURN
L=32 - total collectibles dots
PW=FNR(25)+3 - random power dot position
FOR I=0 TO 31 - loop playfield
P(I)=36 - fill with collectible tiles
Z=I+4 - screen X position
PLOT Z,9,36 - draw collectibles
PLOT Z,10,A - draw ground
NEXT - next cell
RETURN - return
| Published | 27 days ago |
| Status | Released |
| Author | BASIC 10Liner |
| Genre | Action |
| Tags | 10liner, 8-Bit, basic, oric-atmos |
| Content | No generative AI was used |
Install instructions
INSTALLATION INSTRUCTIONS:
1. Download the zip file from here: http://www.petergordon.org.uk/oricutron/files/Oricutron_win32_v12.zip
2. Copy the file PACMAN1D.TAP to the Oric\tapes folder
3. Start the emulator oricutron.exe
4. Type CLOAD"PACMAN1D" and press enter
5. LIST to show the program
6. Type RUN to play the game





Comments
Log in with itch.io to leave a comment.
very good