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.

Dark GDK / can you convert DBpro code to darkgameSDK easly

Author
Message
Dark Angel_1246
19
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 14th Jan 2005 12:32
hi
i want to know if its resonbaly easy to convert DBPRO code to DGSDK. does DGSdk have all the commands from DBpro

Jesse Farr
Erick G
Retired Moderator
19
Years of Service
User Offline
Joined: 2nd Oct 2004
Location: Texas, USA
Posted: 14th Jan 2005 15:56
Yes, I have done it recently. It uses the same engine, it is syntactically familiar.
Dark Angel_1246
19
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 14th Jan 2005 17:12 Edited at: 14th Jan 2005 17:18
is there a converter or do you have to go through edit the comands ect your self

oh does nuclear glory work with DGSDK

Jesse Farr
scooby bloke
19
Years of Service
User Offline
Joined: 4th Nov 2004
Location:
Posted: 14th Jan 2005 23:05
Don't know anything about a converter, but Nuclear Glory works fine (you need to buy the C++ version though - the DBPro version won't work).
malcolm
20
Years of Service
User Offline
Joined: 1st Mar 2004
Location:
Posted: 15th Jan 2005 00:12
i am working on a db to c++ converter
done most of the work

all dark basic loop commands are converted into c ones
arrays converted into c
varibles converted into c
some db commands converted into c ones
none string db programs will convert fine
most program should compiler in c and run

just the db string to c++ left and a front end left
there is some commands i have left out and when the program is
done

i will look into converting them all well
data
restore
read
there is more but not made a list yet

malcolm bamber
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 15th Jan 2005 00:25
Whoah! get the net! - the infamous Mad Malcolm himself .

Sounds like a great way to help people into C++, should be very interesting when it's released.


Van-B


It's c**p being the only coder in the village.
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 15th Jan 2005 00:46
Quote: " Whoah! get the net! - the infamous Mad Malcolm himself"

He looks quite sane to me. Still if he shares half a name with Lee then there is always the posibility.


¿Como estas you el dia de today?
shovebot
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location:
Posted: 20th Jan 2005 09:05
You probably could write a program that converts the DBPro syntax into C++/DarkGAME quite easily, as malcolm is doing for us.

However, solely depending on a converter is a very unwise thing to do, as it will not take the advantages of C++ in anyway. Maybe a little faster but the code is going to represent C more than C++. You have to remember, C++ has object-oriented features which are very useful especially in game programming. I would just rewrite the game altogether whilst looking/copying&pasting the converted code and adjust it to use the OOP features well.


That was probably unneeded but thats how I am D:

[url="http://www.shovebotgames.com/"]shovebot games: shoving soon![/url]
malcolm
20
Years of Service
User Offline
Joined: 1st Mar 2004
Location:
Posted: 21st Jan 2005 01:24
Hi

I am making the db to c converter
so that i can get the more speed from my programs
that i have already made
without remaking the program in c
has i have a lot of source code in db which i use for my own needs

if you are starting a new project in the sdk then you should code it all in the sdk
or maybe you are new to c and you could code in db and convert it to c
so that you can see the lay out of a c program or to have some thing you can modify

the program that is converted will not be has good has one wrote in c or c++ from the start
but if you have a program that works and it is converted ok that that's all you need
you will still need to so some work with the converted file in most cases

malcolm bamber
Dark Angel_1246
19
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 23rd Jan 2005 05:35
Gives use a yell when your finished please

Jesse Farr
malcolm
20
Years of Service
User Offline
Joined: 1st Mar 2004
Location:
Posted: 23rd Jan 2005 19:23
i will let you all know when it all done

the big hold up so far is db to c strings

it will be free

malcolm bamber
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 23rd Jan 2005 21:04 Edited at: 24th Jan 2005 02:35
I bet - you would have to convert something like :

a$="Test"

to something like

char a[5];
strcpy(a,"Test");

char a[]="Test"; could be done, you wont know whether the string variable is used or not.

malcolm
20
Years of Service
User Offline
Joined: 1st Mar 2004
Location:
Posted: 23rd Jan 2005 22:25
This is my array code

char** ppLee = new char* [ 11*22*33 ];
int ppLeeA = 11;
int ppLeeB = 11 * 22;

