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.

DarkBASIC Discussion / terrain collision help(dbc)

Author
Message
Satchmo
19
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 22nd Mar 2007 01:59 Edited at: 22nd Mar 2007 02:00
I use dbc
Hello, i made a .x model of a test level just something simple to test out my game

But when I move my object onto the terrain it stops and wont move.Even if the terrain is low down it still stops.
I use the set object collision to polygons then if object collision
command but it will not work. Im not sure if i can get the get ground height command to work or not so I came here for some advice.
If someone could help i would be grateful.Thnx.

Your signature has been erased by a mod because it's larger than 600x120
zeddex2
18
Years of Service
User Offline
Joined: 4th Mar 2007
Location:
Posted: 22nd Mar 2007 04:35
can you post your mouvement code

If you can, I can!
Robert The Robot
18
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 22nd Mar 2007 14:31
It's difficult to say, without any source code to look at, but there are a couple of things you might be doing wrong. Firstly, you may need to set object collision to polygons for the level as well as the player object (not sure if this is really necessary, but it helped when I tried something like this).

Secondly, is your player's y# zero? If so, then it will register as a collision with the level and so the 'if object collision' statement you mentioned will reset the players x#, z# and y#.

Try making your player walk in the air, so it can't possibly be in contact with the ground. If that works, then change the players lowest possible y# to 0.1 (This could get rid of the problem, and still gave the illusion of walking on the ground.)

By the by, the Get Ground Height command will only work with a matrix.

Hope this helps, and remember - code always helps!

On our way 'ome, on our way 'ome...
Satchmo
19
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 22nd Mar 2007 16:49 Edited at: 22nd Mar 2007 16:49
Ok but the problem with that is that I also need hills so you can walk up hills so I will give some source later but I right now so I will do it later.

Your signature has been erased by a mod because it's larger than 600x120
Robert The Robot
18
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 22nd Mar 2007 17:24
You might want to try a using a matrix as the basis for your level. With that you could use the Get Ground Height command, and if you ringed the matrix with boundary objects you could test them for object collision.

(Personally, I've never been able to figure out how to negotiate hills using a .X file, but I'm sure it can be done)

Something like MagicWorld might be good...

On our way 'ome, on our way 'ome...
zeddex2
18
Years of Service
User Offline
Joined: 4th Mar 2007
Location:
Posted: 23rd Mar 2007 04:53
post code but that a simple code to help you



BTW that with sparky.DLL and i'm not sure you can load dll with DBC but try to figure how this code work and make this code with DBC collision

If you can, I can!
Satchmo
19
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 25th Mar 2007 06:50
HEy again. The game im making is an fps, does that change anything?

Your signature has been erased by a mod because it's larger than 600x120
Satchmo
19
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 25th Mar 2007 19:05 Edited at: 25th Mar 2007 22:14
(removed)

Your signature has been erased by a mod because it's larger than 600x120
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 25th Mar 2007 21:45
umm why would we answer you when people just gave you help and advice and you just ignored it so we'll just ignore you???

Satchmo
19
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 25th Mar 2007 22:17 Edited at: 25th Mar 2007 22:18
sorry kieran but Iwasnt ignoring anybody.Its just that I didnt want to use a matrix beacause there long and tiresome to make and they take up a lot of fps plus they dont look good.I cant use a dll because I have dbc. Please dont jump to conclusions.

Your signature has been erased by a mod because it's larger than 600x120
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 25th Mar 2007 23:00 Edited at: 25th Mar 2007 23:01
Try intersect object
zip with code and media attached

oopps...Never mind .. just noticed it's DBC

Attachments

Login to view attachments
Satchmo
19
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 2nd Apr 2007 03:28
Sry for bumping this but I really need some help on this and I know its possible without a dll, but I just need to know how to go about coding it. Im not asking for source code just some advice on how to do it, and please if you do post source I dont want just copy paste ,I want to know how it works. Sorry if this is just wasting your time to reply but im stumped and I cant figure this out.

-DBCLASSIC

Your signature has been erased by a mod because it's larger than 600x120
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 2nd Apr 2007 05:50
Quote: "I cant use a dll because I have dbc"


You don't have the Enhancement Pack for DBC then? The vanilla version of DBC doesn't support using DLL's, but the EP version does.

I though that versions of DBC sold recently included the EP. Some users don't realise that they have the enhancements installed though, so I thought I'd ask...

TDK_Man

Satchmo
19
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 2nd Apr 2007 18:56
The new versions of dbc come with a trail, not the whole thing.

Your signature has been erased by a mod because it's larger than 600x120

Login to post a reply

Server time is: 2025-05-27 20:39:13
Your offset time is: 2025-05-27 20:39:13