Hope I posted in the right section!
Anyway, I’m working on an essay for school in which I compare OpenGL and DarkBASIC. Here’s the essay question:
Which of the Two Programming Languages – DarkBASIC or C++ and OpenGL – is Superior in Regards to Writing a Three-Dimensional Computer Game?
If anyone is familiar with both OpenGL and DarkBASIC, could you please spare a few minutes to explain which of the two you consider to be better, and the reasons why?
Thanks for your time!
PS. FYI, I’ve also posted this question at the official DarkBASIC website to compensate for bias!
First of all, I never used DarkBASIC nor I intend to do so.
But I think you are comparing apple and oranges here. What do you mean by “superior”? C++ is a general-purpose programming language and OpenGL is a 3D rendering API, while DarkBASIC seems to be some sort of programming language/engine/framework for quick and cheap game programming.
First of all, programs written in C++(or another general-purpose language) will be most probably much faster. Secondly, as DarkBASIC seems to provide it’s own rendering system, it won’t be as flexible as using the low-level OpenGL or DirectX API. So you will be most probably limited in your choises and capabilities when using DarkBASIC. But if all you need it to write a small and simple “game”, it may be a good choise. Still, for larger projects or if you want to use custom algorithms/engines/full power of GPU and CPU, a general-purpose language is clearly “superior” (whatever it means )
So the first step for comparing the “superiority” of these languages is to define what constitutes “superiority”.
Examples would be: Easier for beginning programmers? Faster development time? Faster execution (of the same algorithm)? Portability? Extensability (availability of add-ons or thirdparty libraries)? Etc…
I, like most others on this forum, have never heard of DarkBASIC so we can’t make an informed contribution to your comparison unless the questions are directed towards our experience (C/C++/Java/OpenGL).
Well, I have used DarkBASIC and still use occationally (looking forward to quit using it, but im not good at c++ yet)
Aramil, you really should have defined the question better, but anyway i will try to answer pudman’s proposed ones…
While i was familiar with BASIC before, it wasn’t too hard to adapt to DarkBASIC, and generally for beginners it would be a lot easier than learning c++ and OpenGL and/or DirectX APIs.
Small projects can be made pretty quickly with Dbasic, but already Zengar’s mentioned lack of flexibility will hinder development of bigger project cause you would have to find workarounds for many issues.
About Algorythms… well this is not probably right place to discuss that cause DBasic uses DirectX and it is quite different from OpenGL. However it still is quite obvious while working with it, that somehow DBasic does everything quite slower than other applications with around the same amount of data. (I’mean it draws few primitives at lower FPS than other software) But then again, I haven’t made any specific tests concerning speed.
When it comes to Portability, DBasic shows itself from its worst side. Even simpliest “Hello World” program in DarkBasic Pro (not sure on standard version) will require you DirectX 9.0c and a compatible Video Card and quite an amount of computing power. But hey it is used to make games eh?
As of Extensability, it has quite a bunch of plug-ins but not close of libraries and APIs available for C++.
Let’s also not forget DBasic is a commercial product and quite expensive one too, while you can get C++ compiler and OpenGL API for free.
Hope this helps.
Tried to make it as constructive as i could.
If you’d ask my subjective opinion, answer would be something like “Don’t stick with DarkBasic if you know a single thing in C++. Save your money and start learning.” and that’s what I’m going to do.
I got the same response from the other forum, and so I will attempt to clarify for you as I have on the other.
On the DarkBASIC forum, I defined superior as running faster/smoother with impressive graphics and advanced gameplay, and of course, portability. Also, ease of progamming should be taken into account. Any input would be appreciated.
Of course, we all know which one is superior, though, don’t we?
JohnLM, I especially enjoyed reading your post; it was immensely helpful. May I have permission to quote you in my essay? Could I also quote you, Zengar?
You can quote me… but why should you?
To make my point short: while tools like DarkBASIC have their use (they are “simple” and appear attractive for inexperienced programmers) they won’t be a first choice to develop a larger project. To make a real-life comparison: DarkBASIC is something like Lego – it provides some basic elements, it is easy and fun (Lego at least, dunno about DarkBASIC) to use – and it is still rather flexible. But you will never reach the quality of a model made of clay.
Feel free to quote!
I’m really glad I could help.
Hmmm…so, is OpenGL supposed to be able to render things faster than DarkBASIC? I ran a test in both languages where each program draws 150 flat objects with the same texture, and the frame rates were nearly the same.
150 objects with how many polygons ?
If it is very static stuff, the language will not have significant performance impact. But when you do a game, you often need collision detection, some AI, manipulating a number of ennemies, etc. That can be slower.
Actually, I made a mistake; OpenGL renders over twice as fast and performs calculations over three times faster.
Aside from interpretation vs. compilation, why would DarkBASIC be slower? Even if you could point me in the direction of some articles that address this, that’d be great. Thanks.
Aside from interpretation vs. compilation, why would DarkBASIC be slower?
Aside those, no real reason to be slower, but it is already quite a lot
Indeed it would make more sense to compare DarkBasic with another Framework like XNA. OpenGL does not bother with Audio or Math, while the Frameworks try to supply everything in one package.
DarkBasic sure has advantages if you want to quickly prototype an idea, just to see if it works. With C++/OpenGL this requires months/years of building helper libraries first, before you can write the same prototype as in DarkBasic in a similar timeframe.