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 / Sample of Dark SDK C++ class library (and no more DBobject numbers)

Author
Message
Hobbs
18
Years of Service
User Offline
Joined: 15th Nov 2004
Location:
Posted: 10th Apr 2005 03:21
The attached zip file is a C++ demo of the Colision demo from TGC. The main program is Collision.cpp. I sent these files along with a copy of all the header files to TGC about three weeks ago and have heard nothing. This class library was written for VC++ .NET and has only been run in Visual Studio .Net under the Debug version. Also inclosed is a text file listing all the classes. With the exception of DarkSDK() and LoopSDK() all of the 'Public' functions of the SDK are supported. As you will see there is no need for object numbers with this, the classes provide them.

Attachments

Login to view attachments
billy the kid
18
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 10th Apr 2005 03:50
Did you explain to them how it works? Because I dont see how it would. I dont see where it takes care of the IDs from what you included.
Hobbs
18
Years of Service
User Offline
Joined: 15th Nov 2004
Location:
Posted: 10th Apr 2005 04:04
Sorry, I assumed everyone that would look at this would be intimate with C++. Not a smart assumption. The numbers are generated when a C++ object is created. It is part of the class constructor. So if you make an array of dbBox box(20) or dbBox *pBox = new dbBox(20), there will be twenty numbers assigned. You can reference them as box(n).left = 100 or pBox(n)->left = 100. You can create a new class of object, derived from dbBox ie. class BlackBox : public dbBox{};, and it will still get a number assigned.
OSX Using Happy Dude
19
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Apr 2005 07:23
Can you make the complete project availiable.

billy the kid
18
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 10th Apr 2005 07:30 Edited at: 10th Apr 2005 07:36
Quote: "Sorry, I assumed everyone that would look at this would be intimate with C++. Not a smart assumption. The numbers are generated when a C++ object is created. It is part of the class constructor. So if you make an array of dbBox box(20) or dbBox *pBox = new dbBox(20), there will be twenty numbers assigned. You can reference them as box(n).left = 100 or pBox(n)->left = 100. You can create a new class of object, derived from dbBox ie. class BlackBox : public dbBox{};, and it will still get a number assigned."


Duh! However you dont actually show how that is done. Do you have some sort of "smart" ID generator? Or do you just have some counter you increment? Do you have each class take care of its own IDs or do you have one base class that every class derives from and that base class takes care of IDs? I could ask a bunch more questions on how you take care of the IDs, but it might easier if you just tell us and/or show the code that does that.

EDIT:
If I was TGC, I personally would want to see such code to know whether or not your code does what you say it does. Also if it does it in a "smart" way. More than likely TGC hasnt gotten back to you because the code you provided is useless to them. That is if what you gave them is that zip file.
Hobbs
18
Years of Service
User Offline
Joined: 15th Nov 2004
Location:
Posted: 10th Apr 2005 23:09
Can you make the complete project availiable.

Making it available is a commitment to full support. I'm not ready to go there yet.
Hobbs
18
Years of Service
User Offline
Joined: 15th Nov 2004
Location:
Posted: 10th Apr 2005 23:22
"Duh! However you dont actually show how that is done. Do you have some sort of "smart" ID generator? Or do you just have some counter you increment? Do you have each class take care of its own IDs or do you have one base class that every class derives from and that base class takes care of IDs? I could ask a bunch more questions on how you take care of the IDs, but it might easier if you just tell us and/or show the code that does that."


Each class that needs an ID has a generator. Why do you care? It's all under the covers. You refer to an object by the name you give it, ie. dgBox redBox or dgBox* pRedBox = new dgBox as redBox.rotateX(n) or pRedBox->rotateX(n). Each object, you make an instance of has it's own name.

"EDIT:
If I was TGC, I personally would want to see such code to know whether or not your code does what you say it does. Also if it does it in a "smart" way. More than likely TGC hasnt gotten back to you because the code you provided is useless to them. That is if what you gave them is that zip file. "

TGC has seen more then I have posted here. Any good C++ programmer can see what is there by looking at the header files. They also were given an assememt of where the testing of each module stood.
MY CODE DOES WHAT I SAID IT DOES.
billy the kid
18
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 11th Apr 2005 00:59
I care because the ID generator is the core of any wrapper for DGSDK. Also knowing how IDs are generated allows me to decide if what you created is worth using for me. Also there is a question of how you handle the special cases such as lights which must have an ID between 0-7 and the default camera which has an ID of 0 and cant be deleted.

Quote: "Any good C++ programmer can see what is there by looking at the header files."


And any smart person would be skeptical of an unknown person's work. Look stop the condescending tone, and I will stop too.
Hobbs
18
Years of Service
User Offline
Joined: 15th Nov 2004
Location:
Posted: 11th Apr 2005 02:02
Quote: "lights which must have an ID between 0-7 and the default camera "


These are all handled.
OSX Using Happy Dude
19
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 11th Apr 2005 02:10
Quote: "Making it available is a commitment to full support"

Eh ?

The idea of supplying everything is so that we can compile & run the program ourselfs - no real use looking at C++ and hope that a solution will magically appear.

Visit http://homepages.nildram.co.uk/~nickk
Bill Nighy - The Doctor for me...
Hobbs
18
Years of Service
User Offline
Joined: 15th Nov 2004
Location:
Posted: 11th Apr 2005 03:22
Quote: "The idea of supplying everything is so that we can compile & run the program ourselfs - no real use looking at C++ and hope that a solution will magically appear.
"


