all these new features

Miscellaneous Forums/General Discussion/all these new features

it s weird of late that people in the community are adding more and more new stuff to blitz 3d like stencil shadows, normal mapping etc.
my question is why could n't BR have done this stuff since it certainly seems feasible.
The way its going I would n't need to buy blitzmax with this new stuff working in blitz 3d.

suppose its just a performance issue?

bmax is more than just some new features, like normal mapping etc.

suppose, but I think I was only missing a few features, like shadows and normal mapping. this will extend the life of b3d for me anyway

BlitzMAX is faster, allows for proper object oriented design and is cross platform. Something Blitz3D could never be. Roll on Max3D.

For me it's not about 3D features - most people still haven't made the most of existing Blitz3D features. For me, it's primarilly a language feature and speed issue.

New userlibs in B+ has stretched the life of it as well...

I needed CD burning support in one of my apps, so I made my own (Granted, it's not IMAPI, but it works well)

I know what you mean about simple(ish) things that could be made native... like printer support:-

//Printer DLL
//Written By Michael Denathorn 2005
//Sends text to the printer, also handle page breaks too

#include <windows.h>
#include <gdiplus.h>
#include <stdio.h>
using namespace Gdiplus;

//Globals
PRINTDLG pd;
DOCINFO di;
ULONG_PTR gdiToken;

#define BBDECL extern "C" _declspec(dllexport)
#define BBCALL _stdcall

BBDECL int BBCALL _DabzOpenPrinter(void)
{
   GdiplusStartupInput gdiplusStartupInput;
   GdiplusStartup(&gdiToken, &gdiplusStartupInput, NULL);

   
   ZeroMemory(&di, sizeof(di));
   di.cbSize = sizeof(di);
   di.lpszDocName = "Dabz Printer Lib";
   
   ZeroMemory(&pd, sizeof(pd));
   pd.lStructSize = sizeof(pd);
   pd.Flags = PD_RETURNDC;

   if(!PrintDlg(&pd))
   {
      printf("Failure\n");
	  return(0);
   }
    
	return(1);
}
BBDECL int BBCALL _DabzStartDoc(void)
{
	StartDoc(pd.hDC, &di);
	return(1);
}

BBDECL int BBCALL _DabzStartPage(void)
{
	StartPage(pd.hDC);
	return(1);
}

BBDECL int BBCALL _DabzEndPage(void)
{
	EndPage(pd.hDC);
	return(1);
}

BBDECL int BBCALL _DabzEndDoc(void)
{
    EndDoc(pd.hDC); 
	return(1);
}

BBDECL int BBCALL _DabzClosePrinter(void)
{
	  if(pd.hDevMode) 
      GlobalFree(pd.hDevMode);
   if(pd.hDevNames) 
      GlobalFree(pd.hDevNames);
   if(pd.hDC)
      DeleteDC(pd.hDC);
   
   GdiplusShutdown(gdiToken);
	
   return(1);
}

BBDECL int BBCALL _DabzPrintText( const char *str, int posX, int posY)
{
	TextOut(pd.hDC,posX,posY,str,strlen(str));
	return(1);
}

/*DECLS file
.lib "PrintDLL.dll"
OpenPrinter%():"__DabzOpenPrinter@0"
StartDoc%():"__DabzStartDoc@0"
StartPage%():"__DabzStartPage@0"
EndPage%():"__DabzEndPage@0"
EndDoc%():"__DabzEndDoc@0"
ClosePrinter%():"__DabzClosePrinter@0"
PrintText%(string$,xPos,yPos):"__DabzPrintText@12"*/



BlitzSource

;PrintDLL.DLL Example
;Written by Michael Denathorn 2005

;This example shows how you can use the DLL to print the contents
;of a Blitz+ Text Area

;Standard Blitz+ stuff
win = CreateWindow ("Print Text Area Example",20,20,230,280,Desktop(),5) 
txtbox = CreateTextArea(10,15,200,200,win,1) 

;Menu
menu = WindowMenu(win)
file=CreateMenu("File",0,menu) 
CreateMenu "Print",1,file 
CreateMenu "",0,file 
CreateMenu "Quit",2,file 
UpdateWindowMenu win

;Event Constants
Const CLOSE_WINDOW_EVENT 	= $803
Const MENU_EVENT 			= $1001
;Menu content ID's
Const PRINT_ID 	= 1
Const QUIT_ID 	= 2

Repeat
	event = WaitEvent() 
	If event = CLOSE_WINDOW_EVENT 
		End
	End If
	 
	If event=MENU_EVENT
		menuID=EventData() 
		Select menuID
			Case PRINT_ID
				If TextAreaLen(txtbox) <> 0
					PrintTextArea(txtbox)
				Else
					Notify "Erm... Type summit then!!! :/"
				End If
			Case QUIT_ID
				End
		End Select
	End If
Forever



;---------------------------------------------------------------------------
;Note: The function only prints lines that are 90 characters in length, I'll
;      fix this later, but for now, just bare it in mind!
;---------------------------------------------------------------------------
Function PrintTextArea(txtArea)
	;Some local variables
	Local LINES_PER_PAGE = 78
	;Create a tempory new file in the users tempdir
	;and save the text there first (There is a reason for this, see bottom of function))
	file$ = SystemProperty$("tempdir")+"tempprint.txt"
	fileout = WriteFile(file$)
	WriteLine(fileout,TextAreaText(txtArea))
	CloseFile fileout
	
	;Open the file and the printer
	filein = ReadFile(file$)
	OpenPrinter()
	;Tell the printer there is a new document on the way,
	;and also notify the printer we are going to print on a
	;new page
	StartDoc()
	StartPage()
	;Reset line counter
	lineCounter = 0
	;Printing loop
	Repeat
		;Read in line of text from file, and then send to printer
		PrintText(ReadLine$(filein),50,(lineCounter*50))
		;Increment the line counter
		lineCounter = lineCounter + 1
		;If the printer reaches the bottom of the page
		;reset the line counter, tell the printer to end the
		;current page, and start a new one
		If lineCounter = LINES_PER_PAGE
			lineCounter = 0
			EndPage()
			StartPage()
		End If
	;Exit when we have reached the end of the file
	Until Eof(filein)
	;Instruct the printer to end the page, and then the document
	EndPage()
	EndDoc()
	;Close the printer
	ClosePrinter()
	;Close the file and delete it
	CloseFile filein
	DeleteFile(file$)
