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 / OpenGL vs. DarkBASIC

Author
Message
Alex Deef
10
Years of Service
User Offline
Joined: 8th Apr 2014
Location: eastern europe
Posted: 22nd Apr 2014 16:13
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!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd Apr 2014 17:12
Quote: "PS. FYI, I've also posted this question at the official DarkBASIC website to compensate for bias!"

This is the official website.


Are you familiar with using DBP or C++? Have you done any research on the languages yourself yet?

It depends on what your end goal is. DBP is easier to pick up if you're a new programmer, and greatly speeds up initial creation time allowing for rapid prototyping. It's use of 3rd party plugins allows users to expand on its functionality to pretty much whatever they want.

But DBP is Windows only because it relies on DirectX, OGL is cross-platform. C++ also allows you to use all the latest technologies and really doesn't have any limits on what you can do.

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 22nd Apr 2014 17:41
That's a tricky one, it depends greatly on the programmers experience.

DBPro is the sort of language you can get results from right away. A lot of very complicated and time consuming work is already done for the programmer, like collision, occlusion, garbage collection, string handling etc etc etc. The bottom line is that without an option like DBPro, a lot of people just wouldn't get anything done. Really to be a programmer you need good math skills, no matter what language you're using - but with DBPro you don't need anything more than you'd learn in high school. DBPro is for people who don't have the ability, time, or patience to make their own game engine, there are sacrifices but again, it depends on programmer skill. Really there aren't many Indie games out there that couldn't be made in DBPro.

C++ takes a lot of learning, then some more learning to unlearn the bad habits you've learned along the way!
It lets the programmer take full control over things, and most importantly optimize code. The OpenGL component is optional, because OpenGL is wrapped in numerous forms, and C++ can just as easily use DX as well. In the background, GL and DX both work very similarly, and the actual visual qualities will be decided by shaders, so really I think it's more about C++ vs DBPro.

I'm probably not saying much that you don't already know - C++ is more complicated and faster, but DBPro takes no time to learn, and on modern PC's there should be no concern about speed. I have made a game in DBPro for PC, and in C++ for iOS, and that might be more interesting to you.

Besides being 2 different platforms, 2 different languages with their own rules, the actual game logic is the same... so much of C++'s mystery is just syntax... I'll say that C++ programmers have no right whatsoever to look down on other languages. C++ can be just as messy and unruly as BASIC. The game logic isn't really the concern, it's just logic - stuff that people can learn really quickly no matter what language. The tricky stuff is when you have to do something unique. In my game I have a water plane, like a 2D water effect with waves that react to sprites dropping in, splashes etc etc. It's a 2-way array check, with the logic being the same on PC or iOS, but displaying the water is completely different on each system. On the PC with DBPro, the water is a segmented plane, like a curtain that gave about 80 control points to make the waves etc. I made a model then used the vertex adjustment commands in DBPro to set the water. In C++ with OpenGL on the other hand, I made a custom water rendering function that used an OpenGL vertex array and triangle strip instead... so in OpenGL the wave is rendered from scratch with it's own special function, and is probably 2 or 3 times faster than the DBPro object method.

If the programmer has the skills and the project warrants it, then C++ is the sensible option, but there are several flavors of C++ - you can even use DBPro's library in C++ with DarkGDK. C++ is the lowest level anybody really goes these days, it's always gonna be the best option in the long run - but only if the programmer can deal with it.
DBPro lets the programmer get stuck in - I've written games in DBPro over a weekend.

Personally, I like C++, but I still choose higher level languages over it. You know when you have to walk the same path over and over, like the walk to school for example... it get's to the point where you can't remember the walk, your brain just switches off until you get to the destination... well I'm like that with DBPro. If I have an idea, by the time I get to my PC it's half-coded already, DBPro is so quick at prototyping it's a no brainer to use it for that at least. Sometimes you get an idea that you just need to see happen - and DBPro is the language that shows me stuff happening quickly. If I was studying game development in college I'd opt for C++ every single time, but for my hobby and indie development I prefer the straightforward attitude of DBPro and AGK.

Moreover, even if I was using C++, I'd still prototype everything in DBPro first - C++ demands that you have a rough idea of what you want to achieve.

I am the one who knocks...

Login to post a reply

Server time is: 2024-11-21 11:27:26
Your offset time is: 2024-11-21 11:27:26