Well, I used 'getWorld().getObjects()', because getIntersectingObjects() also iterates over all Objects in the World-class, checks whether they intersect and then returns the list. So there's no affect to the running-time. In the 'getOneTouchedObject'-method it could also save some time, if one of the first objects in the list touches it... So the 'intersect'-method don't have to be called on all actors...
I want to... But unfortunately, I lost the source code of all of my games, except the 'Adventure'-Game.
So I can only update the code of those games, where I added the source Code on this web-page... :/
Well, in the end it is not so complicated. First I check, if the rectangles of the actors collide at all. Then I create an image, wich I rotate like the two original images are rotated. Then I check the overlapping parts of the images for pixels that are colliding.
I would like to continue working on it, because I like this game and I'm very proud of it. I even got the biggest part of the next mission ready. The main problem is, that I don't have so much time any more and my programming style changed extremly and became much more proffessional. So it's a very big mess to get in the code again.
Another big problem is, that Greenfootgallery only allows 20mb-games. (Please correct me, if this changed), so each map is expensive... And I also dont have much more room to save some bits...
Well, I'm doing that with a small trick.
The images are being created in a separated thread. When the Ram overflows, the Thread throws an error and stops. And then I easily display the messages. ;)
2018/2/23
MouseClass
2017/5/10
Pixel-perfect collision detection
2017/5/9
Pixel-perfect collision detection
2017/5/2
Easy-To-Use-Button
2017/4/30
Base Defense
2017/3/4
Pixel-perfect collision detection
2017/3/4
Adventure
2015/3/2
CastleAttack
2015/2/4
Adventure