PureGDK has been tested to work correctly with a trial version of PureBasic but due to the impaired nature of the demo you will be able to run your programs only with the debugger enabled (Compiler -> User Debugger). You will also not be able to compile to an exe or take advantage of the full potential that PureGDK has to offer.
How to submit a bug
Do not e-mail
support@puregdk.com. Bugs are not handled through this address. Please file a report at
http://puregdk.com.
Features that require prioritized testing
All Commands that take advantage of the new vector and matrix structures. This makes the 3D Math command library is a prime target for bug hunting.
All of the currently supported plugins. Although all of the commands should work I have only have the opportunity to test the Advanced Terrain library, which works flawlessly.
The Basic 3D library has not been tested thoroughly and may have bugs.
dbSetInvalidCallback() should be bullet-proof but has not been thoroughly tested.
Important bugs to watch out for
Commands that pass longs or floats where they should pass a different type.
Silent crashes. If your PureGDK executable silently crashes when it should not please report a method for reproducing the error.
Failed error handling. PureGDK should capture all errors reported by DarkBasic Professional at runtime but sometimes it misses one. If this bug can be repeated please report it.
Report any missing commands/parameters after you have confirmed that it has not be removed or revised by consulting the command lists at
http://puregdk.com.
How to wrap your own DarkBasic Professional plugins
http://puregdk.com/files/Plugin_Framework_Tutorial.zip
Here are the DB and GDKTables and source files for all of the non-commercial plugins bundled with PureGDK along with a list of changes that have been made for each plugin.
http://puregdk.com/files/Plugin_Framework_Examples.zip
And this is a list of the plugins that have been prepared for PureGDK Beta and their versions:
Free Plugins:
D3DFunc Version: 3.6.5 - http://www.cloggj.f2s.com/DBPro2/d3dfunc.html
DarkSide Starburst Version: 1.0 - http://mysite.wanadoo-members.co.uk/darksidefreeware/dllpage.htm
DarkSide Input Version: 1.0 - http://mysite.wanadoo-members.co.uk/darksidefreeware/dllpage.htm
EZ Rotate Basic Version: 1.0 - http://www.gametoolshed.com/EZrotate.html
Barnski's Lua Scripting Version: 1.01 - http://forum.thegamecreators.com/?m=forum_view&t=74095&b=5
Matrix1Util Version: 12-23-07 - http://forum.thegamecreators.com/?m=forum_view&t=85209&b=18
Multisync Version: 1.3.1 - http://forum.thegamecreators.com/?m=forum_view&t=99188&b=5
Newton Game Dynamics Version: 1.3.2 - http://walaber.com/index.php?action=showitem&id=10
zParticle Version: 1.11 - http://www.battlecraft42.com/dbp/
Free TGC Plugins:
Advanced Terrain Version: 1.0 - http://forum.thegamecreators.com/?m=forum_view&t=38692&b=18
DBP Collision DLL Version: 2.02 - http://forum.thegamecreators.com/?m=forum_view&t=74762&b=5
Commercial Plugins:
3D Cloth and Particle Physics - http://darkbasicpro.thegamecreators.com/?f=clothandparticles
Enhanced Animations - http://darkbasicpro.thegamecreators.com/?f=enhanced_animations
Dark Physics - Outdated - http://darkphysics.thegamecreators.com/
Dark Lights - http://darkbasicpro.thegamecreators.com/?f=dark_lights
Dark A.I. - http://darkbasicpro.thegamecreators.com/?f=dark_ai
EZ Rotate - http://darkbasicpro.thegamecreators.com/?f=ezrotate
Nuclear Glory - http://darkbasicpro.thegamecreators.com/?f=ngc
STYX - http://darkbasicpro.thegamecreators.com/?f=styx
TextureMax - http://darkbasicpro.thegamecreators.com/?f=texturemax
Unity - http://darkbasicpro.thegamecreators.com/?f=lua
Here is some example code demonstrating dbSetInvalidCallback() and how to create a custom error handler.
Procedure rnd2(num)
neg=Random(1)
n=Random(num)
If neg
n=n*-1
EndIf
ProcedureReturn n
EndProcedure
; Custom error handler
Procedure ErrorHandler()
line=GetErrorLineNR()
string.s+dbGetErrorDescription()+#CRLF$
string.s+"CLine: "+Str(dbGetErrorLineNumber(line))+#CRLF$
string.s+"CFile: "+dbGetErrorFilename(line)+#CRLF$
MessageRequester("Custom Error",string.s)
End
EndProcedure
OnErrorGosub(@ErrorHandler())
hDBWnd=OpenDBWnd(0,0,640,480,32,#GDK_Window_SystemMenu|#GDK_Window_ScreenCentered)
dbSyncOn(): dbSync(): dbSync()
; Invalid render device callback
Procedure ScreenInvalid()
; Reload assets that have been cleared from memory
objcount=500
For i=1 To objcount
dbMakeObjectCube(i,0.5)
dbPositionObject(i,rnd2(50),rnd2(50),rnd2(50))
Next i
EndProcedure
; Register invalid device callback
dbSetInvalidCallback(@ScreenInvalid())
objcount=500
For i=1 To objcount
dbMakeObjectCube(i,0.5)
dbPositionObject(i,rnd2(50),rnd2(50),rnd2(50))
Next i
x=0: y=0: z=0
Repeat
fps.s=Str(dbScreenFPS())
dbText(15,15,fps.s)
x+2: y+4: z+6
For i=1 To objcount
dbRotateObject(i,x,y,z)
Next i
; Uncomment one of these to catch a runtime error
;dbRotateObject(0,x,y,z)
;dbMakeObjectCube(0,size)
dbSync()
ForEver
This is how to embed the DarkBasic render window inside of a PureBasic window:
OpenWindow(0,0,0,540,380,"Container Window",#PB_Window_SystemMenu|#PB_Window_Invisible)
hDBWnd=OpenDBWnd(0,0,320,240,32,#GDK_Window_BorderLess,WindowID(0))
; Unhide PureBasic window container
HideWindow(0,0)
; Don't lose focus to the new DarkBasic window
SetForegroundWindow_(WindowID(0))
; Do something cool
dbmakeobjectcube(1,3)
dbScaleObject(1,35,35,35)
dbPositionObject(1,-1.65,1.3,0)
Repeat: Delay(1)
x.f+0.1: y.f+0.3: z.f+0.4
dbRotateObject(1,x.f,y.f,z.f)
dbSync()
Until WindowEvent()=#WM_CLOSE
http://3dfolio.com