Direct x 9 Userlib

Community Forums/Showcase/Direct x 9 Userlib

Ploppy(Posted 2013) [#1]
Hello all,
Well I've hit a bit of a snag with my very ambitious project Chipmunk, so I've decided to put it on hold. It just needs more maniability that I can't get out of Direct x 7 (resident in Blitz). So to remidiate this problem I'm having, I have decided to do something as equally ambitious, to create a direct x 9 userlib that will replace the blitz commands. I only begun ten days ago, but have come very far already with 85 commands under my belt. This userlib is incomplete, you will only be able to do a certain amount of things, but am releasing this first version to show where I am with it. I intend to continue with this project and cover as many blitz commands as possible, keeping with each commands parameter number, order and type so as to maximize compatibility. I also intend to release further free (no strings attached at all) versions of this on the blitzbasic site (hoping to be able to complete it, I have already come pretty far). I know there is a lot of demand amongst us blitz users since many a year, so I wish to share it with you all to keep blitz alive. I think blitz3d deserves a DX9 version, will give it a new lease of life I personally think. Love to know your opinion.

Please note that any commands that have optional parameters in the original blitz3d version are obligitory. Otherwize, things remain the same. For example EntityX#(entity,[global]) become dEntityX#(entity,global).

All directx9 commands are preceded by a d.

Download

Command list available in this version....

dCountGfxDrivers%() - Fully functional
dGraphics3D%(width%,height%,depth%,mode%,vsync%) - Vsync is a new parameter, not yet implmented but will choose if vsync on or off
dEndGraphics()- Fully functional
dShowMouse()- Fully functional
dHideMouse()- Fully functional
dKeyDown%(key%)- Fully functional
dMouseDown%(button%)- Fully functional
dGetMouse%()- Fully functional
dMouseHit%(button%)- Fully functional
dWaitMouse()- Fully functional
dMouseX%()- Fully functional
dMouseY%()- Fully functional
dMouseZ%()- Fully functional
dMoveMouse(x%,y%)- Fully functional
dFlushMouse()- Fully functional
dMouseXSpeed%()- Fully functional
dMouseYSpeed%()- Fully functional
dMouseZSpeed%()- Fully functional
dKeyHit%(key%)- Fully functional
dFlushKeys()- Fully functional
dWaitKey()- Fully functional
dLoadFont%(filename$,height,bold,italic,underline) - doesn't do much for the moment but wont crash out
dCls()- Fully functional
dClsColor(red#,green#,blue#)- Fully functional
dFlip(vsync%)- Fully functional
dFrontBuffer%() - don't use, does nothing for the moment
dBackBuffer%()- don't use, does nothing for the moment
dColor(red%,green%,blue%)- Fully functional
dPlot(x%,y%)- don't use, does nothing for the moment
dCreateMesh%()- works but render system will not show yet
dCreateCamera%()-Fully functional
dPositionEntity(entity%,x#,y#,z#,global%)-Functions only with global position for moment
dCreateTeapot%() - New command, taken from directx function - self explanatory
dRenderWorld(tween%) - tween bit don't work for the moment
dAddVertex%(surface,x#,y#,z#,u#,v#,w#) - works but won't render for the moment
dCreateSurface%(mesh) -ditto
dCountVertices%(surface%) -fully functional
dVertexColor(surface,index,red#,green#,blue#,alpha#)-fully functional
dVertexRed%(surface,index) -fully functional
dVertexGreen%(surface,index)-fully functional
dVertexBlue%(surface,index)-fully functional
dVertexAlpha#(surface,index)-fully functional
dVertexTexCoords(surface,index,texture_u#,texture_v#,texture_w#,coord_set)-fully functional
dVertexNormal(surface,index,x_normal#,y_normal#,z_normal#)-fully functional
dVertexX#(surface,index)-fully functional
dVertexY#(surface,index)-fully functional
dVertexZ#(surface,index)-fully functional
dVertexNX#(surface,index)-fully functional
dVertexNY#(surface,index)-fully functional
dVertexNZ#(surface,index)-fully functional
dVertexU#(surface,index)-fully functional
dVertexV#(surface,index)-fully functional
dVertexW#(surface,index)-fully functional
dCountSurfaces%(mesh)-fully functional
dClearSurface(surface,vertices,triangles) - needs some work
dAddTriangle%(surface,vertex_1,vertex_2,vertex_3)-fully functional but of course wont render for the moment
dCountTriangles%(surface)-fully functional
dTriangleVertex%(surface,triangle_index,corner)-fully functional
dCameraViewport%(camera,x,y,width,height)-fully functional
dCameraClsColor(camera,red,green,blue)-fully functional
dCameraProjMode(camera,projection_mode)-fully functional
dCameraRange(camera,near#,far#)-fully functional
dCameraClsMode(camera,cls_color,z_buffer)-needs a bit of work yet but almost there
dCameraAspect(camera,aspect_ratio#)- new commands, can now control screen aspect ratio for funky fx (default=screen w/screen h)
dAutoCameraAspect(camera)- will set aspect ratio to default
dCameraFOV(camera,focus#)-another new command, set camera's field of view angle
dGetCameraFOV#(camera) - retrieve current FOV value for camera
dGetCameraAspect#(camera) - get cam's aspect ratio
dCreateTorus%(inner_radius#,outer_radius#,sides,rings) - -fully functional
dCreateCube%()-fully functional
dCreateCylinder%(radius1#,radius2#,length#,slices,stacks)-fully functional
dCreateSphere%(radius#,slices%,stacks%)-fully functional
dFreeEntity(entity%)-fully functional
dEntityParent(entity%,parent%)-fully functional
dCountChildren%(entity%)-fully functional
dGetChild%(entity%,index%)-fully functional
dEntityClass$(entity%)-fully functional
dGetParent%(entity%)-fully functional
dNameEntity(entity%,name$)-fully functional
dEntityName$(entity%)-fully functional
dEntityX#(entity%,global%)-only works with global param set to true for the moment
dEntityY#(entity%,global%)-only works with global param set to true for the moment
dEntityZ#(entity%,global%)-only works with global param set to true for the moment
dRotateEntity(entity%,pitch#,yaw#,roll#,global%) --only works with global param set to true for the moment
GetMatElement#(entity%,row%,column%) -fully functional

So, you will be able to mess around with this lib to get an idea of how it is so far but not much more than that for the moment. But I will add as much as I can when I can and add eventually new stuff as well (such a shader support - will be funky).

Please note that you will only be able to render the default primitives for the moment (teapot, sphere, cube, torus and cylinder). Will work on the meshes (almost done in fact) and then you'll be able to create your own like in blitz.

I have tested this dll in blitz3d and is running remarkably well, I have managed to get dazzling rezults speed wize - up to 1500 frames per second on my gfx card from a few render tests. Yummy.

Sorry, by the way - no text functions for the moment, if you wish to display any text you'll have to use the standard blitz commands at the end of the program after a dEndGraphics() call...

Hope you like....


Mainsworthy(Posted 2013) [#2]
one word talented


BlitzSupport(Posted 2013) [#3]
Sounds awesome!


Kryzon(Posted 2013) [#4]
Can you share the source? The reason being to port this to MiniB3D as a Direct3D 9 "driver" to accompany the current OpenGL one.
It would certainly be better with notebook motherboard graphics on Windows.


Yue(Posted 2013) [#5]
User lib no found!!


siredblood(Posted 2013) [#6]
Not sure why, but the objects dont render in the test.... just times out and does the outputs.

Ill look more into it later.


Ploppy(Posted 2013) [#7]
Yep, I've noticed that too - this happens for some reason in debug mode - gotta figure out why. Otherwize, works in release mode (at least does for me)...


Ploppy(Posted 2013) [#8]
Right, problem solved -sorry about that mishap - forgot the scalar values in matrix which confused renderer. New version uploaded...


Hotshot2005(Posted 2013) [#9]
I have test it but it doesnt work at the moment


siredblood(Posted 2013) [#10]
Make sure your not in debug, then works fine


Ploppy(Posted 2013) [#11]
Should work in debug mode too, have fixed that problem. Just uploaded new version with added commands...

dCreateTexture%(width%,height%,flags%,frames%) - fully functional but renderer will not yet show texture so for the moment a little bit useless
dTurnEntity(entity%,pitch#,yaw#,roll#,global%) - works in global mode
dMoveEntity(entity%,x#,y#,z#) - glitchy, won't crash but needs work
dTranslateEntity(entity,x#,y#,z#,global) - work in global mode
dEntityRed%(entity%) - new command, get red element of entity color
dEntityGreen%(entity%) - same as above but for green element
dEntityBlue%(entity%) - yup, you've guessed it...!
dEntityColor(entity%,red%,green%,blue%) - fully functional
dAmbientLight(red%,green%,blue%)- fully functional

Now comes with a new test program that demonstrates it's present capabilities. Straight up, with this test program I'm getting an average of 2500 frames per second. Yikes!!


Hotshot2005(Posted 2013) [#12]
It still keep saying Function dgraphics3d not found


Ploppy(Posted 2013) [#13]
Silly question - have you copied BlitzDX9.decls and BlitzDX9.dll to your userlibs folder??


Wolf1870(Posted 2013) [#14]
on my computer it runs great, no problems.
please continue this work !!!


Guy Fawkes(Posted 2013) [#15]
OMG! PLEASE add shaders! O_O For the love of god, PLEASE add shaders! O_O


GaryV(Posted 2013) [#16]
Hotshot: Have you actually installed DirectX 9?


Hotshot2005(Posted 2013) [#17]

Silly question - have you copied BlitzDX9.decls and BlitzDX9.dll to your userlibs folder??



It is working Now :-D


Ploppy(Posted 2013) [#18]
New stuff out and uploaded. Check it out (still haven't yet fixed dMoveEntity - bit erratic for the mo). Rest assured Thunros, shaders are planned and other fun stuff too such as particle systems....

dEntityFX(entity%,fx%) - works but recnderer will only yet recognise flatshaded and backface culling flags
dGetEntityFX(entity%) - it's all in the name, really
dDither(state%) - same as blitz command
dCameraFogMode(camera%,state%) - fully functional
dCameraFogColor(camera%,red%,green%,blue%)- fully functional
dCameraFogRange(camera%,near#,far#)- fully functional
dLoadTexture%(file$,flags%)- fully functional but renderer not yet operable
dEntityTexture(entity%,texture%,frame%,index%) - same applies
dCountGfxModes3D%()- fully functional
dGfxModeWidth%(adapter%)- fully functional
dGfxModeHeight%(adapter%)- fully functional
dGfxModeDepth%(adapter%)- fully functional
dGfxModeRefreshRate%(adapter%)- fully functional and brand new (wow)
dWireframe(enable%) - fully functional, same as blitz command
dEntityWireframe(entity%,enable%) - new you can individually control each mesh's wireframe state
dPointframe(enable%) - global point render state
dEntityPointframe(entity%,enable%) - same as above, but for entities
dScaleEntity(entity%,scale_x#,scale_y#,scale_z#,global) - works, but only for global mode for the moment
dEntityScaleX#(entity%) - self explanatory...
dEntityScaleY#(entity%)
dEntityScaleZ#(entity%)




Why0Why(Posted 2013) [#19]
Wow, impressive!


Yue(Posted 2013) [#20]



Ploppy(Posted 2013) [#21]


This i've gotta phone in. Got textures working (kind of) - must fine-tune stuff but the gist is there (try demo). Also can now create surfaces/triangles (see demo too, there's one out there) - need fine tunin g too but the base is there (yay). dUpdatenomals doesn't yet work, so I programmed the normals manually with dVertexNormal.

Enjoy...

And Yue, have did you copy blitzdx9.decls to your userlibs folder before compiling? If you didn't, there's no wonder you're getting an error.

Me gusta mucho el espagnol pero le conesco poco. Siento no puedo ayundar o explicar (?) bien en espanol.


Wolf1870(Posted 2013) [#22]
Small note: the command> dEntityColor cube, 0,0,0 <draws a red clay on a cube. Also between values &#8203;&#8203;for example > dEntityColor cube, 0,100,50 <be misrepresented. Best wishes and keep it up!!


Yue(Posted 2013) [#23]
No work, see please video.



DirectX 9 C last update.
Windows XP SP 3


Ploppy(Posted 2013) [#24]
You'll notice also that in the latest test demo that a texture is on all the meshes, although there is only one dEntitytexture in the program. I have intentionally overridden this in the dll for the sake of testing, that's all. The test programs are there for a specific reason, I'll be tweaking things a lot. There is a lot yet to be completed/improved - but for the moment I'm working on the foundations. After that, I'll move onto the detail.


Yue(Posted 2013) [#25]
give me a compiled executable on your machine, to rule it can be, I copy the directory blitzdx9.decls userlibs but does not work.


Ploppy(Posted 2013) [#26]
Yue,
I see what the problem is, to get it to work you have to copy the two files

blitzdx9.dll
blitzdx9.decls

to the folder userlibs that is in your blitz3d folder (default folder location is "c:\program files\blitz3d").


Yue(Posted 2013) [#27]
Ok, one moment i test here.


Yue(Posted 2013) [#28]
No, sorry no work here.




It's find dll?



Yue(Posted 2013) [#29]
Video No Work here....



virtlands(Posted 2013) [#30]
-- JV-ODE Physics Thread ==> http://www.blitzbasic.com/Community/posts.php?topic=89252


Ploppy(Posted 2013) [#31]
Ah yes, I see what you mean about jv-ode. I think I'll have to rename the commands in my dll so as to avoid confilcts. Thought I was safe with throwing a 'd' in before all commands. Well, well - back to the drawing board ;D

As for the dcls routine, I may be wrong but it seems to me that the DGraphics3d routine has failed and thatqs why dCls crashes. Screen doesn't exist to clear. I will look into that, but perhaps it's my test program that I quickly wrote that is at fault. Try changing the line

ret=dGraphics3d(maxw,maxh,32,1,1)
to
ret=dGraphics3d(800,600,32,1,1)

for example.

Otherwise, let me know - I need to bug hunt and ensure compatibility....


Ploppy(Posted 2013) [#32]
Yue, as for your problem - I don't think my dll has anything to do msvcrt.dll (at least I have no includes for this dll. It may be a conflict with another userlib. Or perhaps the issue was already there before copying the dx9 dll over.

Try temporarily taking out all other dll's from your userlib folder and see what that does....

Otherwise, I'm a bit stumped - no other ideas for the moment ;D


Yue(Posted 2013) [#33]
Definitely something happens, and the only way I see is that you make a compilation of an executable and passes me, to know the result of what happens here.

A greeting.

Edit:

This is really weird, fastlibs eg if they work on my computer and Xors3D same engine. So esoty really confused and do not know what can be, and if you do not know but me :S


virtlands(Posted 2013) [#34]
-- (old post)


Ploppy(Posted 2013) [#35]
Okay, have put in a little error handler, let me know if you get a error window come up - will indicate where I need to work a little more...

Have changed all commands to prefix dx instead of d, so not to conflict with jv-ode.

Yue, I'm afraid I really didn't understand your last message. Thanks for your support anyway even if you're not having much luck with my dll.


virtlands(Posted 2013) [#36]
-- (old post)


Yue(Posted 2013) [#37]
:(




Ploppy(Posted 2013) [#38]
Right, just found out what msvcrt.dll is all about. It is used by dll for commonly used functions in c++ projects. A dll for dll's, if you like. I have reconfigured my dll now so that these functions are now part of my dll.

Yue, you should be fine now, at least I hope. Let me know how you get on...


Ploppy(Posted 2013) [#39]
Virtlands, think I've found out why it's not working on your machine, it's all about initializing the directx device, even before the dxCls command. I have changed the code now, so that it detects different type of gfx cards, I beleive that this may be the cause. Please keep me at bay from the pumpkins, I feel them closing in....


Guy Fawkes(Posted 2013) [#40]
DIE YOU PUMPKIN SCUM! *SHOOTS CHRONOSCEPTER* =D

XD

Anyway, did you edit your first post? Is that where I can find the fix, Ploppy? :)

Thanks!


Ploppy(Posted 2013) [#41]
Yes, I don't need to edit the first post because it contains a link to a file that I have on my own site. All I need to do is update the file in question and the link will always point to the one it's referring to, so long as I don't change the file name...

In any case, here it is again...
Download

Good evening all, until the next time...


virtlands(Posted 2013) [#42]
-- (old post)


Yasha(Posted 2013) [#43]
Right, just found out what msvcrt.dll is all about. It is used by dll for commonly used functions in c++ projects. A dll for dll's, if you like.


msvcrt.dll is the C and C++ runtime library.

Yue is (if I recall/judge the shots correctly) using Windows XP. The exception handling system in question isn't a part of Windows XP and was introduced sometime later. I assume you're compiling on Windows 7 or 8, yes?

Since this is reliant on things (I'm pretty sure) you're not allowed to redistribute, you can probably best fix this at the compiler level by finding a VS compatibility switch for older versions of Windows (note that some of the recent VS versions explicitly don't support XP and this is why... I don't remember the details of which).

If you can compile your project with MinGW, that should also solve the problem as I believe it uses portable (albeit slower) exception handling by default.

(Don't take my word for any of this.)

EDIT: oh, you already fixed it. Whoops.


Guy Fawkes(Posted 2013) [#44]
When are shaders gonna be added & is this DLL compatible with blitz' internal Networking code? :(


Yue(Posted 2013) [#45]
Yes, Yasha i am use Windows XP. Here continue no work.


virtlands(Posted 2013) [#46]
-- (old post)


Yue(Posted 2013) [#47]
I must comment that this lib is asking me to launch an executable. dxgi.dll


virtlands(Posted 2013) [#48]
-- (old post)


Guy Fawkes(Posted 2013) [#49]
WHO'S WITH ME?!

*Chants*

Shaders... SHADERS. SHADERS! =D

*Grabs pumpkin cannon* :3


Yue(Posted 2013) [#50]
Windows XP, Windows XP, Windows XP, Windows XP =D


Guy Fawkes(Posted 2013) [#51]
SHADERS! :3

*Shoots Yue with a Pumpkin cannon* :3


Ploppy(Posted 2013) [#52]
Have just checked it out on an xp system and it doens't work here either. Strange though, virtlands, you mentioned that xp is not compatible with direct x 10. I am although using DX9 - that should pass, shouldn't it.

What am I doing wrong, any thoughts anyone??? I would like to maximize compatibility.


col(Posted 2013) [#53]
Hiya Ploppy,

A couple of things to think about here...

The runtime library...
There are 3 types of library you can use when building apps/dll.

1) .lib - static library that contains the real code
2) .lib - static library that contains stub code for the linker, your dll/app will load the required dll at runtime for the real code.
3) .dll - dynamic library that contains the real code.

It looks like you've used MS visual studio 2010 to build your dll library using the 2nd option. So I'll assume you are? This means the end-user system will need the visual studio 2010 runtime dll library installed on their system for it to run. It's free from MS - its best and safer to download the latest version from their website or supply the same install package as part of your app. Its ok to have the 2008/2010/2012 runtimes all installed at the same time as the real runtime dll files are named different to each other.

To link so as not to require the dll ( option 2 ) then you must link against the runtime statically ( option 1). To do this in studio '10 go to C/C++ Properties -> Code Generation and under runtime library select multi-threaded (/MT) and not multi-threaded dll (/MD) from the drop-down.


dxgi.dll is a crucial part of Dx10 and up. The .lib for this is of option 2 only. So it looks as though you've built your dll with linking the dxgi.lib in the build process - which mean your library will still need the dxgi.dll to run correctly. Because dxgi.dll isn't in the xp system then your dll will fail to load on an xp system.

The solution...
If you want to support both Dx9 and Dx10 in a single dll library then you'll need to check for the presence of the dxgi.dll file. If it is present then load the library dynamically and use GetProcAddress to get handles to the functions that you want to use.

On the other hand... if you didn't mean to support Dx10 then check if dxgi.lib is in the linker settings and remove it.


Ploppy(Posted 2013) [#54]
Col,
Priceless info, thanks very much for that, I'll sort that out later. You're completely right, I am using VS10 and I did include dxgi lib to begin because my initial intention was to make a dx11 dll for blitz. I since decided to go for dx9, but didn't take out the lib. So that's why...

Nice one

Cheers


col(Posted 2013) [#55]
You're welcome.

If I remember correctly you may get linker warnings when you use the static run-time linking. If so then you'll need to set the linker to ignore the default libs which means you then need to specify the runtime library to be linked in. In which case go to Linker -> Input -> Ignore all default libs and set to Yes (/NODEFAULTLIB) from the drop-down, and you'll then need to include the msvcrt.lib ( for release builds or msvcrtd.lib for debug builds ) in the list of Additional Dependencies.

Yue should be able to use your library after that :)


Yue(Posted 2013) [#56]
God has heard my prayers = D!!


Ploppy(Posted 2013) [#57]
Okay, new cleaned-up version out. No more dx11. I even found out that one of my first commands countgfxadapters was using the dx11. That's one good reason for incompatibility. Function changed, rest assured. Boy, is egg all over my face. Sorry for the technical hitch, guys - can't promise there won't be others, for I still have a way to go to match blitz's range of commands....

In any case (especially Yue), thanks for your patience....


Guy Fawkes(Posted 2013) [#58]
Now can "God" please hear MY prayers, and add full support for Shaders / Entity Picking & Collision? :( T_T


Ploppy(Posted 2013) [#59]
One thing at a time, I've come a long way and definatley would like to make it as complete as poss. but I've only done part of it up till now and probably the easiest part. Some commands coming up involving some tough maths - gonna have fun with that, no doubt...! I have no maths nor computing qualifications whatsoever, this is all self-taught and a lot of trial and error comes into it all. But what I lack in education I make up for in determination. Can't promise nothing but remember the main reason for the creation of this dll is to be able to boost a project I'm already working on that is screaming out for dx9. I will plan to cover as much of the dx7 equivalent as I can (no md2 or bsp though - no one will want it I think), but I will always have chipmunk in mind at the end of the day...

By the way, Thundros - you spoke earlier about network support - nah don't think I will but I will probably include a routine I have already written the blitz doesn't have at all, background html downloading.


Hotshot2005(Posted 2013) [#60]
Blitz 3D Directx 9 Well Done

Your Next Goal for Next year Blitz 3D Directx 11 :-P


GW(Posted 2013) [#61]
these links might be useful:
the geometry code for blitz3d from Mark. http://www.blitzbasic.com/Community/posts.php?topic=42657

max3d sourcecode, the successor of blitz3d writen by Mark. It's opengl, but there might be some insight into how B3d runs internally. https://github.com/Difference/max3d


Ploppy(Posted 2013) [#62]
Thanks muchly for the math, will check it out...

Been messing around with lights this evening. New test demo out (test3.bb) , made with Thundros in mind - hope you enjoy (and as always, hope it works too ;)

Happy Halloween, y'all


Guy Fawkes(Posted 2013) [#63]
Hi, Ploppy.

I just tested your demo release of test3.bb, and unfortunately I get an error for this command:

"dxCountGfxModes3D()"

Even though the DECLs is in the userlibs folder, and the DLL is in the same folder that test3.bb is... :/


Wolf1870(Posted 2013) [#64]
last version was very good, the new demo I get: userlib not found :-(


Ploppy(Posted 2013) [#65]
Right, okay try again - just changed a bit of code - strange it worked b4 for you and not now - what did I do - and not good it's not working right at the beginning of the code.... be it gremlins???


Yue(Posted 2013) [#66]
Hi, this still does not work, I have the latest updates to DirectX 9C and telling me that the lib was not found, so I think an executable with test3d.exe and shows me this:



Gretins.


Wolf1870(Posted 2013) [#67]
Sorry, same again: userlib not found.


Ploppy(Posted 2013) [#68]
New version out - try again - can't garantee will work..


Wolf1870(Posted 2013) [#69]
the ghosts and gremlins are gone. Running perfectly again. Great Work and many thanks for the work in the scary night! :-)


Yue(Posted 2013) [#70]
Ok, I have seen something like a pumpkin, and when I finish I see relevant information:

Seccond passed: 3,836
Rendered Frames: 870
Frames per Second: 226 799

I must mention that when I try to launch the debugger crashes the application and get this.

Lib DirectX Error
Can not Create DirectX device.

and throws a memory access violation.

Greetings.


Yue(Posted 2013) [#71]
Ok, as I hear, I have put numbers on the charts and in the debugger all goes well, that is not maxw use variables, MaxH

and just put 800,600 or 1024 800 etc, right now if I visualize the scene as it was dark and you had some commands in comments.




Yue(Posted 2013) [#72]
Debuger i use variables maxw and MaxH




virtlands(Posted 2013) [#73]
-- (old post)


Yue(Posted 2013) [#74]
Here if the command works, what happens is that I do not visualize test3 scene if projected light, If you use the editor Definitions Ideal use Refresh.


Yue(Posted 2013) [#75]
dxGraphics3D Windows, see




Ploppy(Posted 2013) [#76]
The egg sure is sticky stuff... sorry for the inconvienience, but I am in test mode.

Think I must have taken off too many libs - will sort out later (or attempt to ;)...


Ploppy(Posted 2013) [#77]
Okay, new version out a few new commands too...

dxLoadMeshX%(file$)- will load up a .x format mesh
dxCreateLight%(type%)- creates a light - spot only available for the moment - can't change colour from default but soon will be able to
dxColorRed%() - same as blitz's ColorRed
dxColorGreen%() - ditto
dxColorBlue%() - ditto
dxGraphicsBuffer%() - Same as graphicsbuffer()
dxSetBuffer%() - Same as setbuffer - can only set to frontbuffer() or backbuffer() for the moment
dx3DFont%(font$,bold%,italic%,underline%,strikeout%) - load up a font to use in 3d text
dxCreateText%(text$,extrusion#) - Create a 3d text mesh
dxPlot(x%,y%) - will now plot to the backbuffer in the color chosen by dxColor

Later...


Yue(Posted 2013) [#78]
Perfect!!




Guy Fawkes(Posted 2013) [#79]
Ploppy, you deserve a hug. XD (hugs) :P


Yue(Posted 2013) [#80]
Hello, I created two models astronaut to do the tests, are in xy format b3d format, if you need that will encourage me comets.


https://dl.dropboxusercontent.com/u/39767349/Models.rar


virtlands(Posted 2013) [#81]
-- (old post)


RifRaf(Posted 2013) [#82]
Im impressed with your update frequency!

Ill be very very excited when this all comes together. I was unsure at first but as you make more posts im starting to believe you may get 'er done.

Good work, dont give up !


Ploppy(Posted 2013) [#83]
P'raps, I'll give it a good go in any case. It all seems to be coming together little by little.

One thing I will say about current developments is that after a bit of reading I have found that the lack d3dx9d_43.dll that is causing errors on some systems is because the systems in question are not completly updated. The 43 refers to the sub-version number of directx 9, and contains patches and wotnots to correct bugs and alike. I am having the same problem on the xp machine I'm testing on, and have found that this file indeed does not exist in the windows/system32 folder where shared dll's reside. I cannot update directx on this xp machine (needs admin permissions which I don't have). So I may be tempted to downgrade my direct x SDK so this problem doesn't reappear.

What do you think, should I downgrade a little??


col(Posted 2013) [#84]
Hi again,

Nah, don't downgrade. Request people to keep the system up to date :p

The d3dx9d_43.dll ( linking with d3dx9d.lib ) is the debug version that contains debug symbols and isn't as optimised so as to aid development, you should really use d3dx9_43.dll ( link with d3dx9.lib ) for the release build.


nrasool(Posted 2013) [#85]
@Ploppy Congrats on developing this, great to see Blitz3D being kept alive, it is one of the best tools I have used :)


Ploppy(Posted 2013) [#86]
Right, have got rid of d3dx9d.lib, don't need it. Should work now, thanks again col for your help - didn't see that one.

That's all I've done for the moment, I have been working today, after all....


Ploppy(Posted 2013) [#87]
Some new stuff, have updated test demo too...:

dxRect(x%,y%,width%,height%,solid%) - same as bitz's command, only work on backbuffer for moment....
dxTextureBuffer%(texture):"dTextureBuffer"- same as bitz's command
dxGraphicsWidth%():"dGraphicsWidth"- same as bitz's command
dxGraphicsHeight%():"dGraphicsHeight"- same as bitz's command
dxGraphicsDepth%():"dGraphicsDepth"- same as bitz's command
dxGetColor(x%,y%):"dGetColor"- same as bitz's command -only work on backbuffer for moment....
dxReadPixel%(x%,y%,buffer):dReadPixel- same as bitz's command -only work on backbuffer for moment....
dxLightColor(light%,red%,green%,blue%)- same as bitz's command
dxLightRange(light%,range#)- same as bitz's command
dxLightConeAngles(light%,inner_angle#,outer_angle#)- same as bitz's command
dxHideEntity(entity%)- same as bitz's command
dxShowEntity(entity%)- same as bitz's command


Yue(Posted 2013) [#88]
PowerFull!! =D






virtlands(Posted 2013) [#89]
-- (old post)


virtlands(Posted 2013) [#90]



Ploppy(Posted 2013) [#91]
More stuff out, have been principally working on 2d stuff today, glad to be able to display 2dtext finally. Now you have the choice of classic 2d, or new sparkly 3d extruded text. I digress, here's a breakdown of what's new....

dxEntityOrder(entity%,order%) - works only on backbuffer for moment
dxOval(x%,y%,width%,height%,solid%) - works only on backbuffer for moment
dxLine(x1%,y1%,x2%,y2%): - works only on backbuffer for moment
dxText(x%,y%,text$,center_x%,center_y%) - works only on backbuffer for moment
dxSetFont(font%) - fully working
dxFreeFont(font%) - fully working
dxLoadFont%(filename$,height,bold,italic,underline) - working, but not for underline - will sort that out...

Please note that system will use arial 16 as default font if you do no load one up...

Download

Have updated demo at same time, please note that entity order is taken into account by renderer now...


Guy Fawkes(Posted 2013) [#92]
AWESOME STUFF, PLOPPY! KUDOS to you! :D

Can't WAIT to see what you have in store for Shaders! :D


Ploppy(Posted 2013) [#93]
Stop it, you're scaring me, pretty much everything I have programmed here is very much new territory. Shaders seems extremely daunting, but I will tackle it, just probably need a few drinks after. I wish to harness as much as I can out of DX9, for my own utility and for all blitz users. We'll see, I don't wish to be too optimistic at the same time, but so far so good quite honestly... Really glad about all the interest that everyone is showing, spurns me on...

Long live Blitz3D people... ;D


Guy Fawkes(Posted 2013) [#94]
^LOL @scare. It was halloween 4 days ago. TRICK OR TREAT! :P Lol, I'm just kidding. GOOD JOB, Ploppy ^_^


Rick Nasher(Posted 2013) [#95]
Oh-my, oh-my, oh-my, this is *bliep-bliep*tastic!!

Can't believe this is happening! I trully hope you'll go all the way and breathe new life into good old Blitz3D (as it should).
That will definitely rock my world and I'm sure many others. I applaud you.

Btw: runs very well on my laptop(Intel Core 2 Dual T555 1.83 Ghz, 3GB RAM, NVIDIA Geforce 8400GS).


Guy Fawkes(Posted 2013) [#96]
^ WHAT HE SAID! =D


Yue(Posted 2013) [#97]
Pefect!!



Ploppy(Posted 2013) [#98]
I like to go off on tangents, today one area, the next day something else. Today I thought I'd start off a little bit on our favourite bit about dx9...


SHADERS!!!

Right, don't get excited, I'm only dabbling around at the moment so you won't be able to do/see much. I have so far got a very basic pixel shader working. The shader code is in it's primitive assembly code form. I do not yet have the code to interpret HLSL code, but it shoud come fairly quickly. So this is just a demo, nothing special, all the shader will do is change the colour of the pumpkin to red. Look at the code at the bottom if you don't beleive me and you'll see 4 yourself, you can even change the numbers to change the colours.

Here's a breakdown of what's new...

dxUpdateNormals(surface%): fully works now!!!
dxUpdateSurfaceNormals(surface%):same as above but just for surfaces, useful if only partly modified a mesh
dxWBuffer(enable%):"dWBuffer" - same as blitz.d
dxPixelShaderVersion%():"dxPixelShaderVersion" - give just that
dxVertexShaderVersion%():"dxVertexShaderVersion"
dxCreatePixelShader%(operation$):"dCreatePixelShader"in delelopement - buggy for the moment
dxFreePixelShader(pixel_shader%):"dFreePixelShader"
dxCreateVertexShader%(operation$):"dCreateVertexShader"in delelopement - buggy for the moment
dxFreeVertexShader(vertex_shader%):"dFreeVertexShader"
dxEntityPixelShader(entity%,pixel_shader%):"dEntityPixelShader" - assigns a pixel shader to an entity....

I have also been playing around a bit with lighting, things are better and closer to blitz's render system. dxEntityFX 64,128,256 exists now by the way... these will force spatial texture mapping to entities to make nice mirrory effects....

Enjoy....


Guy Fawkes(Posted 2013) [#99]
I love you, Ploppy! XD :D

Keep up the great work! =D


Ploppy(Posted 2013) [#100]
Right, just cracked it, I think (HLSL) - will release new version tomorrow eve...


Hotshot2005(Posted 2013) [#101]
what can SHADERS really do?


Yasha(Posted 2013) [#102]
...everything. And nothing.


Shaders are code written for the GPU. The GPU is a massively-parallel system that can operate on thousands of independent data elements simultaneously. The simplest and most obvious application of this is fullscreen effects: each pixel can (in theory) be operated on at the same time, meaning no loop, and no wait for a million operations to be handled in sequence (in reality GPUs don't have enough cores for this, but hundreds at a time is still better than one; the illusion holds). The restriction is that each pixel is also unaware of the existence of the pixels around it (although it might be hardcoded to read from more than one point in the input, e.g. to blur surrounding pixels: the arrangement will still be fixed and the input/output are separate locations).

Vertex transforms are another thing that can be handled in this way (each vertex needs to know only about its bone and entity transforms to generate a screen position, not about other vertices in the mesh). Intermediate stages then "scatter" the vertex coordinates across a whole triangle and generate the interpolated input data for each element in the pixel shader.

In other words, shaders are responsible for literally every element of 3D rendering (when you use a "fixed function" system like DX7/OpenGL1, or the high level version presented by B3D, you're actually using commands to "write" a generic shader program hidden in memory). They can also be used for weird and wonderful interesting stuff not limited by traditional notions of light, texture, colour, etc. (those are imposed on us by the simplified representation) - there is no upper limit. Want vectors? Use them. Want flowing liquid ink? Use it. etc. They're not limited to graphics, either (in fact to use them for graphics is almost a waste) - physics, AI, fluid dynamic simulation - everything.


The downside is that you need to learn and use a completely separate programming language for the fine-grained control, and you need to be able to think in a completely different way to understand non-linear strictly parallel code. B3D programming does not provide any kind of useful introduction to understanding shaders, and indeed B3D is the sort of system you use if you want to avoid dealing with shaders altogether (pretty much the entire point of it in fact).

I'd go so far as to wager that most of the people over the years who have asked for shaders in B3D don't know what they are, let alone how to use them. Hence, from another point of view, "nothing".


Ploppy(Posted 2013) [#103]
....'kay..... I am almost feel demotivated after that. What a downer. Perhaps I should just call it a day, then.... :'(


Guy Fawkes(Posted 2013) [#104]
GOOD job, Yasha... You made him feel bad. Ploppy, don't give up because of what people say. NEVER give up because of what people say. You CAN and WILL do this! CMON'! Bring BlitzBasic BACK from the DEAD! =)


GfK(Posted 2013) [#105]
....'kay..... I am almost feel demotivated after that. Perhaps I should just call it a day, then.... :(
Um... why would you do that? Yasha is partly right - personally I wouldn't know a shader if one bit me on the arse. But that's not to say what you're doing has no worth.

If nothing else, do it so you can say "look, I achieved this". Even if nobody else uses it, the fact that you proved [to yourself] that you're able to see a challenge through to the end, will motivate you to do more stuff in the future.

[edit] Oh Christ, I actually agreed with Thundros. Whatever next??


Yasha(Posted 2013) [#106]
....'kay..... I am almost feel demotivated after that. What a downer. Perhaps I should just call it a day, then.... :'(


Hey I don't mean to interfere with what you're doing! It looks like great work from here (I'm standing way back because I don't have access to a Windows development machine at the moment so DX in all its forms is something I can't comment on, but it sounds like good stuff).

I was just trying to answer Hotshot's question of what shaders actually are... I'm sorry if that was demotivating (although... I'm not sure why?). I didn't for a moment mean to suggest you should stop.

If your userlib is working so far then you're already using shaders in a practical capacity. Picking a relatively fixed usage and providing easy access to it is something you absolutely can do - as a userlib author. It's hypothetical end users who might be disappointed when they discover that extension is a tad harder than they thought because it can't really be done from within a B3D "perspective"; but you the userlib author can still build a rich set of features to present statically in that perspective no problem. You use the shaders, to help the end users do the avoiding. That's actually a role of tremendous value, similar to the way the original B3D hid from the end user the difficulties of playing directly with DirectX.

Even then, there's also no harm in exposing the raw commands either. If other people know how to use them, they'll be a huge help.


col(Posted 2013) [#107]
Shaders turn a "fixed function" graphics pipeline into a programmable pipeline. I think Pixar thought of the concept initially but I could be wrong, although it was definitely one the 3d cartoon animation companies.

Fixed function would be where you have a predefined set of vertex and pixel manipulations ( hence the "fixed" keyword ) and you chose which one you wanted. "Shaders" is a term that loosely ( and incorrectly in any case other than the pixel shader which really does do the color shading ) translates to mean that you can program what happens to each vertex and each pixel at any time as it passes through the various transformations stages from 3d data to a 2d representaion of said 3d data. Because you have control and can program what happens to vertices and pixels at each stage then the only limit of what to do with the data is in your imagination. As Yashas said each vertex and pixel is ( "was" as newer modern cards allow you to know the nieghbours of the data youve passed in ) quite limited to knowing of another other vertices and/or pixels.

Nowadays you also have a geometry shader that can produce extra geometry ( extra points, extra lines, extra triangles ) that wasn't in the initial data, you have a hull and domain shader that you can use to allow you to tessellate existing geometry which again produces more geometry, you have compute shaders which pretty much means you can do general computation on the graphics card ( turning your gpu into a massively parallel processor with thousands of hyper-fast cores to run kernel type code ). More modern gpus also allow you take this newly generated geometry/textures/data and pass it back in for further processing ( stream out processing ).

Shaders are a thing of beauty for programmers ( specifically graphics programmers ) but as with all things - with power comes more responsibility but its an awesome power!

The downside is as Yasha says - learning new programming languages and new ( to the Blitz only coder ) parallel programming concepts. But don't be scared though as most modern shader code is written in a higher level language ( and compiled ) quite similar to but not the same as C ( the original shader code used to be in gpu assembly ).



~Ploppy:
The best thing you could do would be to get the existing command set finished first. In the meantime think about the shader command set. I suggest not to make your own shaders ( of course you'll make some for testing and also to show off the power of whats possible ) - but more importantly make a command set so that other programmers can create and use their own shaders, pass in variables/data and allow them to be used in rendering. Another beauty of the shader pipeline is that you don't need to program to it all - bare bones you only need to initially incorporate vertex and pixel shaders. From there, should you choose to, you could make a command set for geometry, hull/domain/ tesselation and compute shaders.

Don't feel put off or overwhelmed!! Remember, from your point - you'd be creating and incorporating a command set for programmers to USE shaders, you don't have to make the ACTUAL shader code yourself.


Yue(Posted 2013) [#108]
Ploppy, do not be discouraged, you are actually the only one I know for sure that you can do and what not, however this work will help you improve your skills and make life much happier, the inconenientes you find along the way you must try to overcome them and not expect someone dija which is impossible, so like many we have to try my own experience, and if he is not the experience.

So do not be discouraged.


Guy Fawkes(Posted 2013) [#109]
What Yue said. and O GOD. I can't believe I'm actually agreeing with GFK, but he's partially right, too.

Don't give up on your dreams, EVEN if people have something nasty to say about it. TRUST me. I've had ALOT of people talk ALOT of stuff behind my back AND in front of me, but I simply ignored them and went on with my life.

Don't you EVER give up, Ploppy.

EDIT: I also TOTALLY disagree with Col. Once Shaders and the HARD stuff is out of the way, you never have to do it again. That's the way I see it. =)


RifRaf(Posted 2013) [#110]
If adding shader support is intimidating then just pass on shaders for now and get the commands wrapped and working like the b3d counterparts. That in itself is what everyone has been crying for anyway. Then take time and add shader support if you want to. Unless for some reason its now or never


Ploppy(Posted 2013) [#111]
No, I'm fine really, like I said Yasha's comments could demotivate one into doing shader support. But I'd personally like to think that Blitz is a solid and fast language (albeit high-level) that deserves shader support, and although old Blitz deserves recognition and still stands up as a highly powerful tool. It is possible to provide this shader interface to blitz-users; after that it will be up to them to use shaders potentials. So don't worry guys, I'm not giving up at all, never planned to, it'd need more than that. But on the other hand, don't think I'll have time to realease anything this evening (boring training at work today)...


Yue(Posted 2013) [#112]
=D


Ploppy(Posted 2013) [#113]
Well, I have had a bit of time to continue after all, I guess the 'pull' was just too much, although work doesn't permit much free time (but family does, bless 'em). So here, we go, shaders in all their beauty - take 2...

dxCreateVertexShader and dxCreatePixelShader have changed form since yesterday

Now their syntax is (operation$,file$,entry_point$,version$)...

operation$ : a string containing the whole of the shader in question, please note that each line of the shader must be separated by a newline (chr$(13) followed by chr$(10))

file$ : if you prefer to load up a file with the shader then leave operation blank and provide the filename of the text file here

entry_point$ : each shader has an entry point, it is the name of the function first run/called. Most of the time it is called 'main' but can be anything depends on the shader's authors preference. Note that this parameter IS case sensitive. If you provide an invalid entry point, the shader will not work and this dx command will return 0.

version$: version or HLSL language, can be one of the following, depending on the shader...

ps_1_1
ps_1_2
ps_1_3
ps_1_4
ps_2_0
ps_2_b
ps_3_0
for pixel shaders, and change ps to vs simply for vertex shaders

dxCreateVertexShader and dxCreatePixelShader will return 0 if they fail, this is either beacause the hardware is not capable (will later write other commands to be able to detect this), if the version given is not compatible with the code, or that the shader is badly written or incomplete. In the latter of the two cases, I have have written the command:

dxGetLastShaderError$()

In case of a shader creation error, dxGetLastShaderError$() will return the reason the shader did not compile correctly.

New version of test4.bb on download, check it out, has 6 quick pixel shaders to test out (shows on textured triangle and textured teapots - looks especially funky with shader number 3 of bb program) . I haven't yet tried vertex shaders, but the commands are there, if you like test them out yourselves. I only tried pixel shaders tonight and I found examples of these easily enough after a few google searches.


PLEASE NOTE - I cannot guarantee that my new demo test4.bb wil work on every machine - In theory it should, but if run on a machine with an incapable graphics card, it will fail. I have not yet written the functions needed to detect if capable of using shaders or not... But it'll come...

I wiil continue shader coverage.... looks like good fun...


Rick Nasher(Posted 2013) [#114]
Well-well, Ploppy you know how to cause a stir :-)

Works very well on my system, and I can test on quite a few others if needed. I changed the color of the teapot inside the pumpkin into yellow, giving it that nice Halloween-like feeling..


Yue(Posted 2013) [#115]
Powerfull :D



Hotshot2005(Posted 2013) [#116]
I been using the same test as you...Yue...

This is VERY POWERFUL ! LOL :-P

[IMG]

[\IMG]


Guy Fawkes(Posted 2013) [#117]
Ploppy, I love u XD ROFL!


Rick Nasher(Posted 2013) [#118]
Good stuff.


virtlands(Posted 2013) [#119]
-- (old post)


Ploppy(Posted 2013) [#120]
Good question, the answer to that is I have no idea. But if you think it'd be a good option to have (and it's not too diffcult to do), I'll look into it... :)


RemiD(Posted 2013) [#121]
Good work Ploppy.

This seems to work well on my machine see :


Computer specs :
Lenovo Thinkpad E325, DualCore AMD E-450 APU 1.65Ghz, 6 Go DDR3-1333, Radeon HD 6320 Graphics 384 mo, Windows 7 Home Premium

Are you going to let Blitz3d users use your DX9 lib for free, or do you want to sell it ?
What will be the license to use it ?

Thanks,


Ploppy(Posted 2013) [#122]
post deleted - was copy of previous post....


Ploppy(Posted 2013) [#123]
Hi RemiD, like I said in my first post, I do not plan to sell this - this hasn't changed. I am hoping, but am not sure at 100% that I will be able to get it to a workable state, but I do seem to be getting there. Quite honestly, seen the progress I have made so far I am quiite confident in being able to release a fully functionable version. I don't think there will be a licence. Although I see certain financial benefits (and I wouldn't be against earning from it) in getting something like this done, I believe it would be counter productive to blitz 3d's current state of health. I think that (and I really hope I am not sounding pretentious in any way with this) a userlib like this really could turn things around for the future of Blitz3d. I have been a fan of B3d for many a year, and will continue to be. It is a very solid, quick and well coded base for programming, and I prefer it very much to c++ (much less headaches ;D). But it has to be recoginised that games produced by the current capabities of B3D can only go so far to keep up with the techniques of today. I would very much like to bridge that gap, if I charge money for it, less blitz users will have access to it. I'd like all blitz users to be able to use it - a credit for my lib would be nice but I'd leave it at that.

My main objective is to be able to create a lib for my own personal use to help continue a b3d project i've been working on since jan 2012. But I'm more than willing to share this dll, but not the source code - I wish this nonetheless to remain MY project. I would like to be able to acheive this on my own - if I can accomplish this I'll have something to be proud of.

If word of this dll gets around and interest enough blitz users, great stuff. But that'll be up to them. If Blitz Research manage to sell more copies of B3D than before thanks to the existance of an 'elixir of youth', good for them. But I cannot dream of claiming any part of their sales so long as my userlib remains a userlib, and they continue to advertise B3D as a direct x 7 based language.

What I have not been able to fathom, from a business point of view, is why Blitz Research has never taken the opportunity to do a dx9 version of B3D themselves - there definatly has been a call for this for a long time. Just look at the forums, many a blitz user has wanted a dx9 (or beyond) version. But BRL has never delivered - I don't want to bitch, but for me it seems like a big missed sales opportunity, and users (me included) would be willing to pay for a new version. Really, even if it's only half done for the moment, I haven't really found many problems I couldn't solve after a bit of thought. I wouldn't at all consider myself to be an expert programmer at all, I don't even do that for a living, I have taught myself all I know in c++ and have managed to get what I have done to this state by trial, error and a LOT of research (I only started this project from scratch 3 and half weeks ago, can you believe it, not sure if I can :) ). What I'm saying is that if I can do it, Blitz Research could definatly do it in their sleep. For them half the code is already there in the original source after all just needs converting to DX9/DX11.

But I digress, the evidence before us shows us the contrary. I connot understand Blitz Research's reasons/politics but I don't hold it against them either. I retain a lot of respect for this system and its creator.

I know there are other engines available on the net - Xors3d for example look really well done and rather complete with natty fx and a physics engine thrown in. Like it, but you have to pay for it, and there's a licence and all.

So, I may seem stupid or naiive, but that's the way I think- if I get this done, at least I'll have the satisfaction of having made a tool that others'll use. And I may even get my name out a little in the process - who knows, a little reputation (positive I hope) would be nice.

Still, early days - haven't finished yet....

EDIT: Oops, forum bug, post has gone in twice...


Hotshot2005(Posted 2013) [#124]
It is Amazing on what you have done :) Keep going but at the same time...take your time :)


Yue(Posted 2013) [#125]
I must say that the biggest beneficiary of all this is me, because I can not pay for a license for a motor that uses something other than DirectX7, and in any case one could say with certainty that I want to jump all the obstacles that are in the way.

A greeting.


Rick Nasher(Posted 2013) [#126]
Well if you manage to pull this off your name will become of mythlike proportions among blitzers and indeed it's looking very promissing, looking at what you've done sofar in just 3 weeks.

I admire your point of view on the whole saving Blitz3D cause, to which I totally agree too: It's still a very solid and good base for a game programming and indeed a pitty Mark let his baby without some milk to grow and instead just made some new kids. :-)

I'm sure his intentions were good but such a pitty and neglect of the fans Blitz3d and he have. Indeed a lot of people would have paid for it and it's name and marketshare would been even bigger by now.


RemiD(Posted 2013) [#127]
If you manage to make functions as simple to use as in Blitz3d, and as stable as Blitz3d, i am interested to use it for future projects.

However, you will have to decide and write a clear license at some point.

Else, who would want to spend hours to make a software or a video game with uncertainty of the rights to use it or to copy it or to distribute it or to sell it ? Even a few lines is clearer than nothing.

Concerning your want to not sell your lib, maybe you could add a link donate with paypal in your signature, or if it is not allowed on the forum, a link to a page of your website.

I repeat : good work, good luck for the next steps, and long live Blitz3d ! :D


Yasha(Posted 2013) [#128]
I don't think there will be a licence.


Then the engine will not be usable.

You must provide some kind of licencing information if you want people to use your tool. Otherwise, they would be fools to touch it without legal information.

Now, what you might be missing is that you do not have to charge money for licences - you can give the program away for free. But without terms, nobody knows what they can do with it and nobody will be able to make use of it.


Some good ones to consider:

-- Public Domain: total permissiveness. This is an open declaration that the software is available unlicensed (as opposed to simply not making this clear in which case people don't know that it's public domain). Public domain content can be used for any purpose, up to and including dishonestly claiming you wrote it (it may not be true but there's no legal guard on it). The Blitz code archives and miniB3D are public domain.

-- CC0: a Creative Commons equivalent to the public domain. This a more formal legal declaration of the same rights. Useful because in some jurisdictions (e.g. Germany) the concept of public domain doesn't exist.

-- X11/MIT/BSD: "permissive" - free use for all purposes, commercial, noncommercial, open or closed source, etc etc. The only restriction is that they must credit you with authorship, usually in their ending- or pre-credits, or in the help somewhere. X11 is slightly more permissive and less ambiguous than the others. Max3D, BlitzMax's modules, and ODE are available under this style of licence.

-- Creative Commons: "plug and play" licences with non-commercial, attribution, and redistribution clauses that can easily be added or removed to create a custom licence to reflect your work's intent. (This is less commonly used for software.)

-- LGPL: any modified versions should be released with source code modifications too, so that end users can see what you did. As long as the library can be swapped out for a different one (i.e. it loads as a DLL), the end user's freedoms aren't infringed if you keep your main application closed source. This probably provides the strongest community enforcement around a DLL project (because improvements have to be made for everyone) while still keeping it commercially viable. OpenB3D uses this licence.

-- GPL: not compatible with Blitz3D, do not use. (Demands the whole program be open source, which both prevents most commercial uses and also conflicts with the fact that B3D proper isn't open source.) Linux and the GNU core tools use this licence.

There's a very extensive list of almost every major free software licence with comments about them, and the full legal texts to copy, here: http://www.gnu.org/licenses/license-list.html#SoftwareLicenses

(note that that site is very focused on user freedom and explicitly promotes the GPL, so be aware that its aims may not line up with yours - read around this fact)


It does not cost money or involve any kind of process to put a licence on your work - just copy the legal text from one of the ones above into your project folder, and say it applies, and it does. My advice is to start with LGPL and then crank down the restrictiveness as the project matures and more people get interested in using it, but that's just one way to do things.

But you must choose one (even PD), or your project has no legal existence and people basically can't use it. I can't repeat this part often enough. You are free to write your own licence terms, but I would advise against it if you're not a lawyer, because it a) might not be valid/enforceable, and b) all of the "big" licences above are well-known and people and companies already know what they mean - all they need to do is see "X11" and think "ah, I can use that" without needing to study the legalese.


Ploppy(Posted 2013) [#129]
I'm new to all this publishing stuff, so especially legal advice is welcome. If I have to have a licence, even for free and unlimited usage I'll get a clause or whatever needed sorted out so as to be clear and not restrain blitz users in any way. No probs, thanks for the advice guys, I must seem like a bit of an amateur concerning this....


RemiD(Posted 2013) [#130]
I don't suggest to use an already made license, in my opinion and from the infos i have gathered with an ip/copyright lawyer, they are too vague.

Basicly, by default you have all rights and no restrictions to do what you want with your code/library. But every other human has no right and all restrictions (according to the default copyright laws)

But you can write a license to give some rights, with some restrictions to the users of your code/library.

What is important to note is that if a right is not specified, then the default copyright laws apply and therefore the users can't do much with it without risking legal problems. Of course there may never be a legal problem if the creator of the code/library does not care. But it is risky to build something on uncertainty.

What is surprising is how few programmers take this seriously. I have read many licenses which are either a copied/pasted license or a custom license with not enough details.

The important questions are :
What the users of your code/lib are allowed to do with your code/lib ? (the rights you give them)
What the users of your code/lib are not allowed to do with your code/lib (the restrictions)
Restrictions apply automatically for each right you do not give (according to the default copyright laws)

A good read about the consequences of an unwritten or not detailed enough license :
http://www.ivanhoffman.com/nightmare.html
http://www.ivanhoffman.com/nightmare2.html
http://www.ivanhoffman.com/nightmare3.html

Another solution is to not care and let the random factors of life decide what will happen hahaha.


xlsior(Posted 2013) [#131]
I'm new to all this publishing stuff, so especially legal advice is welcome.


Here's some legal advice: Don't put too much stock in legal advice from strangers on a random internet forum.


Rick Nasher(Posted 2013) [#132]
You guys are getting a bit ahead of yourselves. Seems to me this is for later concern. I think we better let this guy concentrate on the coding first.

Btw: I'm nearly disappointed there's no new sample to play with today. Getting addicted(spoiled) by the speed of the previous updates I guess. ;-)


Wolf1870(Posted 2013) [#133]
I agree completely about Rick. Let Ploppy his great work go first!


Guy Fawkes(Posted 2013) [#134]
WHAT RICK NASHER SAID! O_O


Ploppy(Posted 2013) [#135]
Thanks Rick , I think you're spot on with your comment there. One step at a time indeed. However, get used to not having a new download on the net at least for a good week. Sorry, but I know that it has been my habit to realease somthing new pretty much every day since a good week or so, but as from sunday, I will be going away to visit my daughter (can't wait - has been a couple of months) for a week. So I will not be with my pc for a week. No updates, for I will not be touching my dll at all. I'll be back on the sunday after, and will no doubt want to pick up where I left off.

So patience please everybody, I haven't in anyway abandoned my project, but you won't hear much from me for a good week or so, I'll check in to the forum with my pad to see what's new and respond if necessary but that's all.

As for tonight, there is a little update. I haven't released anything for the last few days because I have been tightening up my code, optimising, re-structuring, debugging and writing clean-up rotuines. All this takes time, but I'm quite satisfied with the result. You won't be able to see much difference, but from my point of view it's much clearer and less buggy. Beleive me, there were more bugs than met the eye. I haven't yet corrected the camera bug (still turn weirdly), this is not a bug, this is my bad maths. I will get this sorted out (better do, otherwise would be pretty awful .dll afte all when it comes down to it ;D). There were even bugs in the .decls file, I forgot to put in the correct amount of parameters for a few commands - corrected now.

There is only one new command tonight, nothing special, just
dxVertexCoords(surface%,vertex%,x#,y#,z#) : Should work just like the blitz equivalent

So there we go, the closer I'm getting to sunday morning, the more I'm thinking of going to see my ten-year old daughter who I sorely miss - I have about 12 hours to drive but well worth it.

I don't know if I'll do much on my dll, preparing for journey and all, but may release a little bit more. Am thinking about adding webcam to texture capabilities by the way - would be a welcome addition. What d'ya think??? May do that tomorrow if not too hard. If, however, you do not hear from me again for a week and a bit, don't fret - I AM THERE and I will return... I personally think that when I pick up my project I could be heading for a christmas deadline for completion. I don't wish to commit myself to a date, but with the way things have gone so far I may be able to acheive this goal. It'd be great to offer a nice present to B3D, I know it has given me much.



Long live B3D people....


virtlands(Posted 2013) [#136]
-- (old post)


Ploppy(Posted 2013) [#137]
Yes, I've thought of that, I would like the blitz user to be able to detect certain things so that the program can adapt to the host machine. There is also quite a lot of info available about the capabilities of the host machine's gfx adapter. I would like this or some of it to be availale to the blitz user. So I'm planning to work that in at some stage. I am trying to cover as many blitz commands as I can, but will be introducing new ones that are relavant to dx9, ones that I just find useful for my own needs, and ones that I feel enhance blitz's present commands (dxUpdateSurfaceNormals, for example).

As for Dll version, I agree it's in the works but am in no rush for the moment as isn't even close to release version. Whist in developement, nothing is written in stone. Commands can change their syntax from one day to the next, and methods could change too. Presently, my lib isn't usable for a blitz project. I am very much in test mode whilst developing - but rest assured for the blitz commands i will try to stick to the classic syntax as much as poss...


RemiD(Posted 2013) [#138]
ignorant question : I don't understand why in your code example you need to use new functions to detect the input for the keyboard and the mouse ?

Were you not supposed to make only new functions for the functions related to 3d rendering and 2d rendering so that they use DX9 ?

Will you also need to convert all others Blitz3d functions concerning the colliders and collisions, linepick, sounds ? I thought they were not related to rendering.


Ploppy(Posted 2013) [#139]
It's to do with the window in question. The function that I wrote itself must be pretty similer in construction as the original blitz command for the keyboard and the mouse. The thing is that blitz's internal engine keeps an internal reference hWnd to the window created with Graphics/Graphics3D, but not for the window created by dxGraphics3d. This info is needed by windows for all windows events. So, windows will happily detect events for windows you tell it to detect, but only for those ones. It's not that I wanted to re-do these commands, it more like I had not much choice. But, shouldn't be a problem either- you shouldn't see any difference in quality in the results of these versions of the input functions - they are just as functional.

Collision detection will have to be redone also, because blitz has no reference for my own surface structures, they are different in construction. Linepick too at a guess will have to be redone to be in conformity with the dx9 metrics - I could be wrong (and would be happy to be wrong - less work to do). I haven't looked at linepick in detail for the moment, but that will come. Doesn't it involved cameras?? If so, I will probably have to re-write.

However, as far as sounds are concerned, I should be okay (well - apart from the Listner/3dSound commands).


RemiD(Posted 2013) [#140]

The thing is that blitz's internal engine keeps an internal reference hWnd to the window created with Graphics/Graphics3D, but not for the window created by dxGraphics3d. This info is needed by windows for all windows events. So, windows will happily detect events for windows you tell it to detect, but only for those ones. It's not that I wanted to re-do these commands, it more like I had not much choice.


Ok i see.
Maybe you could ask Mark how the "internal reference hWnd" is stored and instead write the reference of the window created with dxGraphics3d, this way all others functions would work ?

Linepick works with meshes set as "pickable" or colliders set as "pickable", the others meshes and colliders are not considered during the pick.
I guess that it is a calculation to see if a 3d line intersects with a 3d shape (sphere, box) or with at least one triangle of a mesh. Like this :
http://www.blitzbasic.com/codearcs/codearcs.php?code=793

For collisions, it would be good to have sphere vs mesh, capsule vs mesh, box vs mesh, sphere vs sphere, capsule vs capsule, being able to create different groups of colliders having different responses (slide or stop) against some others groups.
Depending on the license of Coldet, maybe it would be easier to build your collision system with this existing lib ?
See what Yasha has made here :
http://www.blitzbasic.com/Community/posts.php?topic=100759 (#13)
http://www.blitzbasic.com/Community/posts.php?topic=98383 (#10)

For sounds, i think that the blitz3d functions are good, with loadsound, freesound, createchannel, playchannel, pausechannel, stopchannel, channelvolume, channelpitch, freechannel

For 3d sounds, i think that it can be custom made depending on the game if at least there are sound/channel functions.


Ploppy(Posted 2013) [#141]
Perhaps I could have, but there's no point doing so now, these input commands are already complete and do exactly the same job as blitz's routines.


Wolf1870(Posted 2013) [#142]
and that's absolutely fine, Ploppy. absolute respect from me! :-))


Kryzon(Posted 2013) [#143]
You can reference the MiniB3D source code which includes the entire original code for the Blitz3D collision system.

https://github.com/si-design/minib3d/blob/master/inc/std.h
https://github.com/si-design/minib3d/blob/master/inc/std.cpp
https://github.com/si-design/minib3d/blob/master/inc/geom.h
https://github.com/si-design/minib3d/blob/master/inc/geom.cpp
https://github.com/si-design/minib3d/blob/master/inc/collision.h
https://github.com/si-design/minib3d/blob/master/inc/collision.cpp
https://github.com/si-design/minib3d/blob/master/inc/misc.cpp
https://github.com/si-design/minib3d/blob/master/inc/tree.h
https://github.com/si-design/minib3d/blob/master/inc/tree.cpp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
https://github.com/si-design/minib3d/blob/master/inc/TColTree.bmx
https://github.com/si-design/minib3d/blob/master/inc/TCollision.bmx
https://github.com/si-design/minib3d/blob/master/inc/TPick.bmx

This illustrates the importance of keeping things open-source, which I recommend that you do as well if you plan to keep your product free of cost.


virtlands(Posted 2013) [#144]
All as 1 zip.
--> https://github.com/si-design/minib3d


Kryzon(Posted 2013) [#145]
The MiniB3D module for BlitzMax and the 3D engine behind Blitz3D use the same collision system.
Mark Sibly shared the Blitz3D engine's collision system source code with Simon Harrison (the author of MiniB3D).


Rick Nasher(Posted 2013) [#146]
@Ploppy:

So there we go, the closer I'm getting to sunday morning, the more I'm thinking of going to see my ten-year old daughter who I sorely miss - I have about 12 hours to drive but well worth it.

Can imagine, hope you'll have/had a good time.


Am thinking about adding webcam to texture capabilities by the way - would be a welcome addition. What d'ya think???

That would be great actually. To accomplish something like that now, one has to deal with things such as Panno's old DLL or others I believe(dunno if would still work, probably not). Way better to have everything in one solid DLL too.


If, however, you do not hear from me again for a week and a bit, don't fret - I AM THERE and I will return...

Quite understandable.


I personally think that when I pick up my project I could be heading for a christmas deadline for completion. I don't wish to commit myself to a date, but with the way things have gone so far I may be able to acheive this goal. It'd be great to offer a nice present to B3D, I know it has given me much.

I've put my sock up already. Just when I thought Santa didn't exist...
;-)

Long live B3D people....

I drink to that!


virtlands(Posted 2013) [#147]
-- (old post)


Rick Nasher(Posted 2013) [#148]
@VirLands:

No need to do that: usually there's a LED coming on also when the cam is on(hardwired).. No need to get paranoid. LOL

But seriously, the cam can be quite useful in games/applications. I can think of a few purposes.


virtlands(Posted 2013) [#149]
-- (old post)


Guy Fawkes(Posted 2013) [#150]
Yes, Ploppy. We DEFINITELY need the ability to control a game character and other actions as well such as speech to text for online chat box.

That would be EPIC!


Rick Nasher(Posted 2013) [#151]
@Guy Fawkes:
Speech to text(voicerecognition) is already possible using RecoServer: http://www.blitzbasic.com/Community/posts.php?topic=100226#1204134

Cam to Texture is also possible using an external DLL (not natively and is a bit of a kludge I believe), but apposed to Speech to Text, that probably won't work anymore if using DX9 textures/framework, hence the need for it to be in the DX9 DLL.

Dunno if Voice2Text is part of DX9, but if Ploppy is in the mood and opportunity for adding Voice Recognition/Control to it then of course I wouldn't mind too, but I think it would be pushing it/too much to ask.

Actually would indeed make a revolutionary epic new Blitz3D V2.1! LOL


Guy Fawkes(Posted 2013) [#152]
Well what do you say, Ploppy. Integrate this so-called RecoServer into DX9 & make Blitz3D revolutionary?! :D


virtlands(Posted 2013) [#153]

Functions for possible inclusion in the project:

DirectXMath programming reference
http://msdn.microsoft.com/en-us/library/windows/desktop/ee415574(v=vs.85).aspx

DirectXMath Library Functions
http://msdn.microsoft.com/en-us/library/windows/desktop/ee415580(v=vs.85).aspx



GaryV(Posted 2013) [#154]
It is amazing how hard people are working to destroy the work Ploppy is doing.


virtlands(Posted 2013) [#155]
....


Guy Fawkes(Posted 2013) [#156]
No, you weren't. He was just being a rude person. Just ignore him.


Wolf1870(Posted 2013) [#157]
you can post here many possibilities that can create a new Blitz3D should. Now let's write Ploppy in peace times his program the way HE wants! :-))


GaryV(Posted 2013) [#158]
Ploppy: I think you are starting to understand why Mark has not updated B3D.


Guy Fawkes(Posted 2013) [#159]
Ignore him Ploppy. He's just an angry person.


GaryV(Posted 2013) [#160]
Odd how you are angry at me for not wanting you to destroy Ploppy's work...


Guy Fawkes(Posted 2013) [#161]
I'm not angry. I'm just going to not give you any attention for your smart-alec comments.


GaryV(Posted 2013) [#162]
Why don't you leave the man alone and let him work on his product without you and your cronies badgering him with ridiculous suggestions in an effort to destroy the product. Some of us are actually looking forward to this.


Yue(Posted 2013) [#163]
Every program is based on an executable and several dll Blitz3D great potential and what is not allowed to consider an upgrade is that even despite the difficulties sige running , I still remember years ago where they said that everyone would die and I Blitz3D at one point I thought the same thing, so despite all the negative comments , I think we Blitz3D for a long time. Accounts Entenos in short :

Blitz3D + Userlibs Up.

probelma then is that most users are not programmers Blitz3D Truth , we have become consumerist a product that meets our expectations , our problem here is not programmed if not do things the easiest possible , then is where are people who do know to program and create an interesting product for Blitz3D by userlibs and we continue in this vicious circle .

What I can tell flopy is that from what I understand is that he and we benefit , it improves your programming skills and us having the expectation of a product rises directX technology in Blitz3D , but is not so what you do is a bridge with Blitz3D compiler and now this.

I've always said that programmers speak little in communities and when they do are to give us good news about something.

Goodbye .


Hotshot2005(Posted 2013) [#164]
What I will say is Let him enjoy what he doing and DONT put Pressure on him otherwise it will drive him away....Understand?

Good!


Rick Nasher(Posted 2013) [#165]
I second that, but I've already tried to point that out too. Amazing how people get carried away though. Blitz3D is faaarrr from dead.


virtlands(Posted 2013) [#166]



Ploppy(Posted 2013) [#167]
Hello again,
Just back from holiday, and back on track. Have had time to reflect on algorithms and such.

So, just been working a couple of hours to sort out camera problem (my arch nemesis) and seems to work now and behaves just like b3d. Smooth!!!

That's all for the moment, may release other stuff later in the day but a bit tired after getting back last night.. ;D


Here's the link again
Download


Ploppy(Posted 2013) [#168]
New update - have improved the renderer a bit - more stable now.

New test bb out - test5 !! Test is not meant to make any visual sense, I program the first thing that comes into my mind - my main goal being to test the commands and render engine. Suggestion, playing a William Shatner song in the background goes well with the test program, suddenly the spinning teapots have meaning. Psychedelic...

New commands of the day....

dxFlipMesh(mesh%) - 100% working - same as b3d equivalent
dxApptitle(title$): ditto
dxCountEntities%() - new command, I like it, so I put it in
dxGetSurface%(mesh%,surface%) - same as b3d version
dxFirstEntity%() - new command, will return handle of first entity in world - be it mesh/cam/whatever..
dxNextEntity%(present_entity%) - return next entity in list after entity given as param
dxPreviousEntity%(present_entity%) - return previous entity in list after entity given as param


virtlands(Posted 2013) [#169]
Test5.bb seems to work just fine.


Found 17 new DLL functions. [ 189 - 172 ]


Rick Nasher(Posted 2013) [#170]
Hope you had a nice time. Thanks for the update, feels like getting candy(not taken from a baby).

Btw didn't remember 'Kirk' used to sing. Were you playing "Rocket Man", "My Way", "F.. You!" or the all famous electro-hit "Shatner Of The Mount by Fall On Your Sword"? ROTFL


virtlands(Posted 2013) [#171]
-- (old post)


Ploppy(Posted 2013) [#172]
Mr Tambourine man, Shatner version is especially trippy... crax me up...


Rick Nasher(Posted 2013) [#173]
Clint's "I talk to the trees" is not too bad, still I rather hear him shoot then sing, guess you could say "he's barking up the wrong tree" to stay in his own Dirty Harry wisecrack lingo. :-)

Tambourine by Shatner: I knew acid was popular in the 70's, but what on earth was he on??? LOL


Guy Fawkes(Posted 2013) [#174]
Can we PLEASE get back on topic here?


LineOf7s(Posted 2013) [#175]
If the OP is OT, it's all OK.

It's his thread and he's giving us goodies for nothing in return but a warm fuzzy feeling and the occasional entitled demand. Let him play.


Guy Fawkes(Posted 2013) [#176]
Just ignore him, guys. Ignorance is bliss.


Yue(Posted 2013) [#177]
PowerFull Camera =)




Yue(Posted 2013) [#178]
Here model texture.








https://dl.dropboxusercontent.com/u/39767349/AstronautaII.rar


Guy Fawkes(Posted 2013) [#179]
Virtlands, can you come on to yahoo tomorrow? I need to talk to you.

Oh, and ignore anybody who has an ignorant comment.


Rick Nasher(Posted 2013) [#180]
@ Guy Fawkes:
Why are you so on topic on the off topic? (please don't answer that cos this is so off topic, and last thing I'll say off topic, promise) ;-)


Ploppy(Posted 2013) [#181]
I agree, this is a forum, not a internet dating site ;)

I'm sorry, but I kind of think I may have got the ball rolling with the off-topic stuff with the William Shatner reference (truly, I'm not a fan - don't dislike him either).... Won't happen again, no more nonsence... I think... perhaps....

I do agree with you seriously in some respects - I mean this post is getting rather large, and it's not helping things filling it up with trivial additions.

No update tonight guys, I am working on my dll, but what I'm doing at the moment requires quite a bit of coding - will release an update tomorrow normally...


Hotshot2005(Posted 2013) [#182]
if you going post another thread then all you need type is Direct x 9 Userlib Part 2 then everyone will follow it

pretty simple :)

Enjoy whatever you doing :)


virtlands(Posted 2013) [#183]
I like HotShot's idea; let's start a Direct x 9 Userlib Part 2.


Rick Nasher(Posted 2013) [#184]
Appears dxLoadTexture is not yet operational?


virtlands(Posted 2013) [#185]
dxLoadTexture appears to work on mine. (tex = 87433096)
Did you remember to grab the brick ?

-- [ <--- your "brick.jpg" --]


Rick Nasher(Posted 2013) [#186]
Uhuh, brick texture works for sure. But strangly enough I can only change the brick texture to something else if I rename the filename of the texture to "brick.jpg", so below doesn't work:
tex=dxLoadTexture("4530lavaglow.jpg",1)
dxEntityTexture teapot,tex,0,0



Ploppy(Posted 2013) [#187]
Yep, right, sorry about that one. I had 'hardwired' that one to test out - forgot to change it afterwards, now I have corrected. dxLoadTexture should now work with any file.

Other new stuff, not a lot that you can see - I have been yet again re-structuring. You can however change textureblends with

dxTextureBlend(texture%,blend%)

this works like TextureBlend, however blend 6 to 21 will give you other modes (I will give more details at a later date but if you like experiment with these to see what you get)

dxFreeSurface(surface%) is also a new command - pretty straightworard - may come in use to some

I think it was virtlands that noticed there were more commands present in the dll that the ones I mentioned. This is normal, and even today there are new ones I haven't mentioned. There is a reason, any commands not mentioned are not worth mentioning - the bare bones are there but nothing more - if you call it nothing (or a crash) will happen. Sometimes I will construct a command's shell, so to speak, just to remind me to finish, or to link it in to other functions in the dll.

By the way, Yue, I saw your new post. Nice idea by Hotshot - seems fairly logical but nonetheless a good one. If I wish to start a new post, I am perfectly capable of doing so by myself. I managed to create this one, so there's no reason why I wouldn't be able to make a new one. Thanks for the support, but I wish to be the author of this post as it concerns my dll, for which I am also the author. It may seem a little petty to some, but this userlib is my baby - I am more than happy (really) to distribute it to anyone, and I hope it'll be of some use to some, but as for it's origin I wish it to remain solely mine.


Guy Fawkes(Posted 2013) [#188]
@Ploppy, we NEED a B3D export function that exports multiple animations as well as multiple textures on a B3D file or B3D files. :)


Rick Nasher(Posted 2013) [#189]
@Ploppy: Figured something like that, hehehe. Thanks for the fix.


Hotshot2005(Posted 2013) [#190]
Guys....post to part 2 here http://blitzbasic.com/Community/posts.php?topic=101619

it getting long scrolling down here !


virtlands(Posted 2013) [#191]
Great idea, but I believe Ploppy wanted to author the Topic himself,
(and search results should point to his ID name).


Ploppy(Posted 2013) [#192]
Just had a thought. What if this dll is compatible with blitzplus... I beleive it uses the same userlib format, so in theory it should be. Anyone wish to test this theory out???

If so, it will effectivly mean that my userlib, and once I get it done, directx manipulation will be availabe to all since Blitz Research are giving plus away now.

I wonder if Blitz Research would approuve of this. Hmmmm....


GaryV(Posted 2013) [#193]
What if this dll is compatible with blitzplus... I beleive it uses the same userlib format, so in theory it should be.

This would be a benefit to everybody. The compiler was rewritten for BlitzPlus and is faster in many aspects.


col(Posted 2013) [#194]

What if this dll is compatible with blitzplus..



This should and does also work with BlitzMax too. It looks as though the normals or the winding order of the lid, handle and spout of the teapot are reversed. early days yet :P

If FlipMesh working just yet?

I'd expect Ploppy to make the call whether to include the dx in the commands or not?
I'd guess you do, but if I may so cheeky as to post an example of how to do it and that only took a couple of minutes to test in 'Max :




Awesome work :)


Yue(Posted 2013) [#195]
BlitzPlus no Workk...



It would be great to work with BlitzPlus, because the executables are smaller.


col(Posted 2013) [#196]
Hi Yue,

I'm not suggesting to not use 'Plus, but in 'max you can reduce the file size if you optionally select which, if any, modules you do/dont need.

For example if you insert this:-
Framework brl.system

Extern"win32"
Function LoadLibraryA(lib$z)
Function GetProcAddress:Byte Ptr(lib,func$z)
EndExtern

between the 'Strict' and the 'Init' statements it cuts the final .exe to under 100kb. plus it will load the dll too. Is a couple hundred kb memory really an issue nowadays?

Although when you making full game you will need most of the language, but you can still not import the max2d routines and gl/dx libraries if you really didnt want to. Just a thought.


Rick Nasher(Posted 2013) [#197]
I am now getting a "Not enough parameters" on:

mesh=dxCreateMesh()


In all of the examples actually and not just in BlitzPlus, Blitz3D too.
Just me?


Ploppy(Posted 2013) [#198]
I kind of agree with Yue on this one, not that I've much used plus. It just seems much easier to understand than max. I tried the max demo, and I couldn't get my head around it. I do realise it's raw power, I know it's much closer to c++ than anything else - but for me it is less user friendly. I have pretty much teached myself all I know in c++, but I don't like using it - blitz3d is still my preferred language. But I guess it's a question of personal taste at the end of the day...

I would however love it if my dll works on all three blitz's, but would be really good if it works on plus - mainly because plus is now free of charge on the blitzbasic site. All you need to do now is register. If any new user wished to use directx 9, he could free of charge thanks to blitzplus. I'll test it out myself when I have time - see if I can get it to work...

Right, professional and personal duties pretty much hinder me from doing much more to my userlib today. So no update tonight...

I would however like to note that a new post is pending. I will in the next few days create the new post. This post is just getting too long, but what a size already!!! Can't beleive the response I have had since I started a few weeks ago. It is very encouraging. I do read all messages, be it suggestions or bug reports - you guys are very helpful, especially considering that you don't know me and for the moment I haven't yet released anything really usable. That, kind people, is faith. I hope, even though my main reason for creating this is for my own purposes, that I don't let your faith down. I will, in any case give it a good go - up until now programming-wise I haven't yet hit a hurdle I couldn't leap over...

I am at the moment in the process of re-packaging this dll. I have come to a point where my confidence wishes to bring it to another level - that is to say something that is more accessible. My next release is likely to be in another form than just a zip file. I plan to release my dll within an installer - it is more professional, tidier and easier to uninstall if needed. I plan also to incoropate help files for all my commands, old and new, into blitz's resident help system. This will be installed at the same time by the installer. Although my dll is not officially recognised by blitz, I would like users to have a transparency between blitz commands and my own versions - as though they are really part of the same system. This should come out soon.

I also plan to incorporate two important (for me, at least) commands, one which is very easy that will give you the version number. The other, more complicated, will tell my dll to check on the internet to see if there is a new version of itself available, if there is one the dll tells the user. I have this internet access function already written for chipmunk - just got to copy it over.

The only reason I'm holding out on a new post in the forum is because I'm planning on titling it with the name I've chosen for it (have a nice idea for a logo too, wanna go pro a little) - as soon as I've finalised that, don't worry - you'll see no more of this very very long post.. ;)

My days off work are sunday and monday, so if you're expecting a bit more progress in this work, it's likely to be those days where things will be more interesting....


Guy Fawkes(Posted 2013) [#199]
Can we stick to Blitz3D and THEN make a max for the people who only have Blitz3D? I'm pretty sure since it's a DLL it can be EASILY manipulated in other systems.


Ploppy(Posted 2013) [#200]
I don't quite understand your question (if it is for me), but in any case I'll respond to the best of my abilities. Simply, you can use my dll in any which way you please, I'm not bothered - just as long as the dll isn't modified in any way including its filename - a little credit would be nice but not obligatory. If you wish to use it in max, you're more than welcome. I don't really know much about max, but I'm sure it's just as good if not better that B3D. It comes from the same author, Mark Sibly (we're not worthy), after all.... I will not need however to make a 'max version' if that's what you mean, for max should be able to access any dll it pleases anyway - just as long as you know the dll's format.

col, by the way, the teapot routine comes directly fom the directx function - this is not my work - for this I just made a call to microsoft's in-built function. If the normals don't work correctly, don't blame me. There is no texture mapping on this mesh either. These (negligences) are documented on the net. But I don't much care really, if I included the teapot in my code, it is mainly for test purposes, nothing more. The sphere and cube routines from direct x are exactly the same. That is why I have recoded these routines so that they do have correct normals/mapping. I will not recode the teapot routine. For the teapot, WYSIWYG.


Guy Fawkes(Posted 2013) [#201]
^ That's what I'm saying. B3D needs this worse than any other system created by Mark Sibly (He's right, we're not worthy...).

Anyway, any luck with B3D multi anim/texture export? :)


col(Posted 2013) [#202]
Ah yes, sorry, I forgot you were using the d3dx library.

As for the meshes being backwards, you say all the MS meshes were reversed? It could that if something in the renderer system is using a different handedness including the model - say for eg if the mesh is built using lefthandedness and you use a righthanded projection matrix then the mesh would be backwards. I don't know if you'd worry about investigating it or not - just a plausible explanation.

Have fun :)


Rick Nasher(Posted 2013) [#203]
No clue what's going on but I've restarted my machine, recopied the BlitzDX9.dll+decls files into userlibs, but nogo anymore in both BlitzPlus and Blitz3D cos of error msg: "Not enough parameters".

This happened right after I installed the last update.
When I reinstalled the release before this, then no more issues..

Anybody else ran into this? Perhaps a conflict emerged with an existing DLL in my Userlibs folder?

I'll try on another system to see if happens there too.


Rick Nasher(Posted 2013) [#204]
Ah, thanks. In the latest update example5 it's fixed with:
dxCreateMesh(0)

Only needs a ";" for line with CreateCone otherwise "3D gfx mode not set" after pressing spacebar other wise pretty good.

(posted here as I feel was related to above)


Kippykip(Posted 2013) [#205]
Holy crap!
AMAZING WORK PLOPPY!
:D