Robert the Robot and I put together a reference guide for DarkBASIC Classic. Thanks to Robert the Robot for detailing the information in the attached word document and tracking down some of the more elusive problems - and notably for outlining solutions to reducing CPU usage.
This reference guide is designed to get you started using DarkBASIC Classic (DBC), which should answer most of your initial questions. Vista compatibility, building your games for distribution, using DarkEdit, reducing the 100% CPU usage - all the basics are covered here.
As DBC was designed for older Windows operating systems, it's performance can vary from machine to machine. This guide came about in recognition of some performance failings that have come about as Windows has advanced and has been redesigned and DBC has not. Included in this reference is not only optimizing CPU usage, managing the speed at which DBC runs, and your distributal games and applications run beyond the recent occurance of a 60 FPS limit, but addressing media failings in terms of animation, midi, music, and sound performance.
Detailed documentation is contained in the attachment but since it runs to 17 pages, here’s a quick and simple overview of everything it contains:
Quick points:
* Make sure d3drm.dll exists on your computer and is located in the c:\windows\sysWOW64 folder for 64bit vista, c:\windows\system32 folder for windows versions greater than ME and c:\windows\system for version ME/98/95.
If the d3drm.dll is not on your computer the you might start with this site that has been mentioned on these forums:
DLLDump. However I cannot vouch for it as I have never used that site. You can always search the web or look on older machines. Always use virus scanning.
* Copy the included Setup.ini file into the same directory where DB.exe lives. This is usually located at C:\Program Files\Dark Basic Software\Dark Basic . Refer to the documentation on the Setup.ini for information on the various parameters.
* Distribute a (modified) copy of the Setup.ini file with your executables
* Before using DarkEDIT, an alternative and more Windows friendly programming editor, after installing it, make sure you click on Edit > Edit Options > DarkBASIC Options and fill in all of the necessary paths and locations.
* Refer to the darkedit.txt file for additional DarkEDIT settings information located in the ~DarkEDIT156 folder.
* Make sure any media you want to include in your program is kept in the same folder or in subfolders where your program is stored.
* CPU resources maxed out at 100% - see documentation
* "I can't change the 60 FPS cap" - see documentation
* "Whenver I use Set Text Font , the font size doesn't look right - it's too big or formatted strangely" - Whenver you use the command
Set Text Font "<font name>" add a character set indicator after the font name. For example,
the English character set is 1 so the command to set up
arial as the font with the English character set would read:
Set Text Font "arial",1
For versions of DarkBASIC Classic 1.20 (1.14) and above, the character set must be included or you will get unpredictable text display results if you are changing the font with Set Text Font. For a list of the character set codes, look in the Setup.ini file.
* "My midi music files won't play or won't play correctly" - use mp3s instead and/or see documentation for alternatives
* "My Animations don't work." - DBC can only import models in Direct X (.x) or .3ds format. DBC cannot use skeletal animation (bones/skinning). It uses linked limbs in a hierarchical parent-child structure.
* "I can’t load an ObjectImage – it keeps saying the file could not be loaded"
1) Check that you typed the file name properly, and remember to include the three or four letter file extension.
2) Check the file path you have specified. DBC starts by looking in the same folder as the the .dba source code being run, and working from there. Imagine you have this folder to contain you source code – “C:\Program Files\my proj” – and this folder to contain all you 3d objects - “C:\Program Files\my projObjects”.
If you call ‘Load Object “Knight.x”, 1’ then DBC will look for the file in the “my proj” folder, but won’t find the file since it is actually in the “Objects folder”. To successfully load the file, call ‘Load Object “Objects\Knight.x”, 1’
You should always specify paths relative to the folder you are currently working in (which can easily be found by calling the command “Get Dir$()”)
* "DBC gave the error ‘Music could not be loaded at line …’ "
In certain older versions of DBC, this can happen if you try and load a midi music file. This can easily be fixed by downloading and installing DBC v1.20 (which should be available via your Order History) An alternative solution is to convert your midi files to mp3 audio files – full details are given below under ‘Music in DBC’.
* Don't forget to read the help files! Aside from the detailed documentation on each command, DBC comes with dozens of example programs to show how particular commands work and they're well worth looking at. You may well find that they already answer your question!
* Check out the following links to help get you started programming with DarkBASIC Classic and hopfully to answer some common questions:
TDKs Tutorials
DarkBASIC Tutorials
a) Monster Hunt
b) Binary Moon
Upgrades
DBC 1.20 Commands Explained
Resource Links for New Comers
DarkBASIC Animator - Lightning Limbs
* And Lastly, don't forget to have fun programming!
If you are interested in the discussions that ultimately led to the creation of this resource check out the following links:
DarkBASIC 100% CPU Usage
Uncapping the 60 FPS Lock
DBC 1.20 Animation Bug
Animation Rotation - Quaternion Discussion
Animation Bug Solution
Enjoy your day.