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 / Noob Collision Problem

Author
Message
Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 23rd Dec 2007 18:25
Im sorry to be posting something that seems so dedundant on this forum, but I could not find the answer to my problem and this is my last resort.
Im new to GDK, but im not so new to DBP. I started with DBP about 4 years ago, and stopped after about 6 months due to just being busy, but now I see it has gone to the VC++ platform, so I want to give it another wing.

Heres my problem.
Im working with a tutorial that came with GDK (trying to get my feet wet) (the game level tutorials) and its working fine thus far. I have played with a few things, and i have tried to get the camera to strafe, but I completely overlooked the fact that the camera rotates and its not always the Z your moving, so that didnt work. So, I moved on and figured I would cover that topic later. Now, im trying to work with collision. Im new, so im not goign to go through the trouble of programming my own collision, as I would just be in over my head, so I downloaded Sparkys Collision. Now my problem is, what do I do now. I try to debug his projects, but it just gives me error SC_Header.h file not in directory errors? Is there a certain way that I have to plug in the plug in? Im new to C++ as well. Thanks for reading my overly long post

typos...
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 23rd Dec 2007 20:18
You do realize DB Pro itself is still available, just in case you were wondering. Also there is a DGDK version (aside from the C++ version) for .NET (DGDK.NET for VB.NET and C#). I'm mentioning this because if your new to C++ you may find it easier to deal with oop programming in a friendlier syntax than c++. I'd recommend vb.net, but thats just me

The DGDK.NET for VS 2008 (free) will be out in January from what I hear. The sold version of DGDK.NET was already available and being used by many here, but was taken down recently, to be re-released in january.

just throwing the info out there in case you, or anyone else reading this, is interested.

My DBP plugins page is now hosted [href]here[/href]
Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 23rd Dec 2007 23:10
Ok, that was a little over my head. Your saying the Visual C++ .Net would be easier? Im confused, I thought that Visual C++ 2008 express edition was a .net enviroment, I could be wrong. Neways, this is what I have figured out. I put the header of the SC_Collision.h file into the includes folder, and that fixed that error, and I put the SC_Collision library into the lib folder. But now im having the problem that I cannot call the functions of the SC library.

Second note
Is there a way to plug in VB.Net into GDK? If so that would be awesome cause I have experience with VB.NET

Now, how do I get this collision thing to work? Can someone please explain

typos...
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 23rd Dec 2007 23:42
4 Ways Bro.

1: Dark Basic Classic
2: Dark Basic Professional
3: DarkGDK (Is C++, free if not selling your game)
4: DarkGDK.Net (Is .Net so you can code: C#, VB.NET, and perhaps others I don't care about)

The DarkGDK.Net - is not available at this time. So wait until January if you want that.

Happy Holidays

Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 24th Dec 2007 03:42
Ok, I understand about the other versions of Darkbasic language. I've known about DBP and DBC for many years, and I would rather code in C++. My problem isnt that I dont know the syntax for C++, its that I can not get the collision library to read right. It sees that the SC_Collision.h header is in the proper directory, but why can I not harness its commands? I've seen this library reffered to other people, and im just wondering if those other people can tell me how they got it to work.

typos...
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Dec 2007 04:04
Ok - I got a post from ya - its not showing here yet - perhaps you're new to forum - anyway - (people reading...Comp Guru 910 is more concerned with the Sparky Header Being Ok - but commands aren't avail etc.)

Ok Comp Guru 910,

I'm still struggling with ins and outs of C++ Compiler settings for microsoft etc.. but - There in the Project "folder" a right click let's you change properties. In C++, General - you can add a directory for Header files. I presume this is what you did. But then the linker complains anyway?

Sometimes this happens to me when I forget to put an include in my source file. Other times I pull my hair out... and eventually cheat.

In other words - I don't have a specific for you but try putting the Sparky Header file in your poject directory along side your source code... and put the DLL in there also - and MAYBE into the DEBUG directory as a grasp for straws.

(I haven't got it working in DarkGDK YET..and I stress YET. Maybe I'm silly - but I've seen Sparky's code run reliably enough in Dark Basic - that when I heard of the DarkGDK version of the DLL etc... I grabbed and stored for later - knowing full well I have other fish to fry before that - and I am very confident it'll work!)

Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 24th Dec 2007 05:17
Jason, I am extremely grateful for your comment, and its been helpful. My only misunderstanding is that I do not know what you are talking about with the properties folder. I right clicked on my project, and went to properties, but I do not see anywhere in there where I can attatch this library or the header. I may be just really dense and its flying right over my head, but I honestly cannot see it. Here is what I have done

Downloaded the SC_Collision zip
Extracted
Got the SC_Collision.h file from the includes folder and put into D:\Program Files\The Game Creators\ GDK \ Includes Then
Got the SC_COllision.lib file form the lib folder and put into
D:\Program Files\The Game Creators\ GDK \ lib I also
Put them into the VS9\VC lib and includes folders and still no luck.

If you could give me a little insight on what you do to attach librarys I would be extremely appreciative. Thank you

typos...
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 24th Dec 2007 12:43
Quote: "I thought that Visual C++ 2008 express edition was a .net enviroment"

It may well be managed C++, or just C++, or both, I dont know since I dont have the vs 2008 edition you do, but what I meant was: any c++ in comparison to C# or VB.NET.

Quote: "Is there a way to plug in VB.Net into GDK? If so that would be awesome cause I have experience with VB.NET"

yes, this is what I mean. There is a dgdk version for VB.NET and C# being rereleased in January.

Also Sparky's is being ported to work with dgdk.net but I am not sure when that would be available.

My DBP plugins page is now hosted [href]here[/href]
Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 24th Dec 2007 14:15
I really just want to know how to get collision (even basic built in collision) to work on my map. Im using the Game level tutorial, and I have put a sphere in and the camera is in 3rd person perspective. I tried dbSetObjectCollisionOn but that didnt work. Im really confused. I also tried the bsp but im guessing that only works with bsp levels.

typos...
Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 24th Dec 2007 14:26
Ok, so far I have tried all of these commands and have still not gotten any collision (from what I can tell, the computer may see that they are colliding, but its not stopping my sphere

dbSetObjectCollisionOn ();
dbSetObjectCollisionToBoxes ();
dbSetObjectCollisionToSpheres ();
dbSetGlobalCollision ();

At this point im extremely confused. Im working off of a dbc tutorial, converting it as I go for VC++ and its not working for the collision

typos...
Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 24th Dec 2007 16:46
Ok, I just played with enough commands now to get it working. Thanks guys for the help. I would really like to know though how to use sparkys collision because obviously the darkbasic collision does not know how to handle sliding at all, and I could really use it.
Do I have to make a db call to load the library? Since I cannot get the library for C++ to work, could I load the dll for sparks from dbpro and make it work that way? If I could do that, how would I make the calls, would it be dbSC_SetCollisionOn? I could live with that

typos...
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Dec 2007 17:13
Ok - It's my understanding that most "Plugins" Are written a certain way for DB to use them. Yet - I also know you can load Microsoft DLL's like WinSock and User32 etc. So - DBPro is fairly flexible.

I believe Sparky's DB Plugin though is of the variety that is designed to become part of the "DBPro Language" (true plug in) and as such is kind of "Custom". Correct me if I'm wrongs guys.

To Make Sparky's DLL work for DarkGDK C++ - Sparky compiled as a regular DLL. so you need to get that one working.

I understand you not finding the propties... Basically - I don't have the VS2008 memorized - but there are settings at the project level that you add additional "Include" paths. The same is true for LIB's but I found that more tricky.

I would copy the DarkGDK sparky header file to your project directory where your other code is... and put the dlls and files in there also - and even in the "debug" directory one more level down - as a critical last ditch effort.

Trying to get VS2008 to go where you want for libraries - can be tricky and hard to track - especially if you have multiple projects in one solution. (Note for this - for each project - I select "Add Existing" to pull the source code into the project if it uses it... that way it makes the libs for those files alongside my source files that really ARE part of said project - this seems to make my linking woas leave me. I could just be daft - but sometimes - I just want it to work and I don't care how. I know so many computer details - blah blah - I get sick of trying to master yet another tool I already mastered because they have a new version - JUST COMPILE AND LINK for HEAVENS SAKE!

haha... Yeah - its frustrating at times for me too - very - but I - stick it out bro!

Forget these for MAJOR collision stuff - Concentrate on Sparky's - that is my suggestion.
Quote: "dbSetObjectCollisionOn ();
dbSetObjectCollisionToBoxes ();
dbSetObjectCollisionToSpheres ();
dbSetGlobalCollision ();"


CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 24th Dec 2007 19:18
I thought Sparky had a dll compiled for use in c++, separate from the dbp version? If thats the case, use the dll in your projects, instead of bringing forward (adding) the same source (which would be the dll anyway) in each project, at least thats how I would do it. Unless of course you are modifying aspects of the sparky source for different projects - then all bets are off

My DBP plugins page is now hosted [href]here[/href]
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Dec 2007 19:38
Agreed. I hope he knows I meant whatever header file or whatever was needed ... besides I don't think sparky released the ACTUAL core source code anyway. who knows. But yes... just the header and the DLL.

Thanx Cattle Rustler for clarifying... Besides this... Happy Holidays!

Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 24th Dec 2007 20:16
I dont have a dll. I have a header file, and .lib file. Are you reffering to the .lib file when you say DLL.

I dont know if this is the case, but has anyone been able to get Sparkys to work with Visual C++ 2008 EE? Sparkys collision was made in VS8, not 9. Even when I try to debug his stuff, I get errors.
Jason, could you look at the files you got from sparkys collision and see if you have the following
SC_Collision.h
SC_Collision.lib

Thats all the library and header files I have. If there are other dlls, I did not get them

typos...
dbGamerX
16
Years of Service
User Offline
Joined: 23rd Nov 2007
Location:
Posted: 24th Dec 2007 20:43 Edited at: 24th Dec 2007 21:41
Sparky's Collision DLL for DGDK
http://forum.thegamecreators.com/?m=forum_view&t=100377&b=22

dbPrint ( "Sig" );
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Dec 2007 21:28 Edited at: 24th Dec 2007 21:44
Thanx dbGamerX - Ok - I didn't have it - and thanx to you I found it quickly!

Ok - I JUST Downloaded sparky GDK DLL 2.03. I Un-rar'd it. I navigated to the folder with samples and I clicked on the *.sln (solution) file. I have Vs2005 and Vs2008. The samples were made with Vs2005 so Vs2005 opened up.

I Right Click SimpleDemo Project, click Properties, Navigate to "Configuration Properties->C/C++->General".

I Click the "Additional Include Directories", and add a new entry - by navigating to the DIR with Sparky's header file *.h . In My Case: D:filesarchivescodingrelated3DDevDarkGDKCollisions_v2.03gdkcollisionplugin_2.03include

Then - It complains about the *.lib file while linking. <grrrrr>

So I now Right Click SimpleDemo Project, click Properties, Navigate to "Configuration Properties->Linker->Input".

I click the "Additional Dependancies" area - and I get a messed up - hardly useful diaglog saying something about inherited properties... but it has some clues... in little frame near the bottom - I see things like kernal.lib, and other *.lib files. COOL! Must be in the right Spot! I move my cursor to the top white editable area - and realize - there isn't a browser...hmm... that would have been nice - so I manage to cut and paste the full path and file name of sparky's *.LIB file. In My Case:

D:filesarchivescodingrelated3DDevDarkGDKCollisions_v2.03gdkcollisionplugin_2.03libVS8sc_collision.lib

I Then RIGHT Close all this gibberish, right click the "SimpleDemo" project yet again, and Select: Debug->New Instance. Some Dialog comes up (Because we don't have sparky's source files) and says "I can't debug Sparky's! You want to continue Debuggin?" I'm buggin' by now anyway - so I figure what the heck... and I click YES.

Now My mouse is acting hosed, I see the VS2005 Editor... But Wait - there is a new task showing up in my task bar... (The Debug Warning must of sent it to the "back") I ALT+TAB to it - and Low and Behold - A running Demo! So I click the mouse a few times - watch it run... then I come here and tell YOU about it

I would do the same steps (generally - the editors aren't all that different) with VS2008. If you have both Compilers vs2005 and vs2008, I recommend opening vs2008, and using it's file->Open Project mechanism - as double clicking the *.sln file will likely start vs2005. You might not want this... or you might. But if you do want vs2008 - the first thing it will do is bring up a vs2005 to vs2008 conversion wizard which wants to try to make the project/solution compatible with 2008.

Go for it. If it doesn't work - after doing the steps I outlined for vs2005 - Post about it - and Maybe dbGamerX can take it from there

(I got to get my LOD terrain foundation put down before holiday dinners etc... yuck)

[edit](I'll try it in vs2008...hang on ...)[/edit]

[edit]Yup - Works the same way in vs2008[/edit]

Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 24th Dec 2007 22:07
OK, i have figured out what needs to be done to attatch the library.

1: Install the library and headers to these directorys (default directorys)
C:\Program Files\The Game Creaters\GDK\includes (SC_Collision.h goes here) And
C:\Program Files\The Game Creaters\GDK\lib(SC_Collision.lib goes here) (you will find these files in the download of Sparkys Collision in folders include and lib

Then, open a protect
Right after you open a new project, under where it says include DarkGDK.h type this

#include "SC_Collision.h"

Then, right click on your project in the Solutions Windows (left hand side) and go to properties

ON the left hand side, expand Configuration Properties.
Within that, you will find Linkers, expand that.

Once inside there, select input.
Then to the right, it will say Additional Dependencies. Select that field and click on the browse icon that comes up to the right. Once in there, type SC_Collision.lib

Click ok,
then click Apply, then ok

This is how you include sparkys. Now, the next problem.
I keep typing Void SC_Start ( void ) { and of course the bracket at end, and im getting this error. SC_Start now local definitions can be called. I will work that out, but thats what I have so far.

typos...
Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 24th Dec 2007 22:20
LOL, Jason I think that we figured it out at the same time. I posted what I figured out, and your showed up, lol. Oh well, you guys are great for pointing me in the right direction. im going to calm my brain now and take a break. My previous post said I had an error which I managed to fix

instead of void SC_Start ( void ) { (which is what VC++ told me to do) use this to start allowing codes from the library

SC_Start(); thats it, go figure.

Neways, im working on a site thats nothing but GDK since I havent found one yet, so if anyone has any tutorials, let me know, and when im done, i'll post

typos...
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 25th Dec 2007 02:38 Edited at: 25th Dec 2007 04:26
I got it to work with VS2008. Make sure you always compile as "Release"

I was just able to create a "Level" in Maya and convert it to DirectX and use that file in the "SlidingDemo" with no problems. Works perfectly!!!

Your mod has been erased by a signature
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 26th Dec 2007 00:31
I just figured out how to open up the source for the sliding demo (lol, some things just fly over my head some times, I was looking at something completely different last time) and Im now messing with that to see an example of how to make this work better. Thanks guys for everyting.

typos...
Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 26th Dec 2007 00:33
Just out of curiosity, if anyone could explain this to me.

Inside of that demo, it keeps calling

void something something ( )

What does that do?

typos...
Mr G
16
Years of Service
User Offline
Joined: 13th Jan 2008
Location:
Posted: 15th Jan 2008 00:16
That is just awsome

Iemand dood maken met een blije mus.
moowiz
16
Years of Service
User Offline
Joined: 10th Feb 2008
Location:
Posted: 10th Feb 2008 22:45
Comp Guru, could you give an example of what void something something() is?

Login to post a reply

Server time is: 2024-11-17 00:05:39
Your offset time is: 2024-11-17 00:05:39