3DMaze glitch

Previous topic - Next topic

shinydarkrai94

   Hello, I am new to the forums and GLBasic, but it looks great so far :). Since I am new, I apologize if I am not supposed to post glitches with sample programs, but I thought you may want to know anyway.
   I was just testing out the 3DMaze sample program that comes with GLBasic and I managed to go through the wall. It was on the west wall of the maze and I was moving against the wall. After I went through, I could not get back into the maze. I have included a picture to demonstrate this.


MrTAToad

#2
Your FPS is over 200, whilst mine in around 70, so its possible that the program was moving faster than the radius of the collision check.

shinydarkrai94

Ah, nvm them :P.

Kuron

Quote from: MrTAToad on 2010-Oct-08
Your FPS is over 200, whilst mine in around 70, so its possible that the program was moving faster than the radius of the collision check.
Collision should work properly regardless of the FPS ;)

MrTAToad

#5
Dont forget it just uses a given radius - move too far and you wont get a collision.

In order to sort it you would need a ray collision system to detect anything between where you current are and where you will be.

But as its only a demo program, I dont think its worth implementing.

Another way of solving it would be to limit the movement size.

matchy

I found when passing collision points that modifying the the step dtime mutliplier has effects of certain devices and it'd documented.  :rtfm:
Code (glbasic) Select

.
.
.
dtime = GETTIMER()
// limit on slow machines / begrenzen f. langsame Rechner
dtime = MIN(dtime, 16)
.
.
.
ply_x=ply_x+my*COS(ply_dir)*sz*dtime/1000
ply_y=ply_y+my*SIN(ply_dir)*sz*dtime/1000
.
.
.



Kuron

Quote from: MrTAToad on 2010-Oct-09
But as its only a demo program, I dont think its worth implementing.
Unfortunately, as this thread shows, an improperly coded example or demo can give a beginner (or somebody evaluating GLB before purchasing it) a bad impression and even a potential lost sale (in the case of the latter).

MrTAToad

I would hope these postings would explain why things happen, and hopefully would spur someone one to write a collision system that is fool-proof...