Advertisement

AHHHHH!!!!!!!!!!!!

Started by October 21, 2001 03:07 AM
15 comments, last by flashlaser 23 years, 3 months ago
AHHHHHHHHHHHHH!!!!!!!!!!! I have spent the last 3 weeks getting the collision detection for my game to work without any luck. After numerous posts for help and getting tips like use bounding boxes etc, I am just going to ask, "CAN SOMEONE WRITE THE COLLISION DETECTION CODE FOR ME". I don''t want ways I can do collision detection, I want code, and not packages like ColDet. I am very stressed at the moment.:-O Download my source at - http://home.iprimus.com.au/laser1/car.zip. Its in DirectX and VisualC++. P.S. search for my other posts using my username for more info
Common... get serious.. Nobobdy will hack through your code, implement something and send it back.. har har.. *LOL*. Get some good Hightschool Maths books and figure it out yourself..
cya,
Phil


Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states
Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this question a few times over in the states ;) )
Advertisement
And stop cross posting. Keep your posts to one forum, or inform people that you''ve posted to so many forums and why you thought that was necessary.



To you it''s a Bently, to me it''s a blue car...
"Diddy"
P.Diddy
The other replies are a bit brutal, but they are correct. It is discourteous to cross-post a question. And few people are going to donate complete solutions to your problem---maybe just bits and pieces for specific technical questions asked. I recommend the use of web searches---even gamedev.net forum archive searches---before posting a new question. Collision detection has been discussed many, many, many, many times before in many, many, many places. This approach will save time, bandwidth, and forum storage space.

That said, I offer some pointers to web resources with source code available:

Look at the University of North Carolina at Chapel Hill website for some software for collision detection. No promises that it is fast or robust or easy to use or even works on a platform other than Unix, but at least it is some code.

http://www.cs.unc.edu/~geom/collide/

Some of their s/w is downloadable and some you have to request permission to use.

You might also look on the web for the GJK algorithm. There should be source code out there. Here are examples:

http://www.win.tue.nl/~gino/solid/
http://users.comlab.ox.ac.uk/stephen.cameron/distances.html

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
Here's a very good tutorial. There is also a demo with source code, try looking at it and it with help you alot.

Telemacho's Tutorial: http://www.peroxide.dk/tutorials/tut10/pxdtut10.html

Hope it will help.

Another thing, i noticed that your car only move on the x and z axis, is it possible to do 2d collision detection from top view?



Edited by - Strange Monkey on October 22, 2001 7:04:03 PM
François DagenaisDagenais.f@videotron.ca
I was trying to compile your program so that I could have a look at it to see if I could help, but I seem to be missing function sqrtf in one of my include files (I assume it should be in math.h, but it may be elsewhere). Any idea where this function is defined, so I can get an update to the relevant include file.
Advertisement
if your using visual c++ you could right click on sqrtf and click goto defination.
Unfortunately I''m not!

I''m using the free Borland command line compiler, which means that if you want to find something, you have to do it yourself!

Thanks for the suggestion though.
Ok, solved the sqrtf problem (sqrtf is a non-standard function and so Borland don''t support it - fortunately a quick #define sqrtf (float)sqrt does the trick).

Next problem - you don''t seem to have said anywhere which libraries your source code needs to link to. Is there a standard DX library (I''ve never used directX before)?
The library files needed are - d3dx8.lib d3d8.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib

I think I have listed them all.

This topic is closed to new replies.

Advertisement