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 Professional Discussion / FPS Collision using Sparky's?

Author
Message
enderleit
19
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 30th May 2011 17:00 Edited at: 30th May 2011 17:08
Does anyone have some code or even just pseudo-code of good collision checking for an FPS using Sparky's?

It should support:
- Horizontal AND Vertical movement.
- Jumping (Hitting ceiling and landing on ground)
- Crouching
- Ramps AND stairs.
- Blocking the un-crouching when there's a wall above you.

I have been playing around with it all weekend and have gotten it to a somewhat functional status. BUT there are alot of "bugs" where in special cases it will do strange things, like going through the ceiling, or there will be alot of "flickering"-movement.

I have included what I've been working on in the attachment if you want a look.
CONTROLS: WASD Movement, MouseLook, CTRL = Crouch, SPACE = Jump, Left-SHIFT = Run.

EDIT: Tried to make a short video of the bugs but it seems the gravity is messed up when the FPS changes, probably because of some Timing issues. So if you experience very slow falling, etc... That's why...

WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 31st May 2011 00:52 Edited at: 31st May 2011 01:01
Hi enderleit, I recently did this -> http://forum.thegamecreators.com/?m=forum_view&t=184914&b=1
Collision with ceilings is just checking a negative ynormal.

EDIT: I can't compile, I must be missing plugins...

Warning! May contain Nuts!

Login to post a reply

Server time is: 2026-07-10 19:47:47
Your offset time is: 2026-07-10 19:47:47