I’ve been asked many times to create a program that handles Java collision detection with polygons. This is a continuation of my tutorial on how to make a Java video game and if you haven’t been watching you should check it out.
It is surprisingly easy to handle collision detection with polygons. All you have to do is surround all of your polygons with rectangles and a handy dandy method named intersects handles pretty much everything else!
All the code follows the video.
If you like videos like this, please tell Google by clicking here [googleplusone]
Sharing is also appreciated [nttfblike]
Code from the Video
GameBoard.java
Rock.java
SpaceShip.java
Great. this is what i always want…
Thank you 🙂
You’re very welcome 🙂 I love doing this tutorial
Thank you so much. I’ve been using various online resources to teach myself how to code, and yours have been the most helpful so far.
Thank you 🙂 I very much enjoyed making these videos. I can’t wait to devote more time to making game tutorials.
can i upload a design from inkscape for example to a java game ?
You can convert the vectors into a jpg and use them