File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Game Development
Bookmark "I need help on collision detection." Watch "I need help on collision detection." New topic

I need help on collision detection.

Aaron Collins

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

Joined: Oct 02, 2003
Posts: 11951

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
I agree. Here's the link:
subject: I need help on collision detection.
It's not a secret anymore!