Pixel Perfect Collision Example

Post your own tutorials, guides and demos.

Post » Thu Jun 18, 2009 10:31 am

It breaks the distance down into smaller parts. In this case, it breaks down the 5000 pixels distance it would make within one tick into numerous parts and loops through each part, checking for collision, and stopping when it detects the collision.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Thu Jul 02, 2009 5:18 am

I made a similar example once but instead of repeating a high number of times it just consumes a time pool.

The time pool was refilled on each frame, so you could have fixed frame rate logic (good for exact collisions) with dynamic frame rate graphics. It's somewhat similar but not exactly the same and only useful if the graphics rate stays way over the fixed logic rate.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Jul 16, 2009 2:02 pm

I posted a similar thing a long time ago and people dogged it :(
wah
Ah well, I probably didn't do it as good as linkman does things
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Previous

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests