Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / [STICKY] Getting Started with DarkBASIC - Install, Setup.ini, Vista, D3DRM.DLL, Frame Rate - fps, 100% CPU, Music (midi), Sound, Animation

Author
Message
Latch
11
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 26th Mar 2009 22:59 Edited at: 14th Jun 2009 13:14
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.

Attachments

Login to view attachments
Ashingda 27
9
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 26th Mar 2009 23:02
Wow nice work guys!
Quirkyjim
9
Years of Service
User Offline
Joined: 18th Oct 2008
Location: At my computer
Posted: 26th Mar 2009 23:36 Edited at: 26th Mar 2009 23:36
I vote for sticky! This is most definitely worthy, seeing the number of posts that are answered by this that come up daily!



By the way, I think you should include a blip that says what's in the download, download size, etc.

~QJ
That's what they WANT you to think...
Caleb1994
9
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 27th Mar 2009 05:35
wow nice

i vote sticky also.... although thats if a mod comes around the db board.... haha havnt seen one in a while!

New Site! Check it out \/
Libervurto
11
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 27th Mar 2009 16:05
good job, but we'll still get asked those questions .
STICKY!

The Universe has been erased by a mod because it was larger
than 240x80 pixels.
Caleb1994
9
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 27th Mar 2009 18:17 Edited at: 27th Mar 2009 18:29
Not if we can get this stickied


Someone should go over to a different board and tell them that abunch of us think it needs to be stickied hahaha j/k that would be against the rules lol

New Site! Check it out \/
Irojo
9
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 1st Apr 2009 01:37
I vote sticky too.

Well done Latch and Robert The Robot!


Time is money. I just ripped you off.
abrobe1
8
Years of Service
User Offline
Joined: 3rd Apr 2009
Location:
Posted: 3rd Apr 2009 12:55
Well done, I like it too.

One addition:
If you're using Windows XP (like me) and want to make your game Vista-compatible, it's enough to copy d3drm.dll to the folder, where the DarkBasic-generated EXE exists and your game will work on Vista too (friend tested, worked well).
Latch
11
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 11th Apr 2009 03:42
@abrobe1
That makes sense. It's still a good idea to place a copy of the d3drm.dll in the system or system32 folder or the sysWOW64 folder, every DB game should work and each of your projects that are in a different folder should work without having to constantly move the d3drm.dll around. In fact, most if not all DirectX games that use retained mode should work in that case...

I'm not sure if it's ok to distribute the d3drm.dll with a game one creates. I don't know if it's in violation of the copyright.

Enjoy your day.
Irojo
9
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 12th May 2009 05:44
Just wanted to say thanks, I just got a vista today, haven't used one before, and followed d3rm.dll instructions. It's running beautifully now. Thanks a bundle guys.


Time is money. I just ripped you off.
Ron Erickson
Moderator
15
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 12th May 2009 13:04
STUCK!

Nice work guys!


a.k.a WOLF!
Caleb1994
9
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 12th May 2009 20:07
Yay for stickys!!!!!!!!!!!




btw just a couple days ago i used the 60 fps cap info for my program oh exept something weird. mine waS capped at 100 fps not 60 but the same ideas works so whatever lol

New Site! Check it out \/
arbiter chewbacca hybrid
9
Years of Service
User Offline
Joined: 30th Nov 2008
Location:
Posted: 13th May 2009 03:54
I had to reinstall the d3drm.dll when I got vista and learned the hard way. When I tried to run my FPS engine it said "missing d3drm.dll" and I thought what the heck is this??!!!?!!?! then I got bored and was on youtube. coincidentally found a video on a batman doom mod. Looked up how to mod doom and you had to use doom builder which only supported XP. Then I googled how to make doom builder run on vista. (this was after my journey away from darkbasic.(yes during that time period I bought vista ultimate and installed it).And found a post in the forums on how to run doom builder on vista. And I needed a dll. he had posted a link to the site to get it from there. Pretty soon after I learned what a .dll file was an application extension. So I googled "How to get the d3drm.dll for free and found it then I could use darkbasic again.

[link]www.kdlproductions.webs.com[link]
Robert The Robot
11
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 13th May 2009 21:21
Wow, good to see this stickeyed at last!

@Caleb 1994
Most computer monitors run at 60Hz (i.e. 60fps) but there are a few faster monitors around. I'd heard about 120Hz monitors, but not a 100Hz monitor like the one you've got.

@arbiter chewbacca hybrid
You're right in saying that DLL's are application extensions, but they are slightly more than that - they're whole libraries of extra functions, written in (I think) any language, that can be called by other programs.

If you find you need a particular command not supported in DBC, you can build a dll in another language like C++, C, or even Delphi and then call the commands from DBC using the "Load DLL" set. They'll behave just like DBC's ordinary User Functions!

(Just be careful you don't run before you walk, though, as other languages can be quite tough to learnand you need to know exactly what you're doing!)

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
Caleb1994
9
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 14th May 2009 17:48
Oh Ok that makes sense. it might be because mines a couple years old idk lol

New Site! Check it out \/

Login to post a reply

Server time is: 2018-01-24 07:19:28
Your offset time is: 2018-01-24 07:19:28