B-li-tz Max is out!

For everything that's not in any way related to PureBasic. General chat etc...
Max.²
Enthusiast
Enthusiast
Posts: 175
Joined: Wed Jul 28, 2004 8:38 am

Post by Max.² »

syntax error wrote:For those interested in benchmark results ..
Any chance to get a hold of the compiled Blitz Max benchmark executable?
syntax error
User
User
Posts: 93
Joined: Tue Jan 13, 2004 5:11 am
Location: Midlands , UK

Post by syntax error »

The Author of BlitzMax (Mark Sibly) as requested that we do not distribute *.exe files compiled using beta versions of BlitzMax.

As soon as the Win32 version is done I'll post a link to the exe.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

As has been pointed out so many time on this forum those for loop how-many-times-can-I-do-something-pointless benchmarks are misleading at best. I'm sure BMax will be speedy, B+ and B3D sure are. I'm still disappointed in what is, IMHO, a half-finished release that really tears down a lot of my expectations for BMax (like 3D and MS-Windows support!).

The comparison of PB to BB is still not a good one. BB is a game language while PB is a general purpose language that you can use for games. PB still has quite a leg up on anything from Blitz if you are writing non-game applications, and probably always will. Having said that - if you're looking for a game language then Blitz is hard to beat!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
LuCiFeR[SD]
666
666
Posts: 1033
Joined: Mon Sep 01, 2003 2:33 pm

Post by LuCiFeR[SD] »

Bmax is hardly half finished Karbon. 3D is possible if you can be bothered to access OpenGL directly... infact, YOU could write a module to interface it a little easier too. Same with Windows API stuff... some of the demos that come supplied with Blitz max already can do this.

But mark hasn't added a lot of things like windows API support directly so that EVERYTHING that is written for one OS will automatically compile and run on ALL other supported operating systems. He has left the task of "Breaking Compatability" to YOU the user.. which IMHO, is the way it should be.

Alas, no exe's for the win32 or linux version can be distributed right now... But there are some rather impressive demos, epsecially those By Rob "Protean IDE" hutchinson.

Anyway, merry christmas all :)

An example of accessing OpenGL (courtesy of TeraBit)

Code: Select all

' More OpenGL Adventures

Framework BRL.BlitzGL
Import BRL.System
Import BRL.Basic
Import BRL.PNGLoader

Include "b3dloader.bmx" ' Cheesy but works, just about!

Global Verts#[65535]		' Vertex Array
Global Normals#[65535]		' Normal Array
Global texco#[65535]		' Texture Co-ordnate Array
Global ind[65535]			' Index Array
Global mx,my				' Mouse X & Y
Global FPS, RFPS,LastSEcs	' Frame Counter Stuff

bglCreateContext 1024,768,32,0,BGL_FULLSCREEN|BGL_BACKBUFFER|BGL_DEPTHBUFFER

bglSetSwapInterval 0

Global tex_name=bglTexFromPixmap( LoadPixmap( "trans.png" ) )

bglSetMouseVisible False

Local ax#,ay#

glShadeModel(GL_SMOOTH)

Global light_position#[] = [100.0, 100.0, 50.0, 0.0]   	' Spec's for the light
Global light_AMB#[] = [1.0,1.0,1.0,1.0]					' Uuuuugly
Global light_DIF#[] = [1.0,1.0,1.0,1.0]					' Nassssty

glLightfv(GL_LIGHT0, GL_POSITION, light_position)		' Horror
glLightfv(GL_LIGHT0, GL_AMBIENT, light_AMB)				' Shock
glLightfv(GL_LIGHT0, GL_DIFFUSE, light_DIF)				' Awrk!
glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 1.5)
glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0.5)
glLightf(GL_LIGHT0, GL_QUADRATIC_ATTENUATION, 0.2)

readb3d( "head.b3d" )									' Invoke the Cheesy(tm) B3DLoader

glEnableClientState (GL_VERTEX_ARRAY)					' Enable the Vertex Array
glEnableClientState (GL_NORMAL_ARRAY)					' Enable the Normal Array
glEnableClientState (GL_INDEX_ARRAY)					' Enable the Index Array
glEnableClientState (GL_TEXTURE_COORD_ARRAY)			' Enable the TexCoordinate Array

glVertexPointer(3, GL_FLOAT, 0, verts)					' Set the Pointer
glNormalPointer(GL_FLOAT, 0, normals)					' To where the Arrays
glIndexPointer (GL_INT, 0, IND)							' Live in System
glTexCoordPointer(2, GL_FLOAT,0, texco)					' Memory

glEnable(GL_TEXTURE_2D)
glBindTexture GL_TEXTURE_2D,tex_name
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR)
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR)

glCullFace GL_BACK
glEnable(GL_CULL_FACE)
glEnable(GL_LIGHTING)
glColor3f(1,1,1)
glClearDepth(1.0)
glEnable(GL_LIGHT0)
glEnable(GL_DEPTH_TEST)
glDepthFunc(GL_LEQUAL)	

glMatrixMode GL_PROJECTION
glLoadIdentity
gluPerspective 45,1024.0/768.0,0.1,1000

