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 / Interesting find in DBC

Author
Message
JohnFP
21
Years of Service
User Offline
Joined: 5th Feb 2004
Location: Maryland
Posted: 13th Apr 2004 17:04
I made a maze with walls. Most of the walls are created with the line

make object box 1,200,200,10 : position object 3,0,100,-100 : color object 3,rgb(155,40,20)

then I make them static with collision box by

for t=1 to 19
make static object t
objx#=object position x(t)
objy#=object position y(t)
objz#=object position z(t)
objsx#=object size x(t)/2.0
objsy#=object size y(t)/2.0
objsz#=object size z(t)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#
delete object t
next t

Now if I do not use the static/collision routine for a wall it is visually there but the player can pass through the wall. This is good for secret passages that are hidden behind "ghost" walls. I also have gravity set and the player can jump.

Here is the find. If the player repeatidly jumps or holds down the jump key while the player is half way through the "ghost" wall he will rise all the way to the top of the wall.

Anyone else see this?
Night Giant
21
Years of Service
User Offline
Joined: 26th Jul 2003
Location:
Posted: 13th Apr 2004 18:23
that doesn't make much sense, as if the collision is off the geometry of the level won't affect anything like that. are you sure it's only when he is half-way through a wall?

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

no: website for progs yet.
JohnFP
21
Years of Service
User Offline
Joined: 5th Feb 2004
Location: Maryland
Posted: 13th Apr 2004 21:04
See the modified DARK BASIC EXAMPLE PROGRAM 25 included. Run it and hold the space bar down or hit the space bar multiple time when you are half way though the white wall just to the left of the player. If you do the same thing while constantly touching one of the perimeter wall, this does not happen.

Login to post a reply

Server time is: 2025-05-30 12:09:29
Your offset time is: 2025-05-30 12:09:29