*(ppLee+(2+(3*ppLeeA)+(4*ppLeeB)) = new char[strlen("first")+1];
strcpy( *(ppLee+(2+(3*ppLeeA)+(4*ppLeeB)),"first" );

// print array
dbPrint (*(ppLee+(2+(3*ppLeeA)+(4*ppLeeB)));

REM NOW DELETE THE STRING FROM THE ARRAY WHEN WE WANT TO PUT ANOTHER
STRING THERE
delete *(ppLee+(2+(3*ppLeeA)+(4*ppLeeB));


*(ppLee+(2+(3*ppLeeA)+(4*ppLeeB))=new char[strlen("second")+1];
strcpy( *(ppLee+(2+(3*ppLeeA)+(4*ppLeeB)),"second" );

// print array
dbPrint (*(ppLee+(2+(3*ppLeeA)+(4*ppLeeB)));

malcolm bamber
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 23rd Jan 2005 22:25
lovely...

The 3d chat is coming...
Rights For Traffic Cones!
zao420
20
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 24th Jan 2005 02:40
wouldn't it be easier to just use.

std::string a
a = "test"

you do need to add the header to use them but they seam like a better idea thern using char*

http://cavesoft.no-ip.com
WIP Version of my site. Usally it is offline.
http://dev-cavesoft.no-ip.com
malcolm
20
Years of Service
User Offline
Joined: 1st Mar 2004
Location:
Posted: 24th Jan 2005 03:23
hi
zao420

i will look into

std::string a
a = "test"

i have never used c++ before
and i have only program c on the amiga

so it is taking me some time
finding out how to do things

but thanks for the help

malcolm bamber
Dark Angel_1246
19
Years of Service
User Offline
Joined: 7th Jul 2004
Location: Australia
Posted: 24th Jan 2005 04:28
yeah that would be great

Dark_angel
Sam Cameron
20
Years of Service
User Offline
Joined: 26th Dec 2003
Location: 0,0,0 I\'m the center of the world !!!
Posted: 26th Jan 2005 02:28
malcolm, here we are looking foward to see you program, so the best of luck with it, hope you could get it right, because this will push DBP to the limits !! good luck again.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 26th Jan 2005 11:02
Quote: "char a[]="Test"; could be done, you wont know whether the string variable is used or not."

What did you mean by that? Its just that I'm currently writing a 'Basic-to-C++' converter as part of a project I'm doing and wondering what kind of problems I may run into.

CURRENT PROJECT: Chaos Hizzle Demo
STATUS: Release of BETA imminent!
Erick G
Retired Moderator
19
Years of Service
User Offline
Joined: 2nd Oct 2004
Location: Texas, USA
Posted: 26th Jan 2005 14:14
ummm, how on earth are you gonna tackel OO ?

Converting procedural to OO ?

I doubt you will be able to call it a basic to C++ converter, maybe a basic to c converter.

This was mentioned by shovebot above too. You are going to end up with a 1 to 1 basic to c representation.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 26th Jan 2005 16:53
Quote: "What did you mean by that?"

Using char[] to allocate strings, you can only safely append text to it, if you dont exceed the allocated string size.

Visit http://homepages.nildram.co.uk/~nickk/
Questions are a burden to others, answers a prison for oneself.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 26th Jan 2005 18:56
Oh okay I see what you mean.

CURRENT PROJECT: Chaos Hizzle Demo
STATUS: Release of BETA imminent!
malcolm
20
Years of Service
User Offline
Joined: 1st Mar 2004
Location:
Posted: 27th Jan 2005 01:19
hi Benjamin
most basic loops will convert to c very easy
the rest of the work is converting none c command

varibles = you can convert them to c
strings = see early post
gosub = i put the gosub code to that position
data = not done that code yet
functions = working on that now


malcolm bamber
Smithy
19
Years of Service
User Offline
Joined: 8th Dec 2004
Location: Switzerland
Posted: 27th Jan 2005 19:36
Erick:
Quote: "
ummm, how on earth are you gonna tackel OO ?

Converting procedural to OO ?

I doubt you will be able to call it a basic to C++ converter, maybe a basic to c converter.

This was mentioned by shovebot above too. You are going to end up with a 1 to 1 basic to c representation.
"


I think this converters are useful for translating kind of algorithms.
These algorithms you can then include in your objects.
(Say, the algorithm to calculate a certain rotation etc)

Smithy

//Pentium IV 3200E/Prescott; 800Mhz FSB; Hyperthreading; WinXP Pro (!XP2); ATI R9700PRO; 1024MB RAM (2x 512MB "DualChanneled"; VC++; Delphi; ADSL;

Login to post a reply

Server time is: 2024-04-18 04:03:21
Your offset time is: 2024-04-18 04:03:21