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.

Code Snippets / Sparky's Collision DLL: Collision With Gravity + Jumping (DBPro)

Author
Message
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 26th Jun 2007 02:01 Edited at: 20th Jul 2007 00:57
Here are some functions that I've been using in my projects for collision. There are probably better ones out there, but this is mine. It handles jumping and gravity (even if it is a little buggy). There are 6 commands, four of which are required to get the collision system working on an object (or many...). Here's the code:



And here's an example:



No media required.

flashing snall
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 26th Jun 2007 21:01
woa, thats really nice.


"these shoes are 300 hundred dollars"-Shoes by Kelly http://smallgroupproductions.com/
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 27th Jun 2007 00:10 Edited at: 27th Jun 2007 14:56
Thanks Feel free to use them if you want to.

Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 18th Jul 2007 13:48
Anyone else tried it out?

Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 18th Jul 2007 23:02
Very Cool!!

The 33 FPS with no media worries me though...

http://forum.thegamecreators.com/xt/xt_apollo_pic.php?i=1234759
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 19th Jul 2007 17:27
Ankillito:
I got 573 fps when using "sync rate 0"
Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 19th Jul 2007 23:58
Very nice And you've given me an idea to start on after my current project
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 20th Jul 2007 00:55
Thanks for the comments everyone

@Ankillito: I got 257 fps when using "sync rate 0". How were you getting 30? Maybe there sometihng else taking up too much ram as you were running the demo.

@Juso: Wow that's fast.

@Xylados: I'm glad I've inspired you

Code Dragon
17
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 21st Jul 2007 16:36
Very nice, I made something similar with DBP's native collision commands once, but they're nowhere near as powerful as sparky's.

This sig has been viewed times.
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 21st Jul 2007 17:48
@Code Dragon: Thank you Metal Runner uses the native collision commands as well.

Login to post a reply

Server time is: 2024-05-06 20:11:42
Your offset time is: 2024-05-06 20:11:42