Hi guys, I had this naive idea and wanted to share it. Not too hardware-specific, just plain MSX1 sprites are involved.
16x16 zoomed sprites ("SCREEN 2,3") look rather blocky, because every sprite pixel is a square of 2x2 screen pixel. What if you take two (carefully crafted) blocky sprites and stack them with 1-pixel diagonal offset? For certain special cases the sprite looks "at 1-pixel resolution" and you used only two 16x16 sprites (in general you may need four).
You may play with a visual, easier-to-understand example here below (arrow keys = add more offset, space bar = change color of lower-priority sprite, ESC= exit).
Is this drawing technique a well-known one? does it have a name? is it just crap, or do you think it may be useful for MSX? I don't remember having ever read about it . Any comment and directions are welcome, thanks!
10 REM -- Draw two 16x16 ZOOMED sprites (32x32 pixels) 20 REM -- Every sprite pixel is 2x2 pixels on screen 30 REM -- Stack them with (+1,+1) pixel offset 40 REM -- Looks like a 32x32 pixels sprite at full resolution! 50 SCREEN 2,3: COLOR 15,4,1 60 DEFINT A-Z 70 C=1: REM -- sprite colour 80 A0$="": A1$="": REM --- 1st sprite 90 A$="0000011111000000": GOSUB 530 100 A$="0001100000110000": GOSUB 530 110 A$="0010000000001000": GOSUB 530 120 A$="0100000000000100": GOSUB 530 130 A$="0100011011000100": GOSUB 530 140 A$="1000100100100010": GOSUB 530 150 A$="1001010101010010": GOSUB 530 160 A$="1001010101010010": GOSUB 530 170 A$="1000100100100010": GOSUB 530 180 A$="1000011011000010": GOSUB 530 190 A$="0100000000000100": GOSUB 530 200 A$="0100000000000100": GOSUB 530 210 A$="0010000000001000": GOSUB 530 220 A$="0001100000110000": GOSUB 530 230 A$="0000011111000000": GOSUB 530 240 A$="0000000000000000": GOSUB 530 250 SPRITE$(0)=A0$+A1$ 260 A0$="": A1$="": REM --- 2nd sprite 270 A$="0001110011100000": GOSUB 530 280 A$="0010000000010000": GOSUB 530 290 A$="0100000000001000": GOSUB 530 300 A$="1000000000000100": GOSUB 530 310 A$="1000101101000100": GOSUB 530 320 A$="1001010010100100": GOSUB 530 330 A$="0000110011000000": GOSUB 530 340 A$="0001010010100000": GOSUB 530 350 A$="1000101101000100": GOSUB 530 360 A$="1000000000000100": GOSUB 530 370 A$="1000000000000100": GOSUB 530 380 A$="0100000000001000": GOSUB 530 390 A$="0010000000010000": GOSUB 530 400 A$="0001110011100000": GOSUB 530 410 A$="0000000000000000": GOSUB 530 420 A$="0000000000000000": GOSUB 530 430 SPRITE$(1)=A0$+A1$ 440 PUT SPRITE 0, (90, 80), 1 450 PUT SPRITE 1, (91+X, 81+Y), C 460 IF STICK(0)=1 AND Y>0 THEN Y=Y-1 470 IF STICK(0)=5 THEN Y=Y+1 480 IF STICK(0)=7 AND X>0 THEN X=X-1 490 IF STICK(0)=3 THEN X=X+1 500 IF STRIG(0)<>0 THEN C=((C+1) MOD 4) + 1 510 IF INKEY$<>CHR$(27) GOTO 440 520 END 530 REM -- convert 540 A0$=A0$+CHR$(VAL("&b"+MID$(A$,1,8))) 550 A1$=A1$+CHR$(VAL("&b"+MID$(A$,9,8))) 560 RETURN