Jump to content
  • Advertisement

Archived

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

emprizer

draw line(s) between 2 sprites

This topic is 5681 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 question gonna kills me........ Please help.................. : case 1: If I want to draw a line between 2 sprites case 2: same as above but there''s obstacles between them.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I don''t understand the question..

Share this post


Link to post
Share on other sites
He wants something that''ll draw a line between two sprites.

And he wants something that''ll make the line curve around obstacles if they''re in the way.

Share this post


Link to post
Share on other sites
umm.....
use PCMan as an example, what i want is the screen will always display the path between me(the sprite i''m controlling) and the ghost which is chasing me.

question 1: how to know the path? the path is seldom a straight line right?

question 2: if i want to represent the path by... let''s say a "rope", i won''t hv to draw all possible paths combinations in thousands of .bmp right?

sorry for poor English... =.=

Share this post


Link to post
Share on other sites
IMO, what you need is a path finding aglorithm. Here''s a good link to some articles :

http://www-cs-students.stanford.edu/~amitp/gameprog.html#Paths


---
novocaine thru yer veinz

Share this post


Link to post
Share on other sites
If you want a smooth approach , you should use curves . Using bezier curves with control points set dynamically up so that the curve does not intersect with collidable objects would be ok.

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!