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 / DBO Collision with Sparky's Lib

Author
Message
blah569
18
Years of Service
User Offline
Joined: 10th Aug 2006
Location: Austin, TX
Posted: 8th Apr 2009 05:08
I'm trying to do Collision detection on a DBO world with Sparky's collision lib. I have everything setup for it. I searched the forums for similar inquiries, however, I do not find any examples of how to actually do it. Can anyone please provide some examples to setting up the detection? Thanks!

PHP, C++, and DarkBasic Pro addict.
ThatOther Person
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location:
Posted: 8th Apr 2009 15:40
place SC_Collision.h in C:\Program Files\The Game Creators\Dark GDK\Include

SC_Collision.lib in C:\Program Files\The Game Creators\Dark GDK\Lib\vs9

put #include "SC_Collision.h" near the begining of your apps source file right after #include "DarkGDK.h" and then put SC_Start( ); later on before you actually try doing anything related to it

then check out the help file that came with sparkys library for a complete list of command including the ones needed to setup an object for use, update its position to match where it actually it, and check if its colliding with other objects.
ABXG
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Canada
Posted: 8th Apr 2009 15:43
Take a look at the "Sliding Collision" demo that came with Sparkys. The code will work with any object or terrain, I currently have some code very similar to what Sparky's has set up to detect collision with a height map based terrain.

------------------------------------
Currently developing an "over-the-shoulder", action based, RPG with combat based on rag-doll physics.
CheatCat
17
Years of Service
User Offline
Joined: 7th Mar 2007
Location: Sweden
Posted: 9th Apr 2009 12:01 Edited at: 9th Apr 2009 12:24
If you have the newest version of Sparkys, the collision with dbo object may not work if you resize it in game.

EDIT: That bug is fixed in the version 2.05b!

Login to post a reply

Server time is: 2024-09-30 23:16:45
Your offset time is: 2024-09-30 23:16:45