blitzmax 3d module?

BlitzMax Forums/BlitzMax Beginners Area/blitzmax 3d module?

is it still being worked on? or is it cancelled?

Is it Thursday again already?

: )

no its friday actually

Oh come now, asking if it's cancelled is certainly new. :o)

ok so it was funny... but still i havent heard anything about it.

cant wait for it, it'll make it easy to add zooming in 2d :)
stead of using opengl and translatef

SetScale?

lol HK where have you been???

see http://www.blitzbasic.com/Community/posts.php?topic=63654#711382

http://www.blitzbasic.com/Community/posts.php?topic=63683#710769

http://www.blitzbasic.com/Community/posts.php?topic=49901#557068

those were my attempts at true zooming.

this was my original code archive entry
http://www.blitzbasic.com/codearcs/codearcs.php?code=1436

problem i encountered was that, when zooming in, the ships did not maintain the same distance apart from one another, they got closer together as you zoomed in and further apart as you zoomed out. which shouldn't be, you are only zooming in, nothing is moving.

in one of those threads applying the scale to the x y coords of things drawn worked, but i didnt like that x and y coords for things were adjusted, when you moved the mouse wheel.

so if after viewing those you still recommend scale for zooming, then be my guest and show me how :)

Scale just sets the size of a given image, nothing to do with the relationship between several images. Obviously that's something you would have to code yourself.

That said it'd be nice to have control of the viewport/projection matrix to scale the entire display regardless of coordinates.


While Not KeyHit(KEY_ESCAPE)
AutoMidHandle(True)
Cls
		
	SetColor(244,122,134)
	SetScale(1.0 + newscale,1.0 + newscale)
	
	
	DrawScaleRect(500,300,100,100,newscale+1.0)
	DrawScaleRect(100,300,100,100,newscale+1.0)


	'call function
	zoomcamera()
	
Flip

Wend

Function DrawScaleRect(x#,y#,wide#,Hite#,Scale#)
		
	DrawRect(x*Scale#,y*Scale,Wide*Scale,Hite*Scale)
		
End Function

Function ZoomCamera()
	Local MaxZoom:Float  =  3.0
	Local minzoom:Float  = -0.8
	Local speed:Float    = 0.03
	Local set_Zoom:Float
	Local zoom			
	
	'mouse wheel value = to variable zoom
	zoom = MouseZ()
	 
    'so that it doesn't zoom in whole numbers( which wouldn't be smooth)
	set_Zoom = 0.2 * zoom 
	

	'limit max zoom in		
	If set_Zoom > maxZoom
		Set_Zoom = maxZoom
	End If 
	
	'zooms to the set zoom value(determined by how much you scroll)		
	If KeyDown(KEY_Z) = 0 And set_Zoom > newScale
		newscale :+ speed 
	End If
	
	'same as above 	
	If KeyDown(KEY_X) = 0 And set_Zoom < newScale
		newscale :- speed 		
	End If
	
	'limit zoom out		
	If newscale < minZoom
		newscale = minZoom
	End If
	
	SetColor(100,100,100)
	SetScale(1.0,1.0)
	DrawText("Newscale: "+newscale,100,100)
End Function



lol HK where have you been?
OKok, but it not a problem I have, because I draw everything sethandled (when Images) around the origin. (eg, simple example )
Graphics 800,600

sc:Float = .05
Dir = 1
SetOrigin 400,300
rot=0
Repeat
SetRotation rot
rot:+1

Cls
SetHandle 0,0
Plot 0,0
SetScale sc,sc

SetHandle 30,30
DrawRect 0,0,25,25

SetHandle 60,60
DrawRect 0,0,25,25

SetHandle -60,60
DrawRect 0,0,-25,25

SetHandle -30,30
DrawRect 0,0,-25,25


Flip

Delay 10

sc:+ (0.01*Dir)
If sc<0.05 Or sc >2.5 Then dir:*-1
Until KeyDown (Key_Space)

Basicly, all my sprites (for example) are drawn at Origin (ie DrawImage 0,0) And the actual positioning Is done with setHandle

Would be nice to have the 3D module in time for christmas :-)

No chance.

It's getting close though isn't it? I personally am giving it another 4-5 months, 6 months maximum, before I start spamming about Max3D.

I hope it's shaping up nicely. It would be nice to get a little christmass news about Max3D around mid December to keep us all in the know.

Imagine it! An all in one solution for 2d, 3d & GUI development all designed classic Blitz Style.

BlitzMax Core - $ 80
Max GUI - $ 30
Max3D - $ 90

Total - $200

Perfect. :)

I'll pay extra for a threading module and maybe an official RDBMS module.

Oh, and I'd pay even more for an updated socket module that allows overlapped IO and IO completion ports on Windows.

Guess I should start working on getting comfortable with C++ and the WinAPI.

Can I pay even something more to get a decent, integrated GUI builder?! ;-)

