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.

Work in Progress / Full MathCollision System

Author
Message
Emperor Baal
20
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 29th Apr 2004 23:05 Edited at: 29th Apr 2004 23:08
Im currently working on a full easy-to-use Math Collision System.
No DLL-calls required, because all work is done in darkbasic Functions.



Here's a screenie of a "snow scene", when a cube hits an object it will get repositioned in the air. NO FPS LOSS:



How it works:
You just copy all of the functions (YES, its open-source) into your project. Then you just call the functions and its done. This is the code that made the "snow scene" work:



You can control everything, when you update an object you can even get the result. In the code above, object_status holds the result value.

When you've copied the functions, you must place the collision data into your scene, using a special tool (im still working on the tool)

This system supports:
1 = box collision
2 = sphere collision
3 = stair/slope - x
4 = stair/slope - z
5 = ellipsoid
6 = x-cylinder
7 = y-cylinder
8 = z-cylinder
9 = cone
10 = pyramid
11 = rotated stair/slope
Any negative value = object positions, for platforms or moving objects.

Bouncing objects is a piece of cake! Just call update_object. If it returns a number above 0 then respond to it. Get the angles for example and rotate/move it.


"Snow Scene" Download link:
http://www.geocities.com/hatesurvivor/MathColl.zip
<right-click, save target as>

I will work on a better example if I got the time.

Quote: "
UPDATED

Amd 2800+ 1024mb pc3200 A7N8X - Deluxe Ati Radeon 9800PRO 256mb
"
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 30th Apr 2004 06:17
seems pretty interesting. with a little more work it might be the first fully DB-coded physics engine

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB

Login to post a reply

Server time is: 2024-05-09 18:32:50
Your offset time is: 2024-05-09 18:32:50