While Not KeyDown(KEY_ESCAPE)

	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
	
	glMatrixMode GL_MODELVIEW
	glLoadIdentity

	glTranslatef 0,0,-4 '0'0
	glRotatef my,1,0,0
	glRotatef mx,0,1,0
	ax=ax+1
	ay=ay+2
	If KeyHit(KEY_W) Then 
		wire = wire + 1
		If wire = 3 Then wire = 0
	EndIf
	
	If KeyHit(KEY_C) Then 
		cull = cull ~ 1			' Where's my XOR gone then! :)
	EndIf
	
	If KeyHit(KEY_F) Then 
		flipmesh = flipmesh ~ 1			' Where's my XOR gone then! :)
	EndIf
	
	If flipmesh = 1 Then
	  glFrontFace GL_CCW
	Else
	  glFrontFace GL_CW
	EndIf

	If cull = 0 Then
	  glEnable(GL_CULL_FACE)
	Else
	  glDisable(GL_CULL_FACE)
	EndIf
	
	If wire = 0 Then
	  glPolygonMode(GL_FRONT, GL_FILL)
	  glPolygonMode(GL_BACK, GL_FILL)
	EndIf
	If wire = 1 Then
	  glPolygonMode(GL_FRONT, GL_LINE)
	  glPolygonMode(GL_BACK, GL_LINE)
	EndIf
	If wire = 2 Then
	  glPolygonMode(GL_FRONT, GL_POINT)
	  glPolygonMode(GL_BACK, GL_POINT)
	EndIf
	
	glEnable(GL_DEPTH_TEST)
	glDrawElements(GL_TRIANGLES, ICT, GL_UNSIGNED_INT, IND);

	mx = MouseX()
	my = MouseY()
	
	bglDrawText "Blitzmax Inline OpenGL. "+rfps+" fps.",20,20
	bglDrawText (vind/3)+" Vertices.",20,40
	bglDrawText (ICT/3)+" Triangles.",20,60
	bglDrawText "W - Cycle (Solid / Wireframe / Points) ("+wire+")",20,80
	bglDrawText "C - Toggle Backface Culling ("+cull+")",20,100
	bglDrawText "F - Flip Mesh ("+flipmesh+")",20,120

	checkfps()
	
	bglSwapBuffers
	
	FlushMem

Wend

Function CheckFPS()
	If (MilliSecs()-lastsecs) <1000 Then 
		fps = fps +1
	Else
		lastsecs = MilliSecs()
	rfps = fps
		fps = 0
	EndIf
End Function
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

I agree with Karbon, except it looks exactly like BlitzMax is less thne 1/4 complete. So you are right :D It is hardly 1/2 finished ...
LuCiFeR[SD]
666
666
Posts: 1033
Joined: Mon Sep 01, 2003 2:33 pm

Post by LuCiFeR[SD] »

Well Shannara, you think what you want to think eh?... you always do :twisted:
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Thats so true :) I tell it as it is .. ooOo, and this time, it seems Karbon and I are thinking along the same lines.
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

what I'd like to know is, why people think BlitzMax is a "game" creation language? doesn't appear to be one to me, it appears to be along the same lines as PB, just because Mark didn't release a WinAPI module for it doesn't make it any less capable of doing so.

Having said that, BlitzMax exe's size is quite a bit larger than PB still, at least it's not 100's of kbs like before.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> what I'd like to know is, why people think BlitzMax is a "game" creation language?

From the official site (http://www.blitzmax.com/products/blitzmax.php):

BlitzMax is the new, next generation game programming language from Blitz Research.

That's why. ;)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

fare enough and correct, but I think that is an incorrect statement really, it more correct for 2d/3d than it is for max, since you can write your own winapi mod for it and use it like you would vb or pb etc, games don't have to enter into it really at all.
LuCiFeR[SD]
666
666
Posts: 1033
Joined: Mon Sep 01, 2003 2:33 pm

Post by LuCiFeR[SD] »

I suppose it has been designed mainly for game programming, but you can make it do what you like, just the same as PB, you just have to write the modules to fill in the blanks. But from the word go it was never meant to have directX or winAPI support... it was designed to be portable accross all supported platforms. 3D isn't really an issue though as it is supported... well, kind of ;)... you just have to access the same as you would from c/++ or whatever..., but there isn't a nice "BASIC" way to access it (I could probably word this better, but I really can't be bothered, it is still beer drinking time lol).

I have bought Bmax, it sure as hell *IS* powerfull... it can do *ANYTHING* you can do in a lower level language. you just have to be prepared to get your hands dirty and get under the hood, instead of relying on somebody else to do it for you.
There will probably be a bucketload of 3rd party modules (just like there are for PB) released that will fill in the blanks.

Anyway, enough, wasting valuable drinking time here :) TTFN.
tonnelier
User
User
Posts: 45
Joined: Mon May 03, 2004 10:34 pm
Location: France

Post by tonnelier »

Concerning sieve : (from french PB's forum)
Pb and Blitzmax have almost the same rapidity without debugger.
With debugger, Blitz is very slower.

Not the same thing as said previously...
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Post by Denis »

Nico and I, we have done some tests with Blitz3D demo only.

With my tests, Blitz3D demo was a little bit faster than Pure (debugger off with the piece of code from english forum - 5000 iterations) but with Nico's tests (30000 iterations) it's the opposite.

:roll:

According Blitz3D demo doc, the demo is the same as Blitz3D except for exe file (not possible to do an exe file) and for source files (16K max)
A+
Denis
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post by Codemonger »

From what i understand BlitzMax uses GCC as its backend, to be cross-platform compatible.

So it seems Mark Sibly did not write the compiler , he only wrote the front-end. I may be 100% wrong , but thats what it seems like. You need to download cygwin or something like that to run the windows version of BlitzMax as far as I can tell.
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
morduun
New User
New User
Posts: 8
Joined: Sat May 24, 2003 6:16 am
Location: NJ, USA
Contact:

Post by morduun »

You're 100% wrong, and you don't need to download cygwin to run BlitzMax on Windows platforms. Silly thing to say.

[Edit]While I'm at it, it's worthwhile to say that a a Bmax Sieve exe outperforms everything but MSVC on Windows -- including DevC -- and comes very close to equalling MSVC's performance. Certainly there are weaknesses in max, but speed in this sense does not seem to be one of them.[/Edit]
Post Reply