Page 1 of 14

PureGDK Open Beta - DarkBasic for PureBasic

Posted: Tue Feb 19, 2008 4:15 am
by Mistrel
Image

Announcing the PureGDK Open Beta

PureGDK was created to bring the power of the DarkBasic Professional engine to the PureBasic language. The result of this effort has created a fusion which brings powerful 3D graphics to PureBasic and a highly sophisticated BASIC language to DarkBasic Professional developers.

What is PureGDK?
PureGDK is an intermediary compiler and a set of command libraries that interfaces the DarkBasic Professional and PureBasic language at compile-time. This allows DarkBasic Professional commands to be compiled and debugged right out of the PureBasic IDE. It also bring a powerful new command set to both PureBasic and DarkBasic users alike. Both DarkBasic Professional and PureBasic are required to compile.

Is PureGDK slower than a native DarkBasic Professional executable?
A PureGDK executable will run as fast and in some cases will execute the same DarkBasic command faster than a native one when compiled without the PureBasic debugger.

Will PureGDK be expandable?
PureGDK comes with support for 22 third-party plugins which adds over 1,000 new commands to the already impressive Darkbasic Professional command set. PureGDK also provides a plugin framework which allows anyone to effortlessly add support for their favorite plugin.

Where to download
The PureGDK Open Beta is free to all users who register for an account at http://PureGDK.com.

Experiment with the power of PureGDK early and take advantage of this unique opportunity to provide feedback and get a chance to see the functionality your want.

A Better Way to Program in DirectX 9

PureGDK is a 3D game and application developer’s dream come true -- it streamlines the entire process of incorporating powerful DirectX 9 capabilities into your software.

Create and update your software faster, with more time to focus on fun. With PureGDK you can get instant results with human-readable code without the difficulty imposed by other languages and hard-to-program graphics APIs. Build the software you want now.

Image

The DirectX 9 Solution for PureBasic

Pure GDK offers you the power of DarkBASIC Professional, with complete integration into the PureBasic development environment.
PureGDK Advantages

The PureGDK advantage
  • 3D Graphics for PureBasic -- Harness the power of the DarkBASIC Professional 3D engine for your PureBasic projects
  • Application Development for DarkBasic -- The PureBasic language brings powerful application development capabilities to DarkBasic Professional programmers.
  • Powerful Debugging Tools -- Full support for the PureBasic IDE and its powerful debugging tools
  • Multi-Core Features -- PureGDK takes advantage of parallel processing to bring enhanced debugging performance of up to 500%!
  • Add Your Own Features! -- PureGDK comes with an easy to use framework library for wrapping DarkBasic Professional plugins that you can program yourself in PureBasic.
  • Support for Third-Party Plugins -- PureGDK includes pre-built library interfaces for many official and popular community plugins. No need to wrap them yourself!
  • Access to DirectX 9 Internals -- PureGDK takes advantage of PureBasic's support DirectX 9 interfaces by providing complete access to the interfaces exposed by DarkBasic Professional and allows you to take programming with DarkBasic and DirectX 9 to the next level.
The DarkBasic advantage

DarkBASIC Professional is the most advanced games development package built on the BASIC language currently available. No other package out there makes it as easy to incorporate all of the special features and effects you see in todays games and no other package natively offers the benefits of Microsofts DirectX 9 technology. -The Game Creators
  • Binary Space Partitioning (BSP)
  • Potential Visibility Set
  • Pixel & vertex shaders
  • Real time shadows
  • True reflections
  • Lights
  • Matrices
  • Advanced terrain
  • Multiple camera views
  • Particle system
  • Lightning fast 2D sprites
  • Polygon collision detection
  • Bump mapping
  • Light mapping
  • Environment mapping
  • Multitexturing
  • Bone based animations
  • Cartoon shading
  • Rainbow rendering
  • Low level access of object data
  • Vector and matrix manipulation
The PureBasic advantage

PureBasic is a programming language based on established BASIC rules. The key features of PureBasic are portability (Windows, AmigaOS and Linux are currently fully supported), the production of very fast and highly optimized executables and, of course, the very simple BASIC syntax. PureBasic has been created for the beginner and expert alike. We have put a lot of effort into its realization to produce a fast, reliable and system friendly language. -Fantaisie Software
  • Huge set of internal commands (800+) to quickly and easily build any application or game
  • All BASIC keywords are supported
  • Very fast compiler which creates highly optimized executables
  • No external DLLs, runtime interpreter or anything else required when creating executables
  • Procedure support for structured programming with local and global variables
  • Access to full OS API for advanced programmers
  • Easy but very fast 2D game support trough dedicated libraries (DirectX, SDL, ...)
  • Easy and high quality 3D support based on OGRE
  • Optimal use of the available hardware by using highly optimized (assembly) commands
  • Source code is portable between AmigaOS, Windows, MacOS X and Linux, for games and applications
  • Dedicated editor and development environment
  • Integrated debugger to easily trace programming bugs.
