Site Search
Homepage of Otaku No Zoku
Complete Archives of Otaku No Zoku
About Otaku No Zoku
Subscribe to Otaku No Zoku
Bookmark Otaku No Zoku

DarkBASIC Professional :

darkbasicprofessionalbox.pngRemember when microcomputers shipped with BASIC? And you didn’t have to resort to pages of C++ code calling obscure API functions just to draw a colour rectangle on-screen? DarkBASIC Professional is a hidden gem often overlooked by commercial game developers – a modern, structured BASIC dialect with lots of commands specifically for handling games using DirectX. Capable of turning out 2D platformers and 2D shooters as easily as it handles 3D first-person shooters (both indoor & outdoor), with DarkBASIC Professional you can create anything you would with C++/Win32/DirectX, without the steep learning curve. It’s an ideal script language for game designers and programmers in a rush to try out an idea. You get the idea up on-screen rapidly with minimum fuss, and from there take it all the way through to conclusion, i.e. burning a gold master.

codeeditor.jpg
Code editor & IDE

The current IDE, unlike previous versions, is a native Windows application providing an editor, compiler and integrated source-level debugger. The editor is reasonably well featured, though primitive in places and really just about capable of the task for which it’s designed, but offers little more. Don’t expect Visual Studio or SlickEdit here. It handles projects, multiple source files, assets, version numbering, and a TO DO list. The debugger offers the usual complement of features such as breakpoints, single-step and variable watches, both auto-scope and user-defined.

The BASIC compiler turns out “real machine code” and disassembling the compiled output it appears the compiler is non-optimizing, leaving the code as-is and performing a linear one-to-one conversion from BASIC to assembly, calling dynamic link libraries as required. This ability to call in to other DLL’s makes the language extensible by a programmer capable of writing dynamic link libraries in e.g. Visual BASIC, C++ or Delphi.

The compiler turns out stand-alone executables with the ability to bundle any additional DLLs and assets into a single executable file and it removes any unused portions of the DarkBASIC Professional libraries. Once the executable is generated, with or without bundled assets, it can be automatically compressed and encrypted for a smaller and more secure distributable.

DarkBASIC Professional is specifically created for manipulating the DirectX API in a simple and easy way. It handles all of the DirectX 8.1 features, providing ample facilities for 2D — using the DirectX sprite interface — and 3D graphics, plus input and audio. The package makes initialization of a full-screen or windowed DirectX application as simple as can be. By either setting the start-up options in the project explorer or issuing a BASIC command that dictates screen resolution along with windowed or exclusive mode. The project settings also control the type of executable that is created, whether it is standalone or a Windows installer.

The 2D sprite system is very capable, handling animations, movement and collision between sprites. The 3D side is an even more comprehensive command set for graphics and math, covering vectors, matrices, Catmull Rom and Hermite splines, plus all the usual trigonometry commands found in other modern BASIC dialects. The 3D graphics handle the usual rendering of polygons, loading of 3D objects from disk and creating primitives at run-time plus commands to control the individual joints on a boned object and real-time mesh deformation with direct support for a lot of popular model formats, e.g. Quake 2 & 3, HalfLife, DirectX and 3DS Max.

particles.jpg
Glittery particle effects

Advanced texturing & rendering techniques using bump mapping, environment mapping and multitexturing give the shine to games, along with support for hardware shadows, vertex and pixel shaders and even a built-in cartoon shader. Rounding out the graphics capabilities is a general purpose particle system with specific support for the unique properties of snow and fire particles.

Camera control allows for multiple simultaneous cameras for multi-viewport rendering to either the backbuffer or a bitmap. A camera is moved around dynamically via code or the tracking feature that makes it follow another object. Pointing a camera at a specific object or point in space is trivial, especially for non-programmers unfamiliar with look-at matrices. One of the nice features I explored was the intelligent navigation, by placing invisible static collision boxes in a scene the camera will attempt to avoid entering the boxes. Scene lights are fully controllable, generated either in a level editor or dynamically at run-time, with commands for spot, point and ambient along with control of fogging distance.

Object collision detection is handled automatically, 3D uses bounding spheres, 2D sprites using rectangles. Once a collision has taken place DarkBASIC Professional can either automatically move the colliding objects apart, providing for a primitive collision resolution, or leave it up to the programmer to determine the exact outcome. The collision command set provides ray casting tests for user-determined collisions and probing.

fpsenvironment.jpg
FPS using PVS and BSP

DarkBASIC Professional renders indoor and outdoor 3D scenes equally well with PVS and BSP support and a capable terrain engine that loads BSP worlds handling the culling, texturing and collision automatically. There’s a bundled BSP compiler that’s installed with the IDE and a programmer can generate dynamic terrain from height map files at run-time.

cartographyshoplighting.jpgDarkBASIC Professional is supported by several custom tools that can be purchased through the DarkBASIC Professional website. Cartography Shop, v3 to be released soon, is a full fledged 3D map & level editor that allows a designer to create levels, placing objects and entities within the level and calculating static lighting. Texture Maker is designed for creating model and game textures, wrapping them directly around a piece of 3D geometry model as you paint in 2D. Also available is 3D Canvas Pro for creating models to be used in your games, the 3D editor is far easier to get to grips with than much larger, more expensive packages. DarkBASIC Developer Network is an additional subscription based service that gives you access to developer support forums, enhanced technical support and a direct line to the DarkBASIC Professional developers.

