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 / visual c++ 6 autocompletion?

Author
Message
dogzer
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location:
Posted: 14th Nov 2005 01:16
Is there a way to have autocompletion for dark sdk with vc++ 6?
Charles
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: Phoenix, AZ USA
Posted: 19th Nov 2005 02:06
The only thing that I can think of would be to create one or more classes and place the function calls in there. I havent tried this, yet but this should work. The Dark Game SDK should be in one or more classes, anyway (Remember the ++ in C++?).
dogzer
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location:
Posted: 19th Nov 2005 03:10
I don't understand completely. How do i put the dark game sdk inside a class.
Can i put it inside a namespace too? that way instead of accessing everything from a class.. i can use "using namespace " and forget about it, and still get autocompletion
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 20th Nov 2005 14:02 Edited at: 20th Nov 2005 14:02
Quote: "I don't understand completely. How do i put the dark game sdk inside a class."

Do you mean something like :



Namespace could then be done like :

use namespace Test;

dogzer
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location:
Posted: 21st Nov 2005 20:21
Sarcasm: is there a way to include all the sdk inside a class?

Man, if we have autocompletion for all dark sdk it would make everything so much better hehe
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 21st Nov 2005 20:56
Quote: "Sarcasm: is there a way to include all the sdk inside a class? "

Not unless you want to do all the typing yourself...

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Nov 2005 14:18
I produced a header file a while back that put all of the DarkSDK functions into a DGSDK namespace ... it was sometime near the backend of June.

I still have the code that generated it, so I could update it for 1.1.1Beta if you need it.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 22nd Nov 2005 17:33 Edited at: 22nd Nov 2005 17:54
dogzer... i think that you are looking at this the wrong way... your question and idea about making the dark sdk into a single class that is...

i don't think that you'd wouldn't want to, or need to encapsulate the entire functionality of the sdk into a single class... what you might consider doing is stopping and taking a look at the game you want to write... not from a programming standpoit, but from a functional standpoint...

OO programming is more a matter of creating objects that do things... these object are derived fromt eh classes you make, using the DarkSDK commands set...

for example... say i want to make a submarine game... what elements am i gonna need... well, first of all,

i am gonna need an game class... (or whatever you want to call it)...
this will provide me with the overall dark sdk functionality to create a game environment, and initiate the main loop...

this class can be used over and over again, and as it matures, can include the various intialization and system checks to make sure the user is capable of running the game you are gonna make...

once that is done, you should never have to rewrite it... you can use this game class for any game you want to make... that's one of the key advantages of OOP... code reuse...

ok, now you are ready to code the other game elements... lets see, we will need an ocean, a submarine, a player, etc...

each one of these will be different classes... each with there own functionality...

a player class will encapsulate all the funnctionality that the player needs in the game... movement, loading and displaying their avatar... reacting with other game elements...

the submarine class will encapsulate whatever a submarine in your game needs to do...

these classes will serve as the templates from which to create your game objects... once built, all you've gotta do is 'plug' em into the game framework you've built...

if this is a bit new to you, start out doing simple classes and see how the objects you instantiate from them work...

i would suggest a game class, a view class, a player class be the first things you work on... they are fundamental to almost any game, and can be reused in most games you're gonna make... once you get these up and running, then you can start work on your other classes...

hope this gets you going in the right direction...

i'm thinking of doing the same thing myself as opposed to trying to rig up a hack OO framework in DBPro... so keep this thread going and post your progress...

good luck

--Mike
MiR
21
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 22nd Nov 2005 18:07
Funny. I´ve been looking at this nice game code recently. I does exactly what you´ve said. That´s good. I can "base" my code around it.

My signature has been erased by me because it's LARGE.
Thank you for the votez!1!
dogzer
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location:
Posted: 28th Nov 2005 00:16
IAN: Hey, i'd LOVE to have your version updated to 1.1.1!! Basically i'd just have to include your header and i would get autocompletion to all darksdk functions?
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Nov 2005 14:37 Edited at: 28th Nov 2005 19:17
Well, it works in VC++7.1

The functions are all named identically, so you use a 'using namespace DGSDK;' at the top of your C++ source to allow existing code to compile, and for new stuff, DGSDK:: and autocompletion should start.

I'll rebuild the include file tonight and post it, then you can try it for yourself.

[edit] Attached

For free Plug-ins and source code http://www.matrix1.demon.co.uk

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-19 02:33:57
Your offset time is: 2024-11-19 02:33:57