I’m programming a game and would like to know what the best way is to program a collision detection for an object. I heared that it’s the hardest part of game programming. Any tip would be appreciated.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is hard to give a specific answer to your question with no information about how you are making the game.
If it is a 2D game then rectangular collision detection is easy to implement. If you are using something like XNA (for Windows) or Andengine (for Android) then all the methods are already done for you and the learning resources for both – XNA in particular – are great.
If it’s a learning project and you really want to do it from scratch then look at any of the really good resources on line, such as this
2D collision tutorial which helped me with my college project – which
was a game.
If it’s a 3D game and you’re not a big fan of maths then consider an open source game engine or something like XNA to begin with.
If you want to give more detail – programming language, platform etc then you might get some more useful answers.