https://subethasoftware.com/2024/01/20/ ... and-sound/
Here is one of his videos:
https://youtu.be/pV6_faXChGo
I thought about how would those 8x8 tiles, originally black and white, handle artifact colors.
As we can see, it is very hard to get tanks with the 2 pure colors.
So what about a single color and some 3d?
Here is some testings:
So here are 4 frames for each single colored tank, tiles for the background and color ramped tiles for whatever FXs.
This is what they look, and is also the tile set file needed to run the code:
Finally, a Scene Maker to test the tile set in action:
Code: Select all
REM --- MAZE GENERATOR V0.1 - FUED 2024
REM --- VARIABLES ---------------------------------------------------------------
DIM bkg(32,24) :REM MAP ARRAY
t%=0 :REM GENERAL TIMER
c%=0 :REM CURSOR VALUE
x%=0 :REM CURSOR X pos
y%=0 :REM CURSOR y pos
REM --- SET SCREEN / CLEAR MAP ARRAY --------------------------------------------
SCREEN #14:COLOR #0, #5:CLS
FOR y=0 TO 23:FOR x=0 TO 31:bkg(x,y)=8:NEXT:NEXT
REM --- LOAD TILE SET -----------------------------------------------------------
p01 := LOAD IMAGES("tanks_01.png")FRAME SIZE(8,8)
REM --- GENERATE MAP ------------------------------------------------------------
REM --- TITLE
FOR y=0 TO 21:FOR x=0 TO 31:bkg(x,y)=RND(24):NEXT:NEXT:GOSUB draw :REM RND TILES
LOCATE 0,23:PRINT" MAZE GEN V0.1 FUED 2024 " :REM TITLE
DO
FOR y=0 TO 23:FOR x=0 TO 31:bkg(x,y)=8:NEXT:NEXT :REM CLS ARRAY
WAIT KEY:GOSUB draw
LOCATE 0,23:PRINT" LAYER GROUND <key> "
'WAIT KEY
REM --- GRASS
FOR c=0 TO 400
bkg(RND(31),RND(23))=RND(2)+16
NEXT
LOCATE 0,23:PRINT" LAYER GRASS <key> "
GOSUB draw
'WAIT KEY
REM --- TREES
FOR c=0 TO 10 :REM STAR
x=RND(31):y=RND(21)
bkg(x,y)=12:x=x-1
bkg(x,y)=12:x=x+2
bkg(x,y)=12:x=x-1:y=y-1
bkg(x,y)=12:y=y+2
bkg(x,y)=12:y=y+1
NEXT
LOCATE 0,23:PRINT" LAYER TREES - STAR <key> "
GOSUB draw
'WAIT KEY
FOR c=0 TO 20 :REM QUAD
x=RND(31):y=RND(21)
bkg(x,y)=12:x=x-1
bkg(x,y)=12:y=y-1
bkg(x,y)=12:x=x+1
bkg(x,y)=12:y=y+1
NEXT
LOCATE 0,23:PRINT" LAYER TREES - QUAD <key> "
GOSUB draw
'WAIT KEY
REM --- WALLS
FOR c=0 TO 10 :REM QUAD
x=RND(31):y=RND(21)
bkg(x,y)=10:x=x-1
bkg(x,y)=10:y=y-1
bkg(x,y)=10:x=x+1
bkg(x,y)=10:y=y+1
NEXT
LOCATE 0,23:PRINT" LAYER WALL - QUAD <key> "
GOSUB draw
'WAIT KEY
x=1:y=1 :REM BORDER WALL PATH
FOR t=1 TO 6 :REM TOP WALL
FOR c=1 TO 5
bkg(x,y)=10:x=x+1 :REM draw 5 right
IF x>31 THEN x=31
NEXT
IF RND(2)=1 THEN: :REM choose y move
bkg(x,y)=10
y=y+RND(3)-1
IF y<0 THEN y=0
ENDIF
NEXT
LOCATE 0,23:PRINT" LAYER BORDER WALL - TOP <key> "
GOSUB draw
'WAIT KEY
x=31:y=1
FOR t=1 TO 6 :REM RIGHT WALL
FOR c=1 TO 4
bkg(x,y)=10:y=y+1 :REM draw 4 down
IF y>21 THEN y=21
NEXT
IF RND(2)=1 THEN: :REM choose x move
bkg(x,y)=10
x=x+RND(3)-1
IF x>31 THEN x=31
ENDIF
NEXT
LOCATE 0,23:PRINT" LAYER BORDER WALL - RIGHT <key>"
GOSUB draw
'WAIT KEY
x=30:y=21
FOR t=1 TO 6 :REM LEFT
FOR c=1 TO 5
bkg(x,y)=10:x=x-1 :REM draw 5 left
IF x<0 THEN x=0
NEXT
IF RND(2)=1 THEN: :REM choose y move
bkg(x,y)=10
y=y+RND(3)-1
IF y>21 THEN y=21
ENDIF
NEXT
LOCATE 0,23:PRINT" LAYER BORDER WALL - DOWN <key> "
GOSUB draw
'WAIT KEY
x=0:y=21
FOR t=1 TO 6 :REM UP
FOR c=1 TO 4
bkg(x,y)=10:y=y-1 :REM draw 4 up
IF y<0 THEN y=0
NEXT
IF RND(2)=1 THEN: :REM choose x move
bkg(x,y)=10
x=x+RND(3)-1
IF x<0 THEN x=0
ENDIF
NEXT
LOCATE 0,23:PRINT" LAYER BORDER WALL - LEFT <key> "
GOSUB draw
'WAIT KEY
REM --- WALL DROP
x=1:y=1
FOR y=0 TO 23:FOR x=0 TO 31
IF bkg(x,y)=10 THEN:
y=y+1
IF bkg(x,y)=8 OR bkg(x,y)=16 OR bkg(x,y)=17 THEN bkg(x,y)=11
y=y-1
ENDIF
NEXT:NEXT
LOCATE 0,23:PRINT" LAYER WALL DROP <key> "
GOSUB draw
'WAIT KEY
REM --- TREE DROP
x=1:y=1
FOR y=0 TO 23:FOR x=0 TO 31
IF bkg(x,y)=12 THEN:
y=y+1
IF bkg(x,y)=8 OR bkg(x,y)=16 OR bkg(x,y)=17 THEN bkg(x,y)=13+RND(2)
y=y-1
ENDIF
NEXT:NEXT
LOCATE 0,23:PRINT" LAYER TREE DROP <key> "
GOSUB draw
'WAIT KEY
REM --- FENCES
FOR c=0 TO 8
x=RND(29)+1:y=RND(20)+1
IF bkg(x,y)=8 OR bkg(x,y)=16 OR bkg(x,y)=17 THEN:
bkg(x,y)=15
FOR t=0 TO 2
IF RND(2)=1 AND t>2 THEN t=2
bkg(x,y)=15
x=x+1:IF x>23 THEN x=23
IF bkg(x,y)<>8 AND bkg(x,y)<>16 AND bkg(x,y)<>17 THEN:
x=x-1
ENDIF
NEXT
ENDIF
NEXT
LOCATE 0,23:PRINT" LAYER FENCES <key> "
GOSUB draw
'WAIT KEY
LOCATE 0,23:PRINT" DONE <key> "
LOOP
REM --- SUB DRAW SCREEN FROM MAP ARRAY ------------------------------------------
draw:
FOR y=0 TO 22:FOR x=0 TO 31
PUT IMAGE p01 FRAME bkg(x,y) AT x*8,y*8
NEXT:NEXT
RETURN