Had a little play with Bmax for a few hours..
First impressions are good, it's really simple to get something on the screen just like other versions of Blitz but it has a binload of other stuff. The IDE could be improved and there are some missing conventions that I am used to with other programming languages but they are very minor niggles.
Here's my obligatory Hello World which might end up being my Wireframe entry unless I get my act together soon!!!!
Strict
' ******************************************************************************************
' * *
' * I realise that a 3D starfield is my equivalent of a hello world. *
' * No apologies for that. *
' * Shockwave/www.dbfinteractive.com *
' * *
' ******************************************************************************************
' *********************************************************************
' * Open Screen *
' *********************************************************************
SetGraphicsDriver GLMax2DDriver()
Const xres = 1024
Const yres = 768
Const halfX = 512
Const halfY = 384
Graphics xres,yres,32,60,GRAPHICS_BACKBUFFER
SetLineWidth(2)
SetBlend(LIGHTBLEND)
SetAlpha(0.75)
HideMouse
Const numStars = 7000
Global starX:Double[numstars]
Global starY:Double[numstars]
Global starZ:Double[numstars]
Global rS:Double[numStars]
Global gS:Double[numStars]
Global bS:Double[numStars]
' *********************************************************************
' * Main Loop *
' *********************************************************************
setstars()
Repeat
drawStars()
SetColor (255,255,255)
DrawText "-HELLO WORLD-",halfx-65,halfy
Flip(-1)
Cls
Until KeyDown(KEY_ESCAPE)
EndGraphics
End
' *********************************************************************
' * Render the starfield *
' *********************************************************************
Function drawStars:Int()
Local lp,tx1,ty1,tx2,ty2,ic:Int
For lp=0 To numStars
tx1= Int((starX[lp] / starZ[lp])+halfX)
ty1= Int((starY[lp] / starZ[lp])+halfy)
tx2= Int((starX[lp] / (starZ[lp]+.5))+halfX)
ty2= Int((starY[lp] / (starZ[lp]+.5))+halfy)
If tx1>0 And tx1<xres And ty1>0 And ty1<yres Then
ic=(-(starZ[lp])+30)*5
SetColor (ic*rS[lp],ic*gS[lp],ic*bS[lp])
DrawLine tx1,ty1,tx2,ty2
End If
starZ[lp]=starZ[lp]-.15
If starZ[lp]<=0 Then starZ[lp]=starZ[lp]+30
Next
Return 1
End Function
' *********************************************************************
' * Initialise the starfield *
' *********************************************************************
Function setStars:Int()
Local lp:Int
For lp=0 To numStars-1
starX[lp]=Rnd(-5000,5000)
starY[lp]=Rnd(-5000,5000)
starZ[lp]=Rnd(1,30)
rS[lp]=Rnd(0,1)
gS[lp]=Rnd(0,1)
bS[lp]=Rnd(0,1)
Next
Return 1
End Function