02-01-2023, 11:11 PM
(01-30-2023, 04:40 PM)bplus Wrote: Well I am glad someone looked at it.
@TempodiBasic what did you think of the revised Spiders that turn away when colliding instead of both spiders reversing directions.
Actually I should get the spider clear of the collision and then reverse it or turn it. That would likely solve the original problem with reversing both spiders. If they aren't clear of each other they will reverse direction again and come together and collide again... thus getting stuck. The same goes for balls colliding with walls, just changing direction works but it is inaccurate. It should be backed up to point of collision and then direction changed.
Surely it is more mimic for natural behaviour of animals towards a "bouncing back to the origin" behaviour after collision.
I like it more.
About the origin point of changing direction, it can be managed using as point of the sprite the center point at the place of the UpperLeftPoint of sprite.
And Yes, the movement must start after a change of sprite direction without changing the position. But we must think that a monochrome ball does not show so many graphic differences in its parts. This becomes different when the ball has ,yes , one color but it shows the effects of lights and shadows along its path. In this case we have left the flat monochrome color graphic for a multicolor (256 or 32 bit) colors graphic.