Archived

This topic is now archived and is closed to further replies.

GameDev135

Creating a 3d world, collision detection, other issues

Recommended Posts

I am beginning to create a racing game. I have designed a simple track and car in 3dstudio max. I have set up a directx frame-based engine based on the code from The Zen of Direct3d Game Programming. My basic question is how can I have collision detection with the outer walls of the track. Do I have to somehow get the coordinates of the wall (which is a circle --the track is just a plain ellipse) and then get the coordinates of the car and see if they intersect? How would I do that? My other question is about the design of the game. How are all the meshes supposed to be organized? Do I have a separate mesh for every frame of animation of the car (I.E. with wheels turned in different directions, etc.)? Because the 3d studio max help files say that any animation of a *.max file is lost when it is exported to a *.3ds file. Finally, an least important at this point, how would I program the A.I. cars to follow the road? Thanks a lot. Dan

Share this post


Link to post
Share on other sites
Hello.

Well I don''t know about your other questions, but in Tricks of the Windows Game Programming Gurus, Andre shows an almost exact example for what you are trying to accomplish in the AI section. Basically it is done using vectors. This would not be suitable for passing and such, but it would be easy to implement this for the cars to follow a specified path.

Minion

Share this post


Link to post
Share on other sites
You''ve got a long way to go Dan

Take one problem at a time and watch it grow like the roots of a tree when you try to solve it! I''m not being negative, you''ll probably enjoy the challenge of learning new things all the way.

We''re interested in some coding help if you want to join us. Click my sig for my website- check out the old demos and stuff. We''ve got lots of new and exciting stuff now.

Cheers

Matt



Share this post


Link to post
Share on other sites
What is a good book or online site that can help me learn this? You are right that I should take it one problem at a time, but at the moment, I don''t have any idea how to handle any of the problems :-)

I would be interested in possibly joining you, just I''m not sure if I know enough to be able to help you.....

Dan

Share this post


Link to post
Share on other sites
This is just an idea, as i am not familiar with *.max files and such.

It seems that if you want the front wheels to move like on a real car you could just have tthree 3D files, one for the car, one for a left wheel, and one for the right wheel. That way to draw you just draw the car with hub like gaps where the wheels should be, then draw the back wheels in line with the car, and finally find the angle with which to rotate the front wheels and draw them in the gaps of the car. This would be pretty easy to do, but again this is just an idea.

He who said money was the root of all evil knew little of the nature of money and less about the nature of man.

Share this post


Link to post
Share on other sites