I would pay more than even that if the 3D stuff would work together with the BMax 2D Commands so I could use my own GUI library I already wrote using the 2D commands

I would pay even more than even more than even that for full documentation plus extensive tutorials.

stop using your examples on rects. rects are easy to scale and keep the distance, they have parameters supplied for controlling there width and height. images don't.

80-100$ would be what I would be willing to pay if the 3D mod would be OO oriented (unlike Max2D)

if the 3D mod would be OO oriented (unlike Max2D)
huh?

@Gfk, that just means that they are only using the access funtions, and havent realised what the underlineing structure is. Which is easy to do. (Which I suppose suprises me that dream said it, oh um)

I'm inclined to agree with Dreamora ( and I'm not sure which of us should be more surprised by that ) because while Max2D and MaxGUI are organized into types and do have methods, they're not what I would call Object Oriented. They're procedural with methods added as an afterthought. Now to be clear, that's not intended as a criticism, because I think it's the most sensible way to go. A lot of people are coming to BlitzMax not fully understanding OOP - myself included - and having the two main modules people are going to want to use Object Oriented would make it difficult for those newcomers.

Let get this straight, is all you and Dream are saying is that its not organised into the Objects that you want?

Because if it wasnt object orinatated we couldnt inheret the DX (or OpenGL), stuff from the base stuff. I think I understand what you mean tho, but surly that would mean we (As Bmax Users), would have to keep GC as an Object to call the functions.

And, (and again may be wrong), could we have more than one GC, like could I have two for two monitors, or do I still have one which is spilt across them. Because if I can only have one, What would the point of methods? If we could have two, then Ive changed my mind and I agree with Gab and Dream, if on the otherhand we can only have one, then I still agree with GFK, and stand by my statement above.

Object Oriented: Everything bases on Objects with methods.
This is something Max2D extremely fails.

There is no drawback with OO designed modules as well, because it is FAR easier to create a procedural wrapper for a fully OO designed module than it is to create an OO wrap over a mixed structure as Max2D is (max2d uses objects but the methos are mainly for internal use. External is procedural only).
From that point of view, Max2D is just struct based as the "documented use" of Max2D is procedural only, using Types only as container for information, not as objects.


' OO Design
Type TTest
  method sprint()
    print "Test"
  end method
end type

Function TTest_sprint(obj:TTest)
  obj.sprint()
end function



' Mix Design
Type TTest
  field dummy:int
end type

Function TTest_sprint(obj:TTest)
  obj.sprint()
end function


In the later, OO extension is very hard to do as the functionality is not OO (you need to reimplement all the functionality again instead of just overloading what you don't want to change) and sadly this is exactly the way many BM main modules work.

I'm aware that functions taking TTest will take extended as well. But functions are not encapsulated. They are somewhere and can be anywhere as long as they know of TTest in some way.

If you moved GC as a field of TMax2DGraphics (or TGraphics obviously), then all the functions could simply be moved into TGraphics.
But then when I have created my graphics object, I would have to keep track of it. Of which there is no point, unless I can have two Graphics Objects, (A point you didnt answer). Mybe you are right and it could be more oop. But it would only be a singleton, and then I would need
GC:TGraphics = Graphics (width,height,depth)
GC.SetImageFont(font)
RAther than
Graphics(width,height,depth)
SetImageFont(font)
And I would much rather use just the second one. Unless as Ive asked you can have two Graphics contexts.

I can see your point about extending all the functions of the GC, but to be honest I just write new ones anyway, in exactly the same way as you would if the function had been member functions, because Im overriding them, so it doesnt realy matter if they are there or not. (if you see what I mean), because I wouldnt be useing the nonexistant Function anyway

after the hijacking of this thread :)

maybe you could plug the blitz3d module into blitzmax to be used, possible? yes no?
maybe?

nope, not possible, all ready been discussed.

You could consider using miniB3D though.

maybe you could plug the blitz3d module into blitzmax to be used, possible? yes no?

very much possible :) there are a few non-programming reasons why there is not a Blitz3D mod.

i would recommend MiniB3D as a good alternative. it is well-written/maintained, and suits the cross-platform nature of BMAX.

minib3d...can i use its scale z .. to scale the depth of the screen?