I want to create a simple game .
think I have two uneven ( not systematical ) GDI object in one Graphics , user move object one , and I want to be notified when object one has Collision with object two , how can I do this with C# ?
I want to create a simple game . think I have two uneven (
Share
Draw both the objects black on a single bitmap. Then draw one of them on a separate bitmap. Then subtract one bitmap from the other. If the result is same as the bitmap with the other object drawn on a separate bitmap then you have no collision otherwise you have a collision.
This doesn’t require any math and works with objects of irregular shape. Just bitmap difference and sum operation.
Sudo code