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 / Sparky's Collision DarkGDK

Author
Message
Lord Herakles the Great
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 4th May 2011 08:29
I am trying to install the Sparky's Collision plugin for DarkGDK. http://forum.thegamecreators.com/?m=forum_view&t=74762&b=5

I added
to the top of my game's code and tried to compile. I got this error message:



This is the first time I have ever installed a new plugin for DarkGDK, so this issue is probably due to something I neglected to do/didn't know to do when I installed the plugin. I need help please.

Hail to the king baby
I love Evil Dead.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 4th May 2011 16:29
You have a few options, the easiest is probably to place the lib in the same directory as the GDK libs.

On my machine they are located here:
C:\Program Files\The Game Creators\Dark GDK\Lib\VS9

WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 4th May 2011 21:32
I've had to re-install twice over the last few months and have just copied the lib into the GDK libs folder and the header into the GDK headers folder...

Warning! May contain Nuts!
Lord Herakles the Great
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 5th May 2011 09:07
Well I copied the lib file to where the rest of the DarkGDK lib files are and I no longer get the error in my code. However when I try to run one of the example programs for the plugin (in order to learn how to use it) I get this gibberish of an error message spat in my face:



Hail to the king baby
I love Evil Dead.
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 5th May 2011 15:20
You'll need to bring up the Project properties:

Configuration properties / C/C++ / Code Generation

and set the Runtime Library to /MT (not /MTd)

Warning! May contain Nuts!
Lord Herakles the Great
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 6th May 2011 08:27
Hmm... Doing that didn't seem to have any effect for me. How can I learn how to use the plugin without the example programs? I would hate to be stuck with DarkGDK's built in collision detection.

Hail to the king baby
I love Evil Dead.
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 6th May 2011 13:48 Edited at: 6th May 2011 13:50
What errors are you getting now? Some would ask you to try Release mode.

I've never used the built in collision system so I don't even know what it is like?

There are plenty of other examples using Sparky's, even I've done some. It is a very fast and easy to use collision system.

Warning! May contain Nuts!
Lord Herakles the Great
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 7th May 2011 03:35
Quote: "What errors are you getting now? Some would ask you to try Release mode."


It's the same errors. What is Release mode?

Quote: "I've never used the built in collision system so I don't even know what it is like?"


The game I'm working on right now is the first full game I've ever made in DarkGDK, so I've never actually used the built in collision system. But if it's anything like the built in collision system in Dark Basic Pro, which I actually have used, it's very limited in what you can do with it.

Quote: "There are plenty of other examples using Sparky's, even I've done some. It is a very fast and easy to use collision system."


I didn't realize so many other people used it. I guess I'll search around for more examples.

Hail to the king baby
I love Evil Dead.
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 7th May 2011 14:37
Apart from the speed difference that everyone says Sparkys is much faster (I like the speed). You can put objects into groups, all level objects into one group, bullets into another, etc. This is very useful for checking your players collision with anything in the level if it's made up of multiple objects.

If the compiler is not loading the collision 'lib' then check its in a folder where other libs are being used.

Warning! May contain Nuts!
Lord Herakles the Great
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 10th May 2011 10:05
Well no matter what I do I just can't get the example programs to work. And I haven't been able to find any other examples by searching. So I decided to try to learn how to use the plugin just from the help file. I am trying to implement it in my game, but I am getting a run time error.

The relevant section of code:


The entire code incase the section I think is relevant actually isn't the real problem:


The error is in the attached image.

Hail to the king baby
I love Evil Dead.

Attachments

Login to view attachments
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 10th May 2011 20:09
It seems you are loading/creating an object with an ID of 0. GDK hasn't reported this but the collision code has. You will need to init ObjID to 1 at the start.

Warning! May contain Nuts!
Lord Herakles the Great
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 11th May 2011 07:09
Thanks! That fixed it. I didn't even know that was a problem. It worked fine before I added the collision code.

Hail to the king baby
I love Evil Dead.

Login to post a reply

Server time is: 2024-10-02 17:34:35
Your offset time is: 2024-10-02 17:34:35