End Function


;Writing the contents of a text area to file first, then reading in each line
;saves me from trying to format the text internally within the function.
;If I tried to print straight from the text area, I would end up with something
;from this:-
;
;					Hello, my name is Michael
;					and I like nothing better than
;					sitting on by backside.
;
;
;To this (Which is what it would look like on the paper):-
;
;		Hello, my name is Michaeland I like nothing better thansitting on by backside.
;
;As you can see, it's a bit @#!*ty, The reason this happens is that when
;Blitz+ reads in the line, it automatically chops the carriage return from the 
;line... so, I don't really have to do much, apart from a couple of simple IO
;routines... Canny!!! 


It took me a couple of days to learn how to do that, and I know it's not great... but it works!

I could easily incorporate images in there... but I don't need to yet.. so! But if BR sorted something as easy as that (And it would be a popular segment of the command set)and incorporated it into the language, I'd be happy!

Though, if I need anything, I'm just going to roll up my sleeves and make it myself... That will stop me getting lazy in my old age! :D

Dabz

*EDIT - How the hell do you make the boxes smaller! :/
*EDIT - Got it... F'ing codebox! :)

At least Mark give B3D userlib support and the commnuity has already the way to acces some internal part of B3D, it's still very powerful for game developers...

yeah but simple things like no compressed textures really hold back B3D on lower spec video cards. Our racer uses 33mb of vram in 16bit, and can't have any extra textures added. Most of the scenery reuses the same colourchart bitmap with vertex colours to hide the flat colouring. And lightmaps on the ground and larger chunks of scenery. It lacks detail too, and all the vehicles use the same greyscale skin with the colours swapped in code.

