Title: すふぃあ (SPHERE)
System: Family Basic all but V3
Author: プログラマーたけし (Programmer Takeshi)
Publication: プログラムポシェット No. 12 (Program Pochette No. 12)
Page Scans: 
Preserved By: ozidual
Recommended Emulator: VirtualNES

Translated Article

This is such a famous game that I'm sure it needs no further explanation. This classic puzzle game taht has conquered all major consoled handled by Pochette is finally available on Famibe.

You clear the level by lining up 3 ink wells vertically or horizontally within the number of moves of "LEFT". Move the controller, enter in the opposite direction of the direction you want to move, and press A Button to fly in that direction. Once it starts moving, it won't stop until it hits something, and the ink well disappears if it goes off the screen. In the original, blocks also disappear, but this is a port of the MSX version, so it's a little different.

There are 10 levels in total.

There are no constraints, but the data from line 900 onwards, the first 8 are block data, the next 6 are ink point coordinates, and the last is the number of "LEFT". Try making your own map as well.

Make a pretty risky surface and have your friends try it out for fun... that's also part of the fun of puzzles.


Author's Note

Yay, its accepted! That brings the acceptance rate to 75%. This is all thanks to the original author, TPM.CO. Even so, I think the masterpiece "SPHERE" is close to being conquered on all platforms. By the way, we won't be able to see it on Famicom anymore. Next is MSX.
God, Buddha, and TPM.CO, this is all thanks to you.


Variable List

A,B - Where is the controller pressed?
A$(0),B$(0) - Block character
A$(1),B$(1) - Ink well character
C$ - Area data
G - Sprite number
M,N - Determine whether data on all three are present
L - Number remaining
O,W - block, ink moving coordinates
V - You got all three inks?
X,Y - Controller coordinates
P - Where the controller is moving


Program List

4 - Processing when 10 levels are cleared
10-30 - Screen creation and sprite definition
100-160 - Main
500-530 - Moving blocks and ink
540-560 - Got all three?
700 - Process for ink hitting a block or an outside wall


Checkpoint

If you get stuck, change R=K in the second line to R=number of levels. The first 8 DATA are screen data, the next 7 are ink coordinates and the last one is "LEFT". If you have any free space, try making your own Map (Tomomi)


Code

2 F=0:K=1:J=2:H=8:R=K:DIMA$(K),B$(K):A$(F)=CHR$(243)+CHR$(247):B$(F)=CHR$(245)+CHR$(248):A$(K)=CHR$(249)+CHR$(251):B$(K)=CHR$(250)+CHR$(252):SPRITEON
4 IFR>10THENFORI=K TO47:PALETBF,I,F,F,F:POKE&H400C,255,155,I,J:PAUSE5:NEXT:PAUSE400:FORI=K TO26:COLORI,21,3:LOCATEI,22:PRINTCHR$(ASC(MID$("ェネテヘ#ヂィュィサロェ0#ソメソテ$#クュビヌカ$",I,K))-3);:PAUSEH:BEEP:NEXT:PAUSE500:FORI=F TO20:PRINT"":PLAY"B2":PAUSE30:NEXT:END
10 VIEW:PALETBF,15,48,33,R*4:ONR RESTORE900,910,920,930,940,950,960,970,980,990:LOCATE23,13:PRINTR:FORI=J TO9:READC$:E=VAL("&H"+C$):FORG=K TOH:IFE MODJ=K THENLOCATEG*J,I*J-K:PRINTA$(F):LOCATEG*J,I*J:PRINTB$(F)
30 E=E/J:NEXT:NEXT:PALETSF,15,48,15,15:PALETSK,15,48,33,R*4:POKE&H4015,15:X=32:Y=48:CGEN3:FORI=F TOJ:READE,G:LOCATEE,G:PRINTA$(K):LOCATEE,G+K:PRINTB$(K):DEFSPRITEI,(-(I<J),K,F,F,F)=A$(I ANDK)+B$(I ANDK):NEXT:READL
100 S=STICK(F):IFS=F THEN145
125 A=((S=J)-(S=K))*J:B=((S=H)-(S=4))*J:X=X+A*H:X=X+((X>148)-(X<32))*16:Y=Y+B*H:Y=Y+((Y>164)-(Y<48))*16
145 P=ASC(SCR$(X/H-J,Y/H-3)):IFSTRIG(F)=H ANDP<>32ANDS=F THENG=-(P=249):GOTO500
160 SPRITEJ,X,Y-K:LOCATE25,5:PRINTL:GOTO100
500 Q=X/H-J:W=Y/H-3:LOCATEQ,W:PRINT"  ":LOCATEQ,W+K:PRINT"  ":L=L-K
510 Q=Q+A:W=W+B:IFASC(SCR$(Q,W))+G=256THEN700
520 IFSCR$(Q,W)<>" "THENLOCATEQ-A,W-B:PRINTA$(G):LOCATEQ-A,W+K-B:PRINTB$(G):GOTO540
530 SPRITEG,Q*H+16,W*H+23:GOTO510
540 POKE&H400C,136,155,254,H:SPRITEG:RESTORE550:V=F:FORI=F TO5:E=(I<J)-J*(I>K):READM,N:IFG THENIFASC((SCR$(Q-A+M,W-B+N)))*ASC((SCR$(Q-A+M*E,W-B+N*E)))=-3535THENV=K
550 NEXT:DATA0,-2,2,0,0,-2,0,2,2,0,-2,0
555 IFV THENLOCATE7,K:PRINT"CLEAR!":POKE&H4000,120,250,150,3:PAUSE300:R=R+K:SPRITEJ:GOTO4
556 IFL=F THEN700
560 GOTO100
700 SPRITEG:POKE&H4000,127,149,50,J:PAUSE200:GOTO10
900 DATA0,0,0,4,0,4,20,0,8,7,12,7,10,9,4
910 DATA0,0,18,0,0,24,0,0,4,11,14,11,8,13,4
920 DATA0,10,2,0,0,0,40,0,4,15,8,7,14,5,5
930 DATA0,10,0,0,4,0,40,0,4,5,14,7,6,15,6
940 DATA1E,21,FF,21,1,61,2,1C,10,15,12,15,12,11,5
950 DATA0,0,0,8,1,40,8,0,4,5,6,11,8,13,5
960 DATA0,0,10,40,0,40,2,0,4,7,8,11,14,5,6
970 DATA0,40,0,2,21,0,4,0,4,5,6,13,12,15,6
980 DATA0,44,0,0,0,40,0,0,8,5,14,11,6,13,8
990 DATA0,0,10,8,40,8,0,0,4,11,6,5,8,7,7