The Game BASIC for Sega Saturn homebrew thread
Posted: Wed Oct 07, 2020 9:29 pm
Use this thread to post questions, suggestions, and homebrew programs for Game BASIC. You should be able to attach files as a .zip, or share smaller programs with the "code" tag.
To get things started, here's a rotating 3D model of a simple spaceship:
To get things started, here's a rotating 3D model of a simple spaceship:
Code: Select all
SCREEN
SETPERS 90
SETLIGHT 1,1,1,RGB(0,0,245),RGB(100,100,100)
READ VTN
SETVERTEX 1,VTN,READ,(5,5,5)
READ PLN
SETPOLYGON 1,PLN,1,READ
SETATR 1,PLN,(4,1,3,0,7399,8)
OBJ(1,@ATR) = 1,1
OBJ(1,@TYPE) = 4
OBJ(1,@XRV) = 0.002,0.001,0
'PBE1
DATA 20
DATA -0.7293869,-0.8023255,-0.5835094
DATA 0.8023255,-0.8023255,-0.5835094
DATA 0.7938089,0.7899927,-0.5841553
DATA -0.7081572,0.7773255,-0.5929277
DATA -2.501174,-2.45577,4.995403
DATA 1.780538,-2.460021,5.028886
DATA 2.583562,0.5106764,4.965294
DATA -3.056407,0.5605836,5.106492
DATA 7.730277,1.835851,8.150307
DATA 7.768425,2.043847,6.439438
DATA -7.671849,2.186889,6.516652
DATA -7.950813,2.044355,8.287344
DATA 1.271394,-1.080933,6.133287
DATA -1.642012,-1.090826,6.159839
DATA -1.646641,0.4054157,6.205105
DATA 1.25728,0.4240844,6.21485
DATA 0.6189463,-0.7736828,5.045187
DATA 0.6028315,0.1876344,5.037827
DATA -0.8438893,-0.8351839,5.028943
DATA -0.8346935,0.1268782,5.08306
DATA 13
DATA ,(0,1,2,3)
DATA ,(0,4,5,1)
DATA ,(1,5,6,2)
DATA ,(4,0,3,7)
DATA ,(2,6,8,9)
DATA ,(7,3,10,11)
DATA ,(5,4,7,6)
DATA ,(6,7,3,2)
DATA ,(12,13,14,15)
DATA ,(16,12,15,17)
DATA ,(13,18,19,14)
DATA ,(13,12,16,18)
DATA ,(15,14,19,17)