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 Professional Discussion / darkbasic vs c++ ( efficiency )

Author
Message
noobnerd
15
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 13th Jan 2011 15:46
hi!
im wondering about how much faster is c++ than bark basic?
definitely not switching to C, just thinking, like is it impossible to do a game like crysis in db ( if you would have the resources and 1337 programmers they have )
Red Eye
17
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 13th Jan 2011 15:55
@noobnerd: Well you can get near it. Evolved proofs so.

Anyway, I believe you shouldnt look what the fastest is , but what the future is, and C++ wins that, and ofcourse its faster, also alot more is written for C++ than DBPro.

I would say C++ for me ;

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 13th Jan 2011 17:34
C++ with DarkGDK is said to be at least twice as fast. (some say more)

However, with a few small compromises here and there, and some clever optimization, DBPro can hold it's own pretty well.

enderleit
19
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 13th Jan 2011 17:57
If you compare the speeds of the languages "clean" I would think that C++ is ALOT faster, but you can do alot of advanced stuff if you use alot of plugin's which are usually written C++ (atleast for advanced graphics stuff).

Also as far as I know shaders which do alot of the effects nowadays is made in a language similar to C++ and will probably run just as fast if you call it from DBPRO.

So in summary, C++ is alot faster, but you can do most of the stuff with some workarounds...

Please correct me if I'm wrong.

DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 13th Jan 2011 18:15
DB is one of the best languages to put games and demos together quickly. C++ will always be faster, and in some cases a whole lot faster than DB Pro. It is a lot harder to use however and most game companies rely on a 3rd party game engine to use, rather than attempt to write their own. Hence the Crisis engine, Unreal engine, Doom, Quake etc. This is the main area they excel in speed as the engines are refined to be ultra fast at what they do. If DB had an equivalent graphics engine it would be very comparable to C++, but still a little slower as the code would not be as efficent as a c++ routine (or probably, it depends on the quality of the c++ code).

In my opinion, if DB had an updated 3D engine comparable to crisis or unreal, it would not be far behind at all. Not going to happen though unfortunately , have you seen the price of those things? Unreal is free now, for non commercial use, but good luck if you want to try that, it is pretty daunting.

DB has come a long way from when it was released and is a lot faster now, and less buggy. It is definitely possible to write some great games on it, which still run fast and smooth, as long as the hardware you are using is reasonable. Netbook apps for instance can be more troublesome, it doesn't take too many polys to slow them down. When I look at some commercial games running on one compared to DB stuff, I do wonder just where the main speed is lost, and I can only think the 3D engine is just not fast enough to suit netbooks, unless it is quite basic, or the memory usage is maybe a little high in comparison. But compare a FPS title made in Db, or FPS creator on a netbook, compared to a commercial one and you will see a massive difference. More so with the older games, the new ones (that have shaders) struggle somewhat.
I wonder occasionally just how fast a game would run today if programmed exclusively in assembler. It sure would be interesting just how much more could be pushed out of a pc that way, using modern graphics hardware. I think Aliens V Predator on the Atari Jaguar was the last assembler based game, I could be wrong though. With multi platform support being essential these days (console wise at least), assembler has died off in games programming and is mainly used for hardware driver support nowadays. It still is of course the fastest you can go, bar binary or hexadecimal.

Anyway that's my two pennies.

http://s6.bitefight.org/c.php?uid=103081
Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 13th Jan 2011 18:33
It happens that some native DBP commands are executed faster than their corresponding DGDK functions.
However, forget about long CPU loops and math operations in DBP, they will be quite sluggish if compared with the C/C++ performance, what'd I say, ten times faster?
In fact C/C++ is top in terms of performance, only machine code (assembler) runs faster.

noobnerd
15
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 15th Jan 2011 00:27
well thanks for the info everyone, was just asking so as to know if i can use dbpro forever (if i want to try gamemaking for real) or if i (as i seems) have to at somepoint learn c++.
Im no expert, but i think u cant compare self made dbp fps games to commerciall ones, if u check out cryteks requirements for engine coder (available job ^^) it features things as low-level controll and memory friendly coding, which i guess means that you just cant write "move object" (or its c++ equiv) but have to do lots of workarounds and memblock kinda stuff, multithreading, multicore support etc. (can you do multicore sup on dbp?)
Eminent
16
Years of Service
User Offline
Joined: 15th Jul 2010
Location:
Posted: 15th Jan 2011 03:39
Actually most big companies make their games in C++ just for the speed.


Login to post a reply

Server time is: 2026-07-21 15:13:56
Your offset time is: 2026-07-21 15:13:56