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 / Another newbie collision question

Author
Message
Social Disease
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 14th Apr 2004 08:28
I want to do Sliding collision. That is, I want one object to strike another, and then slide off, rather than just stopping. I've done a search and everything points to Nuclear Glory's Collision dll.
The two hitches I have here:
1. I am broke. Broke broke broke. I am so broke I cannot pay $15 and still have money for rent. That is how broke I am. Did I mention broke?
2. I have no idea how to use a dll in my program.

Now, before my thread gets hijacked, the second hitch is easily fixable, I can learn. What I want to know is; how do I do good collision for free?

Please.

Think Gad fro Spill Chock!
Dr Crazy
20
Years of Service
User Offline
Joined: 13th Apr 2004
Location:
Posted: 14th Apr 2004 13:12
I think I can help you on that one.
1. Are you using DarkBASIC or DarkBASIC PRO?
2. What type of game are you making.

Who dares; wins.
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 14th Apr 2004 14:58 Edited at: 14th Apr 2004 14:58
you could get an earlier version of ng's .dll, i think it supported sliding collision aswell.
and its free

In the beginning, the universe was created...
This made alot of people very angry and it has been widely regarded as a bad idea...
Visit http://redeye.dbspot.com
Social Disease
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 14th Apr 2004 20:51
I'm using DBpro. I'm working aon a couple of projects, a 3D asteroids, a 3D dungeon crawl, a FPS.

Think Gad fro Spill Chock!
Social Disease
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 16th Apr 2004 01:56
Red_Eye, where do I get an earlier version? I looked at his web site but didn't see it.

I think I can figure it out on my own with some help. Can any body give me an idea how to point the camera along a surface that I just ran into? I vaguely recall a formula from my highschool math days, but can't think of what its called or what it is. Any help on this topic would be appreciated! Thank you!

Think Gad fro Spill Chock!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Apr 2004 02:53 Edited at: 16th Apr 2004 02:53
You can get version 2.00 of the DLL here...

http://www.nuclearglory.com/download.php

You don't actually have to know anything about DLLs. It comes with an include file, you put this and the DLL in your program directory, and use the functions provided.

BatVink
http://facepaint.me.uk/catalog/default.php
AMD 3000+ Barton, 512K Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Social Disease
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 16th Apr 2004 04:57
Yay! Found an answer thanx to RPGamer! I looked up collision on the code snippets board, and found this post:
http://darkbasicpro.thegamecreators.com/?m=forum_view&t=10510&b=6
SO if this helps anyone else, great!

Think Gad fro Spill Chock!
Social Disease
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 16th Apr 2004 21:15
Quote: "Function SlideColl(pn#) : Rem pn# is PLAYER NUMBER
obx#= Object position x(pn#) : Rem Get the objects X position
oby#= Object position y(pn#) : Rem Get the objects Y position
obz#= Object position z(pn#) : Rem Get the objects Z position
If object collision(pn#,0)>0 : Rem here you may put NOT any objects you dont want collision with
dec obx#,get object collision x()
dec oby#,get object collision y()
dec obz#,get object collision z()
position object pn#,obx#,oby#,obz#
endif
endfunction
"

This is a quote from RPGamer's thread above. I'm having trouble with it since I set up a sky sphere, and I can't figure out how to not have collision with it, can anyone help? My skyshpere is object 2. thank you!

Think Gad fro Spill Chock!
Social Disease
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 20th Apr 2004 05:59
Perhaps RPGamer would care to help me with his Sub? What do mean by:
Quote: "Rem here you may put NOT any objects you dont want collision with"
I've never used NOT before, and I'm having problems getting it to work.

Think Gad fro Spill Chock!
Black Hydra II
20
Years of Service
User Offline
Joined: 26th Nov 2003
Location:
Posted: 20th Apr 2004 06:33
put AND then a <> statement instead of an =.

"Damn had to remake account!" direct quotation from previous account.
Night Giant
21
Years of Service
User Offline
Joined: 26th Jul 2003
Location:
Posted: 20th Apr 2004 06:34 Edited at: 20th Apr 2004 06:35
you would just exclude object 2 using the AND operator and the "not equals" comparer. like so:

Quote: "
If object collision(pn#,0)>0 AND object collision(pn#,2)<>2
"


the "<>" means "does not equal". that should work.

edit: oops, black hydra got to it before me, lol.

oh, wow. insignificantpunks.cjb.net. we like orange treble clef notes, just for future reference.

no: website for progs yet.

Login to post a reply

Server time is: 2024-09-22 06:27:30
Your offset time is: 2024-09-22 06:27:30