Original Post
🔒 Locked
[java] Tron in java
Advertisement
"Anyone know how to check for collisions in java?"
actually the simplest and fastest method is to check the coordinates. collisions are by the way the same in the real world, and other programming languages as well, not just Java. it''s just the implementation that differs (slightly).
actually the simplest and fastest method is to check the coordinates. collisions are by the way the same in the real world, and other programming languages as well, not just Java. it''s just the implementation that differs (slightly).
I guess your not familiar with tron... one player can crash into the tail of the other. And i've made this game in other languages, along with a bunch of other people i know... and we all used the same algorithm cause its the simplest algorithm. So is it possible to get the color of a pixel?
[edited by - vlovich on October 10, 2002 8:56:59 PM]
[edited by - vlovich on October 10, 2002 8:56:59 PM]
One way to get the color of a pixel is to use BufferedImage.
Another way is.
Make it work.
Make it fast.
"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book
Another way is.
Robot rb=new Robot();
Color c=rb.getPixelColor(10,20);
Make it work.
Make it fast.
"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement