This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Game Development and the fly likes I need help on collision detection. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "I need help on collision detection." Watch "I need help on collision detection." New topic
Author

I need help on collision detection.

Aaron Collins
Greenhorn

Joined: Aug 27, 2013
Posts: 3
My game is fairly advanced. you can move in all 2D directions and the land moves as well as you do.
These must be factored in because otherwise it wouldn't work.
Any ideas on this would be happily accepted. (hopefully)

Please help me.

Here is the paint method:



here is another method:




[Thumbnail for Pre alpha 3.0 sandbox.PNG]

fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11249
    
  16

My guess is that you've not gotten any responses because it is unclear what exactly you need help with. Further, you code is poorly documented...150ish lines of code, and ONE comment. My first reaction on seeing something like that is to just say "Next!".

So..ask specific questions. Don't post any irrelevant code. Tell us what does happen, what doesn't happen, what you expect to happen, and what you want to happen. As it is, you are asking the reader to do way too much work on their own, and at best, they can only guess what you want or need help with.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
wood burning stoves
 
subject: I need help on collision detection.