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.

Author
Message
Iceman00
22
Years of Service
User Offline
Joined: 15th Feb 2003
Location:
Posted: 18th Feb 2003 01:34
Is it at all posible to build a Db Pro to C++ converter??? This woulld really help me as I'm a c++ programer a heart and often find I want to add on to my progrma with little trinks i learned in c++ many of which are imposible(so far) to get in Dbpro... An idea of mine was using function calls in c++ to simulate a db environment... Also if anyone has done anything like this before(Eg. DB to Visual Basic) please tell me.
gamefreaks
22
Years of Service
User Offline
Joined: 17th Feb 2003
Location: United Kingdom
Posted: 18th Feb 2003 02:13
It would be very difficult to write a program that generates C/C++ code due to the intricaces of the language.

However, I imagine that a class that encapsulates DB commands as member functions could be written, which would certainly be a step in the right direction.

SasukiShinozawa
22
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 18th Feb 2003 02:15
Why not just write your own .dll in C++ and put your tricks in there? DB could use that. Or is this not possible?

Tanto? Iie. Kore wa tachi desu.
gamefreaks
22
Years of Service
User Offline
Joined: 17th Feb 2003
Location: United Kingdom
Posted: 18th Feb 2003 02:24
Yes, that is completely possible. However...

Anyone who can code a DB dll, would code their game in C++ anyway, and secondly, would there be any advantage since DB is written in C++ anyway?

I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day.
Iceman00
22
Years of Service
User Offline
Joined: 15th Feb 2003
Location:
Posted: 18th Feb 2003 02:24
It's for things like ghosting where a .dll would reqire too much work...

Iceman00
22
Years of Service
User Offline
Joined: 15th Feb 2003
Location:
Posted: 18th Feb 2003 02:25
BTW Gamefreak, your on the lines of what i was thinking...

Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 18th Feb 2003 02:52
personally i use Pro because the engine is premade and universal - it would take a good few months to develop a similar system and if i wanted to update it, i'd have to then rewrite seconds of it ... i prefer a premade engine i can extend upon my own

i can't offer a DBpro -> C++ option because, well quite frankly it'd be a waste of time because i doubt many people would use it and it'd no doubt annoy the DBS team that people could code in DarkBasic and then simply translate the whole thing into C++ with DirectX or OpenGL

remember though if your adding a language front, then what you have to also do is recode ALL of the C++ functions ...

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
CloseToPerfect
22
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 18th Feb 2003 06:28
I thought of doing this, I know the language I use Euphoria has a translator to c++, it works perfect, so I think it could be done in db as well.

rapscaLLion
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 18th Feb 2003 06:38
If someone did do that, my guess is the C++ code could possibly run but would be horribly unreadable.

Anyway, if you are so attached to C++, use it for your game, because translating DBP - C++ completely defeats the purpose IMHO.

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors
CloseToPerfect
22
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 18th Feb 2003 07:38
I don't know, the extra functionality of c++ would be great to take you db code as far as you can and then add the c++ code to optimize it. with c++ you can embed asm code, and c++ code uns faster then dbp, it's just so much easier to write dbp code then c++ code.

doclar1
22
Years of Service
User Offline
Joined: 4th Jan 2003
Location: United States
Posted: 18th Feb 2003 11:28
It could be done to a level of understanding, but only used
as a learning tool, to show just what or how you could do or
go about doing the same type of code in a C++ enviroment.

To just out-right translate...?? hmmmm, It would take a
thought or two, but by thought two...a guy would just have
to say no.

To end, and with all due respect, the idea would have to be
"kicked in the seat of the pants" until all life on earth
was non-existant!


With Respect,
Lawrence D.F.Sr.

Regards,
Lawrence
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Feb 2003 14:24
I'm trying to imagine what the point of a DBP -> C++ translator would be. The only thing I can think of is that all the versions of C++ I'm familiar with come with optimisers. I can see nothing else, unless the libraries are rewritten - but whats the point of that? They're already written in C++.

Now a C++ SDK would be a different matter, and that is quite possible now if you're willing to be inventive and put up with a few niggly gotcha's.
gamefreaks
22
Years of Service
User Offline
Joined: 17th Feb 2003
Location: United Kingdom
Posted: 19th Feb 2003 06:26
I can see the point of a DB -> C/C++ converter but since DB is already written in C++, would the code be any faster?

As has already been stated, a converter won't have the 'common sense' of a real programmer and won't be able to generate optimised or readable code. This is especially so with C/C++ due to the flexibility of the language. A converter simply won't take advantage of the language!

I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day.

Login to post a reply

Server time is: 2025-05-18 12:52:35
Your offset time is: 2025-05-18 12:52:35