Box and Pixel Collisions pkg
#4
(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.
Reply


Messages In This Thread
Box and Pixel Collisions pkg - by bplus - 01-28-2023, 08:54 PM
RE: Box and Pixel Collisions pkg - by bplus - 01-30-2023, 04:40 PM
RE: Box and Pixel Collisions pkg - by TempodiBasic - 02-01-2023, 11:11 PM
RE: Box and Pixel Collisions pkg - by OldMoses - 02-03-2023, 12:19 PM
RE: Box and Pixel Collisions pkg - by bplus - 02-03-2023, 02:47 PM
RE: Box and Pixel Collisions pkg - by madscijr - 02-02-2023, 05:49 PM
RE: Box and Pixel Collisions pkg - by bplus - 02-02-2023, 06:21 PM
RE: Box and Pixel Collisions pkg - by madscijr - 02-02-2023, 06:36 PM
RE: Box and Pixel Collisions pkg - by OldMoses - 02-03-2023, 05:54 PM
RE: Box and Pixel Collisions pkg - by bplus - 02-03-2023, 08:13 PM
RE: Box and Pixel Collisions pkg - by OldMoses - 02-03-2023, 10:10 PM
RE: Box and Pixel Collisions pkg - by bplus - 02-04-2023, 12:12 AM



Users browsing this thread: 1 Guest(s)