Jump to content
  • Advertisement
Sign in to follow this  
ManifestDestiny

Object collision for Maps

This topic is 5131 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

This is a very basic question, and I probably should have dealt with it before I started on this little project of mine. Anyways, I'm making a very simple RPG; the style resembles console RPGs, where you walk around a field and then get 'warped' to a battle. The problem I have is doing collision testing for the maps in the field. Basically, given any .x file, how would I set up bounding boxes for it? Is it possible to read vertices from the .x file and check to see which ones should be labelled for collision? This is about the only way I could come up with other than hard-coding bounding boxes for each map into the game, and that's OBVIOUSLY not the way to go. I was thinking perhaps a file to go with each .x file that would hold the bounding boxes for that map, maybe? I'm still not too sure how to do that either, though. Any help is gladly appriciated, and please try to explain it simply since I'm new to a lot of concepts. Thank you very much. =)

Share this post


Link to post
Share on other sites
Advertisement
Why don't you just use tiles? Read in a set of tiles:

0:0 0:0 0:0 0:0 0:0
0:0 0:0 0:0 0:0 0:0
0:0 0:0 0:0 0:0 0:0
0:0 0:0 0:0 0:0 0:0
0:0 0:0 0:0 0:0 0:0

The first number would be the tile number on the tileset. The second number would be the tile type (ground, wall, water, etc...).

Then just collision with a defined tile size.

Share this post


Link to post
Share on other sites
Quote:
Original post by MetaCipher
Why don't you just use tiles?


I agree with MetaCipher. It would be the most efficient method of collision testing. It appears that the best mathematical solutions are ones which don't include any mathematics... :P

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!