Archived

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

GameDev135

Ellipse and making sure a character doesnt go through it

Recommended Posts

I am making a hockey game. I have an ellipse for the hockey rink. The player is a square. I want to make it so that the player cant go through the rink. How would I do this?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
What kind of language... C++?, VB? Other?
And what kind of programming... DOS? OpenGL? Windows? DirectX?
After that i can help u (maby)...


//
char nicon[255];

Share this post


Link to post
Share on other sites
Use a collision map. Which is the size of the rink. If the X,Y location of player encounters black pixels of collision map then player can''t pass. If white, he''s free to move.

Share this post


Link to post
Share on other sites