With compressed textures we could have 2x to 3x the detail and variety without noticeable drop in visual quality and it would still run on my GF2 GTS.

In 32bit the same game only just fits on my GF3 using 63mb of vram.

Compressed textures are a DX7 feature, and far more usefull than fancy shadows and bump mapping and it seems that it should be fairly trivial to add to B3D and would allow a 60% improvement in most peoples visuals.

Hi Ruz, LTNS.

You're right, I think an awful lot of people would have been happy with just a few more additions to B3d. Why couldn't BRL have done it? Good question. I'd hazard a guess that the B3d source is just getting really messy and hard to maintain now, and that they were afraid of breaking everything from here to November by jamming in some new stuff. Or maybe they just couldn't find the time to cram some new stuff in as well as putting a lot of work into a whole new product line.

I do think you have another good point though. With third party options, you can choose not to use them and there's no overhead. If they started integrating things into B3d, perhaps there would be.

For me it's not about 3D features - most people still haven't made the most of existing Blitz3D features.


They may not have made the most of existing B3d features, but that doesn't mean they haven't been severely hampered by B3d's limitations. B3d's limitations are skewed. The horribly slow skeletal animation, complete lack of render pipeline optimization and complete lack of compressed texture support hit you long before you're able to make the most of existing B3d features. So in a sense, it's B3d's weaknesses which have prevented people from making the most of it's existing features.

That sums my thoughts on Blitz really well Gabriel. Thanks man :)

The lack of DXTC is Blitz3D's Achilles heel. Shame, really.

Gabriel hit it right on the head :)

"Ruz" is right thought.

B3D should be a great choice for beginners. This is possibly a reason for Cobra being in development.

I would not recommend BMax to a complete novice - I would recommend B3D (and/or Cobra - if it is good).

The marketplace will always need an entry level product which is ideal for games programming - I think B3D is viable for the future in this way - if not, someone else will only fill the gap (ie Cobra).

I have no itention of abandoning B3D just yet - and there are quite a few people who still use it. My observation is B3D keeps becoming more and more capable with regard to newer and more powerful hardware I throw at it (which is obvious, but it means that some things in B3D that would have been prohibitive 4 years ago (due to hardware) are going to become available - speed is less of an issue with modern machines - you can do more.

I think BRL should keep B3D an active product - even if it means making sure BMax woops its ass.

I can see Why Mark Just added Dot3 blending and not a loadbumpmesh() type of cammand. (vertex color,cubic maps, sheremaps, normalized lightmaps) lots of ways to update/use the normal maps.

Stencil shadows would be handy, But Mark would probbaly only add the Stencil Buffer access, it would still be left to us to calc/generate the Volume.

But DXTC should be added, this would help in many area's and compliment the already existing features.
Like bumpmapping/normalmapping with Cubemaps...4 textures atleast need to be used.

Why DXTC hasnt already been added is anyones Guess.

Embm could also be usefull for water/mirror/glass effects and can be used on any geforce3 card or better
and some dx7 only cards like the original Radeon ,kyroIII and Matrox. (just not geforce2 i think)

While that probbaly why it isnt added (not a wide spread enough Feature) it still would be a nice effect to have.

Sam

Why DXTC hasn't added does not seem to be a hard question to answer: Because it would have needed a new texture type. The regular one couldn't be used because you can not draw to a DXTC after loaded nor modify it in any other way ... would make it harder to use and raise new problems ...
But it would have been a great addition as it just makes B3D look like a stone age engine as it does not support a feature that has been industrial standard for 7-8 years now :-(