Jump to content
  • Advertisement

Archived

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

riz

wipeout-style game questions

This topic is 5905 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All, We are trying to make a wipeout-style racing game for our final project in a class using DirectX. Our main question is this: We are thinking of using Maya to export our geometry into .x files (the tracks and the ships), but we are not sure how to perform collision detection with the ship and the track. Is there a standard way that we could store our maps so that we don''t have to hard code information into our games? Our main problem is doing the collision detection between the ships and the walls of the track. The track would look something like this in (2D) This is a behind (chase-plane) view: \ / \ || / \ ~~[oo]~~ / \ / \___________________________________/ And the tracks would wind left, right or even above and below each other. thanks, Riz

Share this post


Link to post
Share on other sites
Advertisement
Collision detection is a matter of math, bounding boxes and all that. It''s wayyy to complex to go into here. There''s some good articles hanging around on it. The long and the short of it is bounding boxes (well I''ve always used this method).

A bound box surrounds the object and then you do intersections between the bounding box and scenery using vector math. You bounding box could also be a sphere or a cylinder. This makes it simpler.

I guess in your case you could model your track as a cylinder or some sort of octagonal prism and then encase your ships in bounding boxes and then simply check when the ships move outside of the cylinders.

Well - it''s an idea.

Hope it helps a little.

~~tim

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You could store the map as a list of points (kinda like a curved line, but you don''t actually have to make it curved). Each point can have properties such as tilt, x,y,z, and width. After you have this simple data stored (you can make a simple editor for you to use, i wrote one similar in VB for a similar aplication). Then you can simply create the track based on your data (of course things like texture coordinates and stuff would have to be defined & generated, define the U and generate the V, or vice-versa). Collision detection is VERY simple because you can treate each "section" of tract EXACTLY the same (you can also add some subdiuvision for larger sections, so you can do dynamic lighting and stuff, to make it look convincing). I was doing a similar game, and this worked great for me. My vehicle can have a few bounding spheres (or points) defined to check collisions with the track (depending on how complex the vehicle, ussually 6-8 is plenty). There are limitations, like each section will be almost identical, except different widths, textures, lengths, and tilts... but, the walls, floor, etc will all be shaped the same (unless you have different "types" of sections with different shapes, etc). The plus to this, is you only have to save 1 point per section (each point is the previous points end).

Billy - BillyB@mrsnj.com

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!