I'm working on a java game called "Daleks" similar to this one, http://www.javaside.com/games/daleks/Daleks_us.shtml, where the main character is the doctor and the goal is to crash the chasing enemy characters, daleks, together into a trash heap. My problem is that the trash heap keeps moving when the user moves the doctor. Can someone please help ASAP? I just have this one bit left - I can use all the help I can get!
also, the characters are specified in their own individual classes
Double check the callbacks for the doctor and trash heap. It could be as simple as a name collision.
Well, the thing is, the trash heap does not have a class of its own. I simply program a red dot (as was specified by the teacher) to be put in place of the two collided daleks.
the daleks have a method called advanceTowards() that make them follow the doctor, and perhaps the problem is there...
That sounds promising. If the red dot is just a change in the appearance of the daleks, it will still have the movement of the daleks. It may be better to substitute the red ball for the daleks.
Join our real-time social learning platform and learn together with your friends!