I don't believe it is ready for that yet. I was trying to determine if there was enough interest to put in the effort to do the work, so it is good enough to pass on to others. It is already almost 10,000 lines of C++ code, 53 .cpp and .h files. The .lib file is over 1.5M bytes. To make this much code available for public consumption lots of additional testing and lots more documentation. It has only been tested in Debug mode of Visual Studio .Net. To put this in to a production enviroment, in my way of thinking, would require through testing in both .Net and Visual C++ V6. I'm sure some people would want it in other enviroments also. As I said I'm trying to find out what the interest level is.
Hobbs
18
Years of Service
User Offline
Joined: 15th Nov 2004
Location:
Posted: 11th Apr 2005 03:26
Quote: "The idea of supplying everything is so that we can compile & run the program ourselfs - no real use looking at C++ and hope that a solution will magically appear.
"

If we could identify 2 or 3 C++ programmers, I would be willing to ship the headers and .lib files so it could be used.
billy the kid
18
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 11th Apr 2005 03:27 Edited at: 11th Apr 2005 03:28
10,000 lines for a wrapper? Wow! Either you added a ton of extra functionality or you are counting a lot of comments.
Hobbs
18
Years of Service
User Offline
Joined: 15th Nov 2004
Location:
Posted: 11th Apr 2005 03:45
Quote: "10,000 lines for a wrapper? Wow! Either you added a ton of extra functionality or you are counting a lot of comments. "


You right, I just ran a program that counted non blank lines. I ran it again, eleminating comments, and it's just over 7000. There are, however, 1153 'Public' function calls, ones not labeled 'Internal Functions' in the Dark Game SDK. Also things were added, because C++ is not the same language as C, to include things like suppling default paramerer values, overloaded functions, class hierarcies and constructors and destructors.
IanM
Retired Moderator
20
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th Apr 2005 03:02
I wouldn't mind seeing what you've put together.

I put together a simple framework of this kind myself ... I haven't got the patience to wrap everything though, so well done.

7000 lines is smaller than I would have expected. My Interface library currently runs to just under 10000 lines, and that has no classes exposed to the outside.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Hobbs
18
Years of Service
User Offline
Joined: 15th Nov 2004
Location:
Posted: 12th Apr 2005 04:29
Quote: "I wouldn't mind seeing what you've put together."


I have not run this on anything other then Visual Studio .Net 2003, in debug mode. If you can run that I'll send you the header files and the .Lib file. The ,Lib and .H files are 387K ziped. Let me know where to send it.
IanM
Retired Moderator
20
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th Apr 2005 06:18
You can send to me via the email button - just be sure to put something meaningful in the subject line so that I spot it

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Smithy
18
Years of Service
User Offline
Joined: 8th Dec 2004
Location: Switzerland
Posted: 12th Apr 2005 18:54 Edited at: 14th Apr 2005 02:18
Hi Hobbs, I am very interested in your wrapper as I try to do one by myself.
It is just essential for further projects I think.

Here is what I have so far (not really, its a very old documentation, will update the link later today):
http://www.swissquake.ch/dmspry/other/framework/dgSDK%20Framework%20CppDoc.htm

I would like to help in some way... or if I can't help,... I just want to let you know that I am highly interested in such a wrapper!
I just need such a wrapper

C'mon, let us do this!

Regards,
DaByte

//edit 13-APR-2005 (GMT)
content updated
http://www.swissquake.ch/dmspry/other/framework/dgSDK%20Framework%20CppDoc.htm

//Pentium IV 3200E/Prescott; 800Mhz FSB; Hyperthreading; WinXP Pro (!XP2); ATI R9700PRO; 1024MB RAM (2x 512MB "DualChanneled"; VC++ 6.0; Delphi; ADSL;
Hobbs
18
Years of Service
User Offline
Joined: 15th Nov 2004
Location:
Posted: 13th Apr 2005 06:27
Smithy

If you give me an email address I'll get back to you. Email to my below.
Smithy
18
Years of Service
User Offline
Joined: 8th Dec 2004
Location: Switzerland
Posted: 13th Apr 2005 18:51 Edited at: 14th Apr 2005 02:19
Oops, forgot to update the link, e.g. the htm-files.

Will try to do it when I am back home.

Some thoughts:

I try to make this "main" class, <dgSDKApp>.
This object changes/sets the resolution, the windowtitle, the syncrate etc.

-example for setup the app with the "main"-class
CDaB_dgSDKApp IMyApp;
IMyApp.SetTitle ( 'TestApp' );
IMyApp.SetSize ( 1280, 1024 );
IMyApp.SetFullScreen ( true );
IMyApp.Create ( );

When you need, say, an image, you will get it from the singleton <dgSDKApp>-object. (needs some kind of manager)

-example:
dgImage* p_imgTempImage = IMyApp.ImageManager.GetNew ( );
p_imgTempImage ->"DoSomething"();
IMyApp.ImageManager.Release ( p_imgTempImage );

Also, the maincamera is an embedded object of the <dgSDKApp>-class ( aswell as the fog, mouse... )
ex.: IMyApp.IMainCamera.RotateX ( 1.0f );

Also, I've implemented an attribute <b_ExitCondition>.
Now, at the end of the mainloop,
I'll check this attribute and when
its == true then I do run the cleanup function and exit.


@Hobbs: Done.


Related:
(Mr.)Beavis is creating an OO wrapper too, here is the forum post:

http://forum.thegamecreators.com/?m=forum_view&t=50917&b=22


Greetings to all DarkGame and DarkBasic coders
Smithy / DaByte

//edit
content updated
[href]www.swissquake.ch/dmspry/other/framework/dgSDK Framework CppDoc.htm[/href]

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

Login to post a reply

Server time is: 2023-02-02 14:51:24
Your offset time is: 2023-02-02 14:51:24