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.

Newcomers DBPro Corner / help with sparkys collision dll

Author
Message
dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 16th Dec 2006 16:29
hi,i am srtugling to get any further on my game beacouse i cant get the colliion to work, to start you off this is what i have done


SC_setObjectCollisionOn 1
SC_setObjectCollisionOn 2
SC_setupObject 1,0,1
SC_setupObject 2,0,1

which i think turns collision on and then i have set up collision type. then in my main loop i have put

sc_UpdateObject 1
sc_UpdateObject 2

does any one no what my problem is.

p.s: object 1 is my player and object 2 is my world

thanks!
DD

Your signature has been erased by a mod because it's larger than 600x120
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 16th Dec 2006 16:47
The 'sc_updateobject' command doesn't automatically run collision it just means that if the object has moved, scaled, rotated etc. then the collision mesh updates. You have to make your own collision system using the commands. Read through the example programs that came with it and if you are genuinely still stuck then then I will give you a hand.

dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 16th Dec 2006 16:55
how would i go aabout building a collision system, would i like store the object's position

Your signature has been erased by a mod because it's larger than 600x120
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 16th Dec 2006 19:06
The lazyness of some people astounds me.

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 16th Dec 2006 19:07
It's easy. Just store youe object's X/Y/Z positions before it moves in a variable, then store its position after it moves in different variables. Then, have a look at the SC_SphereSlide command.

dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 16th Dec 2006 19:17
im gonna probally buy ngc for my game it looks easyer and faster

Your signature has been erased by a mod because it's larger than 600x120
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 16th Dec 2006 19:50
Honestly, if you put a fraction of the effort into searching for the answer than you put into asking the questions, you woulld have sliding collision already implemented. Theres this thing called the search button at the bottom of every page of this forum, if you typed in "sliding collision" you wouldve found tonnes of threads covering it in detail, not only that but the examples that come with show how to get sliding collision, and furthermore, I made a thread myself with a sliding collision command that uses sparky's dll, all it requires you to do is setup your objects, and call the function in the main loop.

Really, go right ahead and waste your money, just note that anything that involves programming requires SOME effort to actually learn how to use it, including NGC.

dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 16th Dec 2006 20:23
Quote: "The lazyness of some people astounds me."

i do not appreciate how rude that was, also you tell me to search for sliding collision, heres sumit what about if i dont want sliding collision, i whant normal collision so when you hit an object you stop. I have decided to buy ngc instead.

Your signature has been erased by a mod because it's larger than 600x120
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 16th Dec 2006 23:17
Beware... I found it harder to understand NGC at first >.>... It can be more of a hastle, but it's your choice.

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 17th Dec 2006 02:35 Edited at: 17th Dec 2006 02:38
I find it rude to assume the other developers on this site can be used as a tool, where you just ask for something and immediately expect it to be laid out infront of you with no learning curve.

I cant express with words, how simple it is to implement collision. You dont want sliding collision? Here:



Take away the variable definition and all the cosmetics from that program, and the collision code is only 3 lines. Dont like ray casting?



The problem here, is that you're expecting programming to be point and click. If thats what you want, get the 3D Game Maker or FPSC. If, however, you'd like to actually program, you need to use a thing called code. Whether you waste a bunch of money on NGC (which has been proven to be just as fast/efficient as sparky's dll), or decide to do the smart thing and use the excellent free plugin, you're still going to have to learn the syntax of the commands.

To sum up;

Option A) Buy NGC, and then get frustrated and make a post asking how to achieve collision with it.

Option B) Stop programming, switch to something like The 3D Game Creator/Maker.

Option C) Take the hour or so that every programmer does to look into learning how to use the extremely well documented commands that come with the free plugin Sparky's Collision dll.

Option D) If all you want is sticking collision (which Im almost sure you posted just to try to make me seem wrong in saying sliding collision, as sticking collision usually makes games horrible), do a search on the forums, there are literally hundreds of threads.

And finally, Id like to point out once again (since I can pretty much guarantee you didnt do a search yet), the thread I made has mini-tutorials on getting sliding and bouncing polygonal collision detection working with sparky's collision dll. NBot to mention Kensupens code snippet, G-Man and Lost in Thought's code snippet, and a few other people whom I forget the name's of's code snippets, all cover getting sliding collision working without any plugins at all, just using DBP native commands.

But sure, please, waste your money. Its the smart thing to do.
- RUC'

Cave Man
18
Years of Service
User Offline
Joined: 22nd Aug 2006
Location: North Carolina, US
Posted: 17th Dec 2006 02:41
To dark donkey:
spellcheck.net

Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 17th Dec 2006 18:21
I agree with 60 squares its quite a hassle and i always have to have the doc open to see how to do something... now its takes twice as long coz i broke my collerbone playing rugby

Login to post a reply

Server time is: 2024-11-26 05:56:45
Your offset time is: 2024-11-26 05:56:45