Beyond the graphics features provision is made for input from keyboard, joystick/joypad and mouse, along with force feedback capability. There are also extensions available for free from the DarkBASIC Professional support website that interface with a VR glove and USB light gun. The language provides strong audio support; streaming CD audio, MIDI and MP3 playback for music, and WAV and other formats for the sound effects, all of which can be processed as 3D positional audio. It is also possible to capture directly from the microphone which proves useful for net play games. Video, either from an AVI/MPEG file or DVD can be mapped on to a texture in real-time and then wrapped around an object.

DarkBASIC Professional features two command sets that deal with network communication, one for accessing FTP sites where you can retrieve or store any data you want; this feature can be used for sending high scores to a remote server, downloading the latest patch or level pack for an established game or even automatically upgrading the game from un-registered to registered. The other command set handles multiplayer games via LAN or TCP/IP using a peer-to-peer or client/server architecture. With this system the hardest part of creating a client/server multiplayer game is presenting a meaningful user interface to allow the player to connect. I wasn’t expecting very much from this area of the package, usually network communication in many game SDK’s is bolted on an as afterthought and allows you to only send the most rudimentary of messages. DarkBASIC Professional handles the basics and more besides with provision for transmission and reception of arbitrary blocks of memory, bitmaps, audio and complete object meshes.

The manual, spiral bound so that it will lay flat on the desktop next to your keyboard, covers the BASIC command set, each section logically divided so that it deals with a specific area; 2D sprites, 3D objects, vector & matrices, memory manipulation, etc. Each BASIC command is given a brief paragraph of information and the syntax that it requires. There are a few weaknesses in the manual; they don’t supply brief examples of how to use commands, often many commands will work in conjunction and you must infer how they bolt together. Many, but not all, of the commands are covered in the on-line examples replete with source code, and the on-line help provides more comprehensive information with small code snippets. I don’t see the need for the physical manual, either they should bring it up to the level of the on-line documentation or abandon it all together. I can understand the desire to provide something more than just a CD in a box but as it stands the paper manual is little more than filler. It would be nice to see a nice thick “user guide” that covers the particular BASIC dialect in more depth. One complaint I have with the on-line help is that it uses a non-“Windows standard” help browser. Is there any reason to deviate from the capable and usable Windows help format these days?

The compiler & IDE package are actively supported by the publisher/developer with regular updates and a monthly news letter. Cost is $99.99, with no royalty fees, and access to the DarkBASIC Developer Network costs an additional $69 per year. Consult the website which frequently runs special offers. The publisher offers educational support to schools and Universities with free licenses available.

On the web you will find a large, thriving and very active semi-pro community turning out some remarkable and experimental games, screenshots of which can be found on the DarkBASIC Professional support website. Starwraith 3, a kind of cut down version of Freelancer is remarkable and a tribute to the capability of the package and programmer. DarkBASIC Professional recently hosted a Retro competition that had almost one hundred respondents, which gives some clue to the size of the community behind this package.

Monthly newsletters

Each month a newsletter is sent out to all DBDN subscribers covering the latest developments, upcoming features, interviews with prominent people from the DarkBASIC Professional community and product offers. The newsletter also presents tutorials each month, also available from the website, that cover specific aspects of developing for DarkBASIC Professional. The hosted DarkBASIC Professional forums are one of the best resources available with source code often being offered up by veteran DarkBASIC Professional programmers within a few hours of posing the question.

thegamecreatorslogo.gif

As of this writing the DarkBASIC company has re-branded itself as The Game Creators, with a change in the URL to http://www.thegamecreators.com/.

Patch 5 has also been released, requiring DirectX 9.0 to be installed, and adding several dozen new commands dealing with vertex and pixels shaders. If you are creating games for a user-base that is still using the previous generation of DirectX technologies you may want to avoid upgrading just yet. Released, too, is issue 8 of the DarkBASIC monthly newsletter.

Buy DarkBASIC Professional at Amazon.com now!

“Beginner’s Guide to DarkBASIC Game Programming” by Jonathan Harbour is also a valuable resource for programmers interested in this easy to learn game programming language.

VERDICT

DarkBASIC Professional

darkbasicprofessionalbox.pngCompany: The Game Creators

Price: $99.99

Rating

8 out of 10

Pros

  1. Simplifies access to all aspects of DirectX
  2. Allows you to quickly get an idea up and running.
  3. Once the framework is in place designers can treat it just like scripting.

Cons

  1. Requires CD or USB dongle to inserted in the machine at all times (this was fixed in Patch 4.1 so that now it is only every 400 compiles)
  2. Can be clumsy to express some ideas due to a lack of object-oriented features.
  3. Lack of professional production features could make it difficult to integrate in to a professional development environment.

Additional Information

http://www.thegamecreators.com

Bibliography

Harbour, Jonathan and Smith, Joshua (2003) “Beginners Guide to DarkBASIC Game Programming” Premier Press

Buy DarkBASIC Professional at Amazon.com now!

“Beginner’s Guide to DarkBASIC Game Programming” by Jonathan Harbour is also a valuable resource for programmers interested in this easy to learn game programming language.

This review originally appeared in the March, 2004 issue of Game Developer Magazine.

Liked This Post?

Subscribe to the RSS feed or follow me on Twitter to stay up to date!