What are you waiting for?
PureGDK won't be in beta forever. Go check it out at http://PureGDK.com!

Posted: Tue Feb 19, 2008 4:32 am
by Mistrel
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:

Code: Select all

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.

Code: Select all

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:

Code: Select all

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

Posted: Tue Feb 19, 2008 4:49 am
by BriceManuel
I cannot wait to try this. I should be able to ditch my EB based engines once and for all!!

Posted: Tue Feb 19, 2008 4:54 am
by Mistrel
BriceManuel wrote:I cannot wait to try this. I should be able to ditch my EB based engines once and for all!!
What is EB?

Posted: Tue Feb 19, 2008 5:02 am
by BriceManuel
Mistrel wrote:
BriceManuel wrote:I cannot wait to try this. I should be able to ditch my EB based engines once and for all!!
What is EB?
emergence basic. I had quickly wrapped its 3d engine to use with PB until PB got the 3D overhaul.

This will be a much better solution. Thank you so much for your work on this!!

Posted: Tue Feb 19, 2008 5:08 am
by BriceManuel
*edit* For those like me who got excited and didn't read the fine print. This is NOT a PB port of the free DarkGDK.

Posted: Tue Feb 19, 2008 5:57 am
by Mistrel
I would like to mention that while there is a free (non-commercial) version DarkGDK for Microsoft's Visual C++ Express (feature-limited) it has many outstanding bugs and only supports a very limited number of plugins. It is also historically always behind in development in comparison to TGC's flagship product DarkBasic Professional.

DarkGDK-commercial is a $400 investment which does not include the cost of Visual Studio.

It's not possible to port DarkGDK because it actually checks at compile-time to see if you're linking using Microsoft's compiler.

Posted: Tue Feb 19, 2008 6:55 am
by sigi
After compiling one of the examples through PureBasic i get the following error: Wrong compiler response. Probably not the correct compiler version. Please reinstall PureBasic.
I run PB 4.10. :?

Posted: Tue Feb 19, 2008 7:11 am
by Mistrel
sigi wrote:After compiling one of the examples through PureBasic i get the following error: Wrong compiler response. Probably not the correct compiler version. Please reinstall PureBasic.
I run PB 4.10. :?
Are you running the trial version for PureBasic? If you are then you won't be able to compile to an exe or compile without the debugger. Go to Debugger -> Use Debugger from file menu and you should be able to compile. Your projects will not run at full speed when compiling this way.

I'll also make a note of this in one of my posts above.

Posted: Tue Feb 19, 2008 7:19 am
by sigi
No, i run the full version, but with Debugger on the most of the Examples are working.

Posted: Tue Feb 19, 2008 7:26 am
by Mistrel
Would you do a clean reinstall of PureBasic and PureGDK to see if this bug still occurs? I can't reproduce this on my laptop or desktop.

Can you still compile by going to Compiler -> Create Executable?

Posted: Tue Feb 19, 2008 7:32 am
by sigi
Can`t create Executable, same Error as before.

Posted: Tue Feb 19, 2008 9:06 am
by Mistrel
I'm uploaded a minor update which that makes PureGDK compatible with the demo version of PureBasic when compiling with the debugger. I don't expect it to help but you can try this one to see if it fixes your problem.

This is obviously a bug but I cannot fix it unless I can either reproduce it or work with you online. If anyone else experiences this bug please contact me through a forum PM to schedule a debugging session over IM.

I've also confirmed that the DarkBasic Professional trial is not compatible with PureGDK. This is because the trial uses the outdated 6.2 release which has several bugs that cause problems with PureGDK.

Posted: Tue Feb 19, 2008 11:11 am
by Seymour Clufley
The website says that the beta is free (if registered).

Have you any idea how much the released version wil be?

Posted: Tue Feb 19, 2008 1:06 pm
by milan1612
I get this
---------------------------
Setup Error
---------------------------
An error has occurred while writing to the DarkBasic plugins folder.
---------------------------
OK
---------------------------
while installing :?