Jump to content
  • Advertisement

Archived

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

Zorbfish

Vector-based movement

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

A friend of mine tried to argue that using vectors in a 2d tile engine is easier then just moving from tile to tile (8 way movement is immplemented). He said its easier to do collisions and takes less time for the game to check collisions. When I asked him why he thought so, he shut up. (figures right? ) I tried looking for an example of what he''s talking about on gamedev but haven''t found anything. Could anyone present a code example or give me a link to a site with it? He won''t tell me and I like to find out about it.

Share this post


Link to post
Share on other sites
Advertisement
I would think that it would depend on how each is implemented and how big your bounding square/circle is.

John.

Share this post


Link to post
Share on other sites
Sorry, I meant how many squares your object is searching. If you are doing a zero-radius bounding box/circle, then just seeing if the object runs into another object is pretty easy. On the other hand, when the radius is one or more, it seems that having to check distance is faster and easier than checking every surrounding tile individually.

John.

Share this post


Link to post
Share on other sites
Alright I understand what you mean now. Im working with zero-radius then.

[edited by - Zorbfish on August 29, 2002 5:52:52 PM]

Share this post


Link to post
Share on other sites
Then I would say that it''s probably faster to just check if the two objects try and occupy the same time.

